Testing and regression gates#
COCAL has three regression gates, fastest first. All builds run against a
Kokkos 5.1.1 installation selected by COCAL_KOKKOS_VARIANT
(cpu | ada89 | hopper90). The canonical paths and CMake flags live
in scripts/cocal_build_env.sh.
Important
Never build on the login node — its per-user cgroup OOM-kills the
compiler on the heavy Kokkos translation units. Submit builds to a compute
node; the sbatch scripts below already do this.
1. Fast unit (numerics) — seconds#
Leaf-math golden tests (tests/smoke_functions.cpp) use no Kokkos
initialization and run on the host. This is the gate CI runs on every push.
# Host (CPU) build on a compute node, then run the fast label
COCAL_KOKKOS_VARIANT=cpu ./scripts/submit.sh build
ctest --test-dir build -L fast --output-on-failure
2 and 3. End-to-end physics baseline — minutes (GPU via SLURM)#
Build pRNS_WL, run the H2 / K180.7 configuration capped at two SCF
iterations (COCAL_ITER_MAX=2, matching the deterministic baseline), and
compare the final physics scalars to
tests/e2e/baseline_RNSH2_K180.7.txt.
The tolerance is 1e-12 relative with a 1e-12 absolute floor in double
precision. The floor allows symmetry-zero scalars, such as off-axis
circulations, to pass when they agree absolutely. See
tests/e2e/compare_physq.py.
# GPU gate on SLURM (L40S/ada89 by default)
sbatch ci/slurm_e2e_gpu.sbatch # account yuxilab
# H100:
COCAL_KOKKOS_VARIANT=hopper90 sbatch --gres=gpu:H100:1 ci/slurm_e2e_gpu.sbatch
# Or, on an interactive GPU node, use the wrapper or CTest directly:
bash tests/e2e/run_e2e.sh 8 1e-12
ctest --test-dir build -L e2e --output-on-failure
Refresh the baseline only deliberately when the physics is expected to change.
A behavior-preserving refactor must not move it; see
tests/e2e/README.md.
CI#
.github/workflows/ci.yml runs gate 1 on every push with the host Kokkos
5.1.1 build, using Serial+OpenMP. Gates 2 and 3 require a GPU and run on
SLURM through ci/slurm_e2e_gpu.sbatch, nightly or before merging refactor
work.