A grab-bag of low-value but verified naming issues. Each is independent and low-risk; filed as one combined cleanup.
1. mpi_bcast_time_step_values does a GATHER, not a broadcast — src/common/m_mpi_common.fpp:257. The body is:
call MPI_GATHER(time_avg, 1, mpi_p, proc_time(0), 1, mpi_p, 0, MPI_COMM_WORLD, ierr)
and the doc comment even says "Gather per-rank time step wall-clock times onto rank 0." The bcast in the name is simply wrong. Rename to s_mpi_gather_time_step_values (also picks up the missing s_ prefix). Public routine — update callers (grep mpi_bcast_time_step_values).
2. Stutter type names — src/common/m_boundary_common.fpp:24-25: MPI_BC_TYPE_TYPE and MPI_BC_BUFFER_TYPE. MPI_BC_TYPE_TYPE has a doubled _TYPE. Suggest mpi_bc_type_dtype / mpi_bc_buffer_dtype. Module-private → contained blast radius.
3. Builtin-shadowing locals in toolchain/mfc/case_validator.py:
format = self.get("format") (L1529) shadows the format builtin.
for dir in ["x", "y", "z"]: shadows the dir builtin at L428, L825, L931, L1163, L1339.
Rename loop var to axis and the local to output_format/fmt. (Note the file is internally inconsistent — it already uses format_val/direction elsewhere.)
4. Bare is1/is2/is3 module names in src/simulation/m_cbc.fpp:64 lack the disambiguating suffix used elsewhere (is1_weno, is1_muscl, is1_viscous). m_riemann_solvers.fpp/m_rhs.fpp also use bare is1/is2/is3, so if renamed for clarity it should be done consistently — lowest-priority item; could be left as-is.
None of these touch generated output → no golden-file risk. Items 1-2 are the most worthwhile (an outright-wrong name and a stutter); 3 is a lint-hygiene win; 4 is optional.
Filed from a repo-wide code-cleanliness review; verified against master @ 40dde5e.
Code references
A grab-bag of low-value but verified naming issues. Each is independent and low-risk; filed as one combined cleanup.
1.
mpi_bcast_time_step_valuesdoes a GATHER, not a broadcast —src/common/m_mpi_common.fpp:257. The body is:and the doc comment even says "Gather per-rank time step wall-clock times onto rank 0." The
bcastin the name is simply wrong. Rename tos_mpi_gather_time_step_values(also picks up the missings_prefix). Public routine — update callers (grepmpi_bcast_time_step_values).2. Stutter type names —
src/common/m_boundary_common.fpp:24-25:MPI_BC_TYPE_TYPEandMPI_BC_BUFFER_TYPE.MPI_BC_TYPE_TYPEhas a doubled_TYPE. Suggestmpi_bc_type_dtype/mpi_bc_buffer_dtype. Module-private → contained blast radius.3. Builtin-shadowing locals in
toolchain/mfc/case_validator.py:format = self.get("format")(L1529) shadows theformatbuiltin.for dir in ["x", "y", "z"]:shadows thedirbuiltin at L428, L825, L931, L1163, L1339.Rename loop var to
axisand the local tooutput_format/fmt. (Note the file is internally inconsistent — it already usesformat_val/directionelsewhere.)4. Bare
is1/is2/is3module names insrc/simulation/m_cbc.fpp:64lack the disambiguating suffix used elsewhere (is1_weno,is1_muscl,is1_viscous).m_riemann_solvers.fpp/m_rhs.fppalso use bareis1/is2/is3, so if renamed for clarity it should be done consistently — lowest-priority item; could be left as-is.None of these touch generated output → no golden-file risk. Items 1-2 are the most worthwhile (an outright-wrong name and a stutter); 3 is a lint-hygiene win; 4 is optional.
Filed from a repo-wide code-cleanliness review; verified against
master@40dde5e.Code references
src/common/m_mpi_common.fpp:257— mpi_bcast_time_step_values (does GATHER)src/common/m_boundary_common.fpp:24-25— MPI_BC_TYPE_TYPE stuttertoolchain/mfc/case_validator.py:1529— format shadows builtinsrc/simulation/m_cbc.fpp:64— bare is1/is2/is3