-
Notifications
You must be signed in to change notification settings - Fork 132
Description
Summary
Copy-paste bug in src/simulation/m_start_up.fpp lines 575-577 (on master). In the file_per_process Lustre sequential-read restart path, n_MOK and p_MOK are both computed from m_glb_read instead of n_glb_read and p_glb_read respectively.
Location
src/simulation/m_start_up.fpp, inside s_read_data_files, in the if (file_per_process) then block:
! Current (buggy):
m_MOK = int(m_glb_read + 1, MPI_OFFSET_KIND)
n_MOK = int(m_glb_read + 1, MPI_OFFSET_KIND) ! should be n_glb_read
p_MOK = int(m_glb_read + 1, MPI_OFFSET_KIND) ! should be p_glb_readFix
m_MOK = int(m_glb_read + 1, MPI_OFFSET_KIND)
n_MOK = int(n_glb_read + 1, MPI_OFFSET_KIND)
p_MOK = int(p_glb_read + 1, MPI_OFFSET_KIND)Impact
This path is only used when file_per_process = .true. (Lustre sequential-read mode). The n_MOK/p_MOK values are computed but not actually used in this branch — the file_per_process path calls MPI_FILE_READ (sequential) rather than MPI_FILE_SET_VIEW (which uses offset calculations involving n_MOK/p_MOK). So this is currently dead-code-level impact, but it would become a real bug if the Lustre path ever switches to MPI_FILE_SET_VIEW for multi-dimensional data.
Note: the corresponding else branch (the standard parallel I/O path) correctly uses m_glb, n_glb, p_glb and is not affected.
cc @bwilfong3