Skip to content

Commit c260aad

Browse files
sbryngelsonclaude
andcommitted
Extend storage_size fix to simulation and pre_process MPI-IO
The same int(8._wp, MPI_OFFSET_KIND) pattern that was fixed in post_process/m_data_input.f90 was present in 7 additional locations across simulation/m_data_output.fpp, simulation/m_start_up.fpp, pre_process/m_data_output.fpp, and pre_process/m_start_up.fpp. All hardcoded 8-byte strides are replaced with storage_size(0._wp)/8 so MPI file offsets are correct in single-precision builds. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent d65bbd8 commit c260aad

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/pre_process/m_data_output.fpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ contains
549549
m_MOK = int(m_glb_save, MPI_OFFSET_KIND)
550550
n_MOK = int(n_glb_save, MPI_OFFSET_KIND)
551551
p_MOK = int(p_glb_save, MPI_OFFSET_KIND)
552-
WP_MOK = int(8._wp, MPI_OFFSET_KIND)
552+
WP_MOK = int(storage_size(0._wp)/8, MPI_OFFSET_KIND)
553553
MOK = int(1._wp, MPI_OFFSET_KIND)
554554
str_MOK = int(name_len, MPI_OFFSET_KIND)
555555
NVARS_MOK = int(sys_size, MPI_OFFSET_KIND)
@@ -615,7 +615,7 @@ contains
615615
m_MOK = int(m_glb + 1, MPI_OFFSET_KIND)
616616
n_MOK = int(n_glb + 1, MPI_OFFSET_KIND)
617617
p_MOK = int(p_glb + 1, MPI_OFFSET_KIND)
618-
WP_MOK = int(8._wp, MPI_OFFSET_KIND)
618+
WP_MOK = int(storage_size(0._wp)/8, MPI_OFFSET_KIND)
619619
MOK = int(1._wp, MPI_OFFSET_KIND)
620620
str_MOK = int(name_len, MPI_OFFSET_KIND)
621621
NVARS_MOK = int(sys_size, MPI_OFFSET_KIND)

src/pre_process/m_start_up.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ contains
660660
m_MOK = int(m_glb + 1, MPI_OFFSET_KIND)
661661
n_MOK = int(n_glb + 1, MPI_OFFSET_KIND)
662662
p_MOK = int(p_glb + 1, MPI_OFFSET_KIND)
663-
WP_MOK = int(8._wp, MPI_OFFSET_KIND)
663+
WP_MOK = int(storage_size(0._wp)/8, MPI_OFFSET_KIND)
664664
MOK = int(1._wp, MPI_OFFSET_KIND)
665665
str_MOK = int(name_len, MPI_OFFSET_KIND)
666666
NVARS_MOK = int(sys_size, MPI_OFFSET_KIND)

src/simulation/m_data_output.fpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ contains
895895
m_MOK = int(m_glb_save + 1, MPI_OFFSET_KIND)
896896
n_MOK = int(n_glb_save + 1, MPI_OFFSET_KIND)
897897
p_MOK = int(p_glb_save + 1, MPI_OFFSET_KIND)
898-
WP_MOK = int(8._wp, MPI_OFFSET_KIND)
898+
WP_MOK = int(storage_size(0._wp)/8, MPI_OFFSET_KIND)
899899
MOK = int(1._wp, MPI_OFFSET_KIND)
900900
str_MOK = int(name_len, MPI_OFFSET_KIND)
901901
NVARS_MOK = int(sys_size, MPI_OFFSET_KIND)
@@ -963,7 +963,7 @@ contains
963963
m_MOK = int(m_glb + 1, MPI_OFFSET_KIND)
964964
n_MOK = int(n_glb + 1, MPI_OFFSET_KIND)
965965
p_MOK = int(p_glb + 1, MPI_OFFSET_KIND)
966-
WP_MOK = int(8._wp, MPI_OFFSET_KIND)
966+
WP_MOK = int(storage_size(0._wp)/8, MPI_OFFSET_KIND)
967967
MOK = int(1._wp, MPI_OFFSET_KIND)
968968
str_MOK = int(name_len, MPI_OFFSET_KIND)
969969
NVARS_MOK = int(alt_sys, MPI_OFFSET_KIND)
@@ -1087,7 +1087,7 @@ contains
10871087
m_MOK = int(m_glb + 1, MPI_OFFSET_KIND)
10881088
n_MOK = int(n_glb + 1, MPI_OFFSET_KIND)
10891089
p_MOK = int(p_glb + 1, MPI_OFFSET_KIND)
1090-
WP_MOK = int(8._wp, MPI_OFFSET_KIND)
1090+
WP_MOK = int(storage_size(0._wp)/8, MPI_OFFSET_KIND)
10911091
MOK = int(1._wp, MPI_OFFSET_KIND)
10921092

10931093
write (file_loc, '(A)') 'ib.dat'

src/simulation/m_start_up.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ contains
652652
m_MOK = int(m_glb + 1, MPI_OFFSET_KIND)
653653
n_MOK = int(n_glb + 1, MPI_OFFSET_KIND)
654654
p_MOK = int(p_glb + 1, MPI_OFFSET_KIND)
655-
WP_MOK = int(8._wp, MPI_OFFSET_KIND)
655+
WP_MOK = int(storage_size(0._wp)/8, MPI_OFFSET_KIND)
656656
MOK = int(1._wp, MPI_OFFSET_KIND)
657657
str_MOK = int(name_len, MPI_OFFSET_KIND)
658658
NVARS_MOK = int(sys_size, MPI_OFFSET_KIND)

0 commit comments

Comments
 (0)