2.7 KiB
Build modes
The checked build remains the default. It retains runtime checks, floating-point traps, zero initialization, and the existing precision selection. Debug flags remain unchanged.
For GNU Fortran, checked mode also defines EXOPLASIM_CHECKED. This selects the packed wind accumulators that improved checked-kernel timing. Performance mode retains the original wind accumulation loop because the packed version regressed in native microbenchmarks.
Configure from the exoplasim/ directory:
timeout 60 ./configure.sh --build-mode checked
timeout 60 ./configure.sh --build-mode performance
timeout 60 ./configure.sh --build-mode performance --native
Run only the command for the desired mode. Performance mode removes -fcheck=all from GNU Fortran flags. Native mode also adds host-specific instructions and disables floating-point contraction. The same flags reach the GNU Fortran MPI configuration. Other compiler branches retain their upstream behavior.
Native binaries may not run on other CPU types. Native settings are explicit and require performance mode. The existing Python-version option and help option remain available.
Rebuild cached executables
Configuration does not invalidate an existing model executable. Use recompile=True when constructing a Python Model, or invoke the upstream compile.sh for the desired resolution, layers, and process count.
For the local serial T21 smoke test, run these commands from the repository root:
timeout 300 .venv/bin/python scripts/exoplasim-smoke.py --recompile
The configuration script rewrites compiler metadata and performs compiler checks in its current directory. It can also generate build files. Do not run it in another active worker's build directory.
Numerical limits
Source changes matched upstream output and restart files exactly in the measured T21 runs when compiler flags matched. Kernel tests also matched at T21, T42, and T85 in FP32 and FP64.
Changing compiler flags is a separate numerical change. Generic and native builds produced different weather trajectories from the same restart. Disabling contraction did not eliminate that difference. These comparisons do not prove climate-statistical equivalence. Keep the checked build for existing experiments unless you separately validate the selected performance settings.
The local working copy currently uses the checked configuration and a freshly rebuilt serial T21 executable. See docs/performance.md for timings and test limits.
Run timeout 90 .venv/bin/python scripts/test-build-modes.py to test GNU Fortran configuration in disposable directories. The tests cover default flags, explicit native flags, debug preservation, precision flags, MPI flag propagation, help, and invalid arguments.