Commit b06ed51
Fix WP_MOK to use stp instead of wp for main field data I/O
MPI-IO displacement (WP_MOK) must match the storage precision of
the data being read/written. Main field variables are written with
mpi_io_p (which tracks stp), not mpi_p (which tracks wp). In
mixed-precision mode stp = half (2 bytes) while wp = double (8 bytes),
so using storage_size(0._wp) gives a 4× wrong displacement.
Change all main-data WP_MOK assignments from storage_size(0._wp) to
storage_size(0._stp) across all three I/O paths:
- src/simulation/m_data_output.fpp (write, two call sites)
- src/simulation/m_start_up.fpp (restart read, two call sites)
- src/post_process/m_data_input.f90 (post-process read, two call sites)
IB marker I/O (MPI_INTEGER, 4 bytes) was already fixed to use
storage_size(0)/8 in the previous commit and is not changed here.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 50e9df4 commit b06ed51
3 files changed
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| |||
521 | 521 | | |
522 | 522 | | |
523 | 523 | | |
524 | | - | |
| 524 | + | |
525 | 525 | | |
526 | 526 | | |
527 | 527 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
908 | 908 | | |
909 | 909 | | |
910 | 910 | | |
911 | | - | |
| 911 | + | |
912 | 912 | | |
913 | 913 | | |
914 | 914 | | |
| |||
976 | 976 | | |
977 | 977 | | |
978 | 978 | | |
979 | | - | |
| 979 | + | |
980 | 980 | | |
981 | 981 | | |
982 | 982 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
575 | 575 | | |
576 | 576 | | |
577 | 577 | | |
578 | | - | |
| 578 | + | |
579 | 579 | | |
580 | 580 | | |
581 | 581 | | |
| |||
652 | 652 | | |
653 | 653 | | |
654 | 654 | | |
655 | | - | |
| 655 | + | |
656 | 656 | | |
657 | 657 | | |
658 | 658 | | |
| |||
0 commit comments