Skip to content

Small fixes: bc_type dummy shape, serial BC files every save, format/lint/validator tooling - #2118

Draft
sbryngelson wants to merge 1 commit into
MFlowCode:masterfrom
sbryngelson:tooling-fixes
Draft

sbryngelson wants to merge 1 commit into
MFlowCode:masterfrom
sbryngelson:tooling-fixes

Conversation

@sbryngelson

Copy link
Copy Markdown
Member

Developed with AI assistance (Claude Code).

Contribution Policy

All contributions are expected to demonstrate:

  • A clear understanding of the codebase
  • Alignment with product direction
  • Thoughtful reasoning behind changes
  • Evidence of real-world usage or hands-on experience with the problem

Summary

Small fixes and tooling found while preparing #2116 and the AMR PR, split out so each can be reviewed on its own.

  • bc_type dummy shape (bug): bc_type is allocated (1:num_dims, 1:2) but simulation/m_data_output.fpp declared
    the dummies (1:num_dims, -1:1). Now (1:num_dims, 1:2) everywhere.
  • Serial boundary files every save: serial readers (post_process, restart) need bc_type.dat and bc_buffers.dat in
    each step directory, not only step 0. s_write_serial_boundary_condition_files now takes the packed buffers, so pre and
    sim share it.
  • format.sh: ffmt reports unmatched block structure as a warning and exits 0; the script now shows stderr and fails
    on those warnings (the source would not compile).
  • Cray debug builds get -h bounds, as the other compilers' debug builds already check bounds.
  • Run template: passes --oversubscribe to Open MPI when ranks exceed cores (small CI runners refused -np 4).
  • Source lint: rejects per-executable preprocessor guards (MFC_PRE_PROCESS, ...), which the sources no longer use.
  • Validator: derives cfl_dt from cfl_adap_dt/cfl_const_dt like the Fortran; rejects MHD with Euler bubbles and a
    non-positive rburn%pign.

Verification

Frontier amdflang OpenMP full regression (as part of the branch these came from): all master goldens unchanged. CI runs
here on this branch alone.

…rmat on ffmt structure warnings; Cray debug bounds checking; Open MPI oversubscribe; stage-guard lint; validator fixes

bc_type is allocated (1:num_dims, 1:2) but simulation's m_data_output declared it (1:num_dims, -1:1). Serial readers need
bc_type.dat and bc_buffers.dat in every step directory. format.sh treats ffmt's unmatched-structure warnings as fatal; Cray
debug builds get -h bounds like the other compilers; the run template passes --oversubscribe to Open MPI when ranks exceed
cores; a source lint rejects per-executable preprocessor guards; the validator derives cfl_dt like the Fortran and rejects
MHD with Euler bubbles and a non-positive rburn%pign.
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

Lines of Code

File Lines Diff
src/common/m_boundary_io.fpp 319 -3
src/simulation/m_data_output.fpp 1581 +2
src/pre_process/m_data_output.fpp 677 +1
Directory Lines Diff
common 10541 -3
pre_process 5023 +1
simulation 28582 +2
total 47630 +0

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

Claude Code Review

Head SHA: 7526aaf

Files changed:

  • 11
  • cmake/GPU.cmake
  • docs/documentation/contributing.md
  • src/common/m_boundary_io.fpp
  • src/pre_process/m_data_output.fpp
  • src/simulation/m_data_output.fpp
  • toolchain/bootstrap/format.sh
  • toolchain/mfc/case_validator.py
  • toolchain/mfc/lint_source.py
  • toolchain/mfc/test_lint_source.py
  • toolchain/templates/default.mako

Findings:

  • medium cmake/GPU.cmake: The Cray Debug branch adds "SHELL: -h bounds". As far as I know, -h bounds is a Cray C/C++ option, and the Cray Fortran compiler (ftn) enables bounds checking with -R b. If ftn rejects or ignores -h bounds, Cray Debug builds will fail or silently get no bounds checking, which contradicts the new comment. I am not certain, because I could not check the CCE version in use. Please check against the Cray Fortran documentation, and use -R b if needed.
  • medium toolchain/templates/default.mako: --oversubscribe is now always passed whenever the launcher is Open MPI, even when ranks <= available cores. This is harmless for correctness. However, nproc reports the cores allowed by affinity or cgroup, which can differ from the slot count Open MPI uses. The warning is only printed when nproc is smaller than the rank count, so it may be misleading under some schedulers. Confidence is low, and this is a minor point.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant