Summary
In builds without MPI, s_mpi_allreduce_min and s_mpi_allreduce_max (src/common/m_mpi_common.fpp) leave their intent(out) result var_glb undefined. The MPI_ALLREDUCE call is wrapped in #ifdef MFC_MPI and has no #else var_glb = var_loc. Callers on a single-process build then read garbage.
s_mpi_allreduce_sum had the same gap; #1963 adds the #else branch for it. s_mpi_allreduce_min_vec and s_mpi_reduce_int_sum already have the fallback.
Fix
Add the same branch to s_mpi_allreduce_min and s_mpi_allreduce_max:
#ifdef MFC_MPI
...
call MPI_ALLREDUCE(var_loc, var_glb, 1, mpi_p, MPI_MIN, MPI_COMM_WORLD, ierr)
#else
var_glb = var_loc
#endif
Then check whether any other scalar reduction helper is missing the same branch.
Found with Claude Code (a cleanup report that used s_mpi_allreduce_sum never printed in --no-mpi test builds).
Summary
In builds without MPI,
s_mpi_allreduce_minands_mpi_allreduce_max(src/common/m_mpi_common.fpp) leave theirintent(out)resultvar_glbundefined. TheMPI_ALLREDUCEcall is wrapped in#ifdef MFC_MPIand has no#else var_glb = var_loc. Callers on a single-process build then read garbage.s_mpi_allreduce_sumhad the same gap; #1963 adds the#elsebranch for it.s_mpi_allreduce_min_vecands_mpi_reduce_int_sumalready have the fallback.Fix
Add the same branch to
s_mpi_allreduce_minands_mpi_allreduce_max:Then check whether any other scalar reduction helper is missing the same branch.
Found with Claude Code (a cleanup report that used
s_mpi_allreduce_sumnever printed in--no-mpitest builds).