Skip to content

Commit 8c70cb1

Browse files
authored
Fix WP_MOK hardcoded to 8 bytes, use storage_size for portability (#1187)
1 parent 9b7a503 commit 8c70cb1

6 files changed

Lines changed: 13 additions & 13 deletions

File tree

src/post_process/m_data_input.f90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ impure subroutine s_setup_mpi_io_params(data_size, m_MOK, n_MOK, p_MOK, WP_MOK,
133133
m_MOK = int(m_glb + 1, MPI_OFFSET_KIND)
134134
n_MOK = int(n_glb + 1, MPI_OFFSET_KIND)
135135
p_MOK = int(p_glb + 1, MPI_OFFSET_KIND)
136-
WP_MOK = int(8._wp, MPI_OFFSET_KIND)
136+
WP_MOK = int(storage_size(0._stp)/8, MPI_OFFSET_KIND)
137137
MOK = int(1._wp, MPI_OFFSET_KIND)
138138
str_MOK = int(name_len, MPI_OFFSET_KIND)
139139
NVARS_MOK = int(sys_size, MPI_OFFSET_KIND)
@@ -177,7 +177,7 @@ impure subroutine s_read_ib_data_files(file_loc_base, t_step)
177177
n_MOK = int(n_glb + 1, MPI_OFFSET_KIND)
178178
p_MOK = int(p_glb + 1, MPI_OFFSET_KIND)
179179
MOK = int(1._wp, MPI_OFFSET_KIND)
180-
WP_MOK = int(8._wp, MPI_OFFSET_KIND)
180+
WP_MOK = int(storage_size(0._stp)/8, MPI_OFFSET_KIND)
181181
save_index = t_step/t_step_save ! get the number of saves done to this point
182182

183183
data_size = (m + 1)*(n + 1)*(p + 1)
@@ -521,7 +521,7 @@ impure subroutine s_read_parallel_conservative_data(t_step, m_MOK, n_MOK, p_MOK,
521521
m_MOK = int(m_glb + 1, MPI_OFFSET_KIND)
522522
n_MOK = int(n_glb + 1, MPI_OFFSET_KIND)
523523
p_MOK = int(p_glb + 1, MPI_OFFSET_KIND)
524-
WP_MOK = int(8._wp, MPI_OFFSET_KIND)
524+
WP_MOK = int(storage_size(0._stp)/8, MPI_OFFSET_KIND)
525525
MOK = int(1._wp, MPI_OFFSET_KIND)
526526
str_MOK = int(name_len, MPI_OFFSET_KIND)
527527
NVARS_MOK = int(sys_size, MPI_OFFSET_KIND)

src/pre_process/m_data_output.fpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ contains
551551
m_MOK = int(m_glb_save, MPI_OFFSET_KIND)
552552
n_MOK = int(n_glb_save, MPI_OFFSET_KIND)
553553
p_MOK = int(p_glb_save, MPI_OFFSET_KIND)
554-
WP_MOK = int(8._wp, MPI_OFFSET_KIND)
554+
WP_MOK = int(storage_size(0._stp)/8, MPI_OFFSET_KIND)
555555
MOK = int(1._wp, MPI_OFFSET_KIND)
556556
str_MOK = int(name_len, MPI_OFFSET_KIND)
557557
NVARS_MOK = int(sys_size, MPI_OFFSET_KIND)
@@ -617,7 +617,7 @@ contains
617617
m_MOK = int(m_glb + 1, MPI_OFFSET_KIND)
618618
n_MOK = int(n_glb + 1, MPI_OFFSET_KIND)
619619
p_MOK = int(p_glb + 1, MPI_OFFSET_KIND)
620-
WP_MOK = int(8._wp, MPI_OFFSET_KIND)
620+
WP_MOK = int(storage_size(0._stp)/8, MPI_OFFSET_KIND)
621621
MOK = int(1._wp, MPI_OFFSET_KIND)
622622
str_MOK = int(name_len, MPI_OFFSET_KIND)
623623
NVARS_MOK = int(sys_size, MPI_OFFSET_KIND)

src/pre_process/m_start_up.fpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ contains
662662
m_MOK = int(m_glb + 1, MPI_OFFSET_KIND)
663663
n_MOK = int(n_glb + 1, MPI_OFFSET_KIND)
664664
p_MOK = int(p_glb + 1, MPI_OFFSET_KIND)
665-
WP_MOK = int(8._wp, MPI_OFFSET_KIND)
665+
WP_MOK = int(storage_size(0._stp)/8, MPI_OFFSET_KIND)
666666
MOK = int(1._wp, MPI_OFFSET_KIND)
667667
str_MOK = int(name_len, MPI_OFFSET_KIND)
668668
NVARS_MOK = int(sys_size, MPI_OFFSET_KIND)
@@ -807,7 +807,7 @@ contains
807807
if (relax) then
808808
if (proc_rank == 0) then
809809
print *, 'initial condition might have been altered due to enforcement of &
810-
& pTg-equilirium (relax = "T" activated)'
810+
& pTg-equilibrium (relax = "T" activated)'
811811
end if
812812

813813
call s_infinite_relaxation_k(q_cons_vf)

src/simulation/m_data_output.fpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -927,7 +927,7 @@ contains
927927
m_MOK = int(m_glb_save + 1, MPI_OFFSET_KIND)
928928
n_MOK = int(n_glb_save + 1, MPI_OFFSET_KIND)
929929
p_MOK = int(p_glb_save + 1, MPI_OFFSET_KIND)
930-
WP_MOK = int(8._wp, MPI_OFFSET_KIND)
930+
WP_MOK = int(storage_size(0._stp)/8, MPI_OFFSET_KIND)
931931
MOK = int(1._wp, MPI_OFFSET_KIND)
932932
str_MOK = int(name_len, MPI_OFFSET_KIND)
933933
NVARS_MOK = int(sys_size, MPI_OFFSET_KIND)
@@ -995,7 +995,7 @@ contains
995995
m_MOK = int(m_glb + 1, MPI_OFFSET_KIND)
996996
n_MOK = int(n_glb + 1, MPI_OFFSET_KIND)
997997
p_MOK = int(p_glb + 1, MPI_OFFSET_KIND)
998-
WP_MOK = int(8._wp, MPI_OFFSET_KIND)
998+
WP_MOK = int(storage_size(0._stp)/8, MPI_OFFSET_KIND)
999999
MOK = int(1._wp, MPI_OFFSET_KIND)
10001000
str_MOK = int(name_len, MPI_OFFSET_KIND)
10011001
NVARS_MOK = int(alt_sys, MPI_OFFSET_KIND)
@@ -1122,7 +1122,7 @@ contains
11221122
m_MOK = int(m_glb + 1, MPI_OFFSET_KIND)
11231123
n_MOK = int(n_glb + 1, MPI_OFFSET_KIND)
11241124
p_MOK = int(p_glb + 1, MPI_OFFSET_KIND)
1125-
WP_MOK = int(8._wp, MPI_OFFSET_KIND)
1125+
WP_MOK = int(storage_size(0._stp)/8, MPI_OFFSET_KIND)
11261126
MOK = int(1._wp, MPI_OFFSET_KIND)
11271127

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

src/simulation/m_rhs.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1652,7 +1652,7 @@ contains
16521652
call s_compute_viscous_stress_cylindrical_boundary(q_prim_vf, &
16531653
dq_prim_dx_vf(mom_idx%beg:mom_idx%end), &
16541654
dq_prim_dy_vf(mom_idx%beg:mom_idx%end), &
1655-
dq_prim_dy_vf(mom_idx%beg:mom_idx%end), &
1655+
dq_prim_dz_vf(mom_idx%beg:mom_idx%end), &
16561656
tau_Re_vf, &
16571657
idwbuff(1), idwbuff(2), idwbuff(3))
16581658
end if

src/simulation/m_start_up.fpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ contains
576576
m_MOK = int(m_glb_read + 1, MPI_OFFSET_KIND)
577577
n_MOK = int(m_glb_read + 1, MPI_OFFSET_KIND)
578578
p_MOK = int(m_glb_read + 1, MPI_OFFSET_KIND)
579-
WP_MOK = int(4._wp, MPI_OFFSET_KIND)
579+
WP_MOK = int(storage_size(0._stp)/8, MPI_OFFSET_KIND)
580580
MOK = int(1._wp, MPI_OFFSET_KIND)
581581
str_MOK = int(name_len, MPI_OFFSET_KIND)
582582
NVARS_MOK = int(sys_size, MPI_OFFSET_KIND)
@@ -653,7 +653,7 @@ contains
653653
m_MOK = int(m_glb + 1, MPI_OFFSET_KIND)
654654
n_MOK = int(n_glb + 1, MPI_OFFSET_KIND)
655655
p_MOK = int(p_glb + 1, MPI_OFFSET_KIND)
656-
WP_MOK = int(8._wp, MPI_OFFSET_KIND)
656+
WP_MOK = int(storage_size(0._stp)/8, MPI_OFFSET_KIND)
657657
MOK = int(1._wp, MPI_OFFSET_KIND)
658658
str_MOK = int(name_len, MPI_OFFSET_KIND)
659659
NVARS_MOK = int(sys_size, MPI_OFFSET_KIND)

0 commit comments

Comments
 (0)