From a94240171ee41e3b307f377bb57c9599237b09cb Mon Sep 17 00:00:00 2001 From: William Dawson Date: Mon, 16 Oct 2023 15:06:58 +0900 Subject: [PATCH] fix offset too --- Source/Fortran/PSMatrixModule.F90 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Fortran/PSMatrixModule.F90 b/Source/Fortran/PSMatrixModule.F90 index eff2a032..7fe3cb53 100644 --- a/Source/Fortran/PSMatrixModule.F90 +++ b/Source/Fortran/PSMatrixModule.F90 @@ -651,7 +651,8 @@ RECURSIVE SUBROUTINE ConstructMatrixFromBinary_ps(this, file_name, & !! Compute Offset local_triplets = total_values / this%process_grid%total_processors - local_offset = local_triplets * this%process_grid%global_rank + local_offset = INT(local_triplets, KIND=NTLONG) * & + & this%process_grid%global_rank header_size = 3 * bytes_per_int + bytes_per_long IF (this%process_grid%global_rank .EQ. & & this%process_grid%total_processors - 1) THEN