Running on a Cluster#
This page documents submitting and running COCAL on a cluster (via
./scripts/submit.sh), how to choose run-time physics, where outputs land,
reproducing validated test cases, and common troubleshooting notes.
Basic run#
Set run-time environment variables and submit a run job:
export COCAL_ROT_LAW=DR COCAL_NUM_SOL_SEQ=35
./scripts/submit.sh run
The helper submit.sh accepts additional sbatch options after --;
these are passed through directly. Example:
./scripts/submit.sh run -- --partition=gpuMI100x8 --time=04:00:00
Build vs run#
There are two submission modes used during development:
./scripts/submit.sh build— submits a compute-node compile-only job toperform the slow cold build of
pRNS_WL(useful to warm the build tree).
./scripts/submit.sh run— performs a fast incremental rebuild and thenlaunches the solver.
These are separate sbatch submissions. Wait for a completed build job
before submitting run if you rely on the cold build; otherwise both jobs
may compile into the same build-<variant>/ tree and race, causing
intermittent failures. Monitor with:
squeue -u $USER
Choosing the physics#
The defaults are uniform rotation (UR) and one solution. Override them
before submitting when needed, for example:
export COCAL_ROT_LAW=DR COCAL_NUM_SOL_SEQ=35
./scripts/submit.sh run
See Rapidly Rotating Neutron Star for supported rotation laws and the other physics options.
Where output goes#
Two places hold result information:
logs/at the repo root — SLURM job stdout/stderr named<job-name>_<job-id>.- The run directory under the build tree (
build-<variant>/...) — staged parameter files and solution directories.
- The run directory under the build tree (
Typical layout:
logs/cocal-DR-hopper90_20253856.out
logs/cocal-DR-hopper90_20253856.err
build-hopper90/RNSH3_K180.7_run_20253856/
run.log -> ../../logs/cocal-DR-hopper90_20253856.out
work_area_RNS_seq/sol_01/ ... sol_35/
The SLURM log contains everything printed by the job (incremental compile,
solver progress, and final messages). The run directory is named from the
parameter set and job id and contains the staged COCAL tree and solution files
(.las field files under work_area_RNS_seq/sol_NN/).
Troubleshooting and notes#
- Do not compile on a login node; compile on a compute node via
./scripts/submit.sh buildto avoid the compiler being killed.
COCAL_KEEP_RUN_DIR: the staging script tests for non-empty, not truthysemantics — setting it to
0still keeps the directory; to delete the run directory,unset COCAL_KEEP_RUN_DIR.
- If you see
cocal_build_env: no config.sh at /path/to/config.shmake a local copy from the template:
cp config.template.sh config.sh
- If you see
- If
COCAL_KOKKOS_ROOTis unset you copied the template but did not edit it; set it to point at your
sw-buildcopy.
- If
- If a job reports
no Kokkos install at .../lib/cmake/Kokkos, run ./scripts/submit.sh kokkosfor the missing backend to build an install or pointCOCAL_KOKKOS_DIRat an existing install.
- If a job reports
compiler 'hipcc' not foundindicates the job landed on a node without therequired toolchain; check the partition in the corresponding
COCAL_SLURM_*line inconfig.sh.
- Variables set as temporary assignments with
VAR=x source ...may read back empty; prefer
export VAR=xon its own line.
- Variables set as temporary assignments with