csauto reads its configuration from a TOML file and environment variables.
csauto finds csauto.toml in this order (first match wins):
--config /path/to/csauto.toml(CLI flag)CSAUTO_CONFIGenvironment variable./csauto.toml(current working directory)<repo_root>/csauto.toml(repository root, i.e. parent of thecsauto/package)
If no file is found, all default values are used.
# Use the code_saturne binary installed on the machine
runtime = "native"
saturne_bin = "/opt/code_saturne/bin/code_saturne"
# No Slurm, run up to 2 cases at the same time
use_slurm = false
max_parallel = 2
# Web UI: accessible only from this machine
host = "127.0.0.1"
port = 8000# Native code_saturne on the compute nodes
runtime = "native"
saturne_bin = "/opt/code_saturne/bin/code_saturne"
# Submit each case as a Slurm job
use_slurm = true
# MPI options injected via CS_MPIEXEC_OPTIONS for each sbatch job
mpi_exec_options = "--mca btl vader,self,tcp --bind-to core"
# Allow up to 20 jobs in the queue simultaneously
max_parallel = 20
# Serve UI on login node, tunnel with: ssh -L 8000:127.0.0.1:8000 login-node
host = "127.0.0.1"
port = 8000runtime = "singularity"
singularity_image = "/opt/images/code_saturne.sif"
singularity_bin = "/usr/bin/apptainer" # optional: auto-detected if in PATH
use_slurm = false
max_parallel = 2
host = "127.0.0.1"
port = 8000With use_slurm = true, csauto submits a dedicated batch script for the
Singularity runtime. The job follows the same pattern as a manual HPC launch:
code_saturne run --stage --initialize, then srun ./cs_solver --mpi, then
code_saturne run --finalize.
runtime = "docker"
docker_image = "simvia/code_saturne"
use_slurm = false
max_parallel = 2
host = "127.0.0.1"
port = 8000runtime = "native"
saturne_bin = "/opt/code_saturne/bin/code_saturne"
use_slurm = false
max_parallel = 4
# Expose UI to all interfaces
host = "0.0.0.0"
port = 8000
# Required when host is not 127.0.0.1 or localhost
[api]
token = "your-secret-token"| Key | Default | Description |
|---|---|---|
solver |
code_saturne |
Solver adapter used for command building, output parsing, and file conventions (code_saturne, or stub for testing; see architecture.md) |
runtime |
auto |
Execution backend: auto, native, docker, or singularity |
saturne_bin |
(auto-detected) | Path to the code_saturne binary for native runtime |
docker_image |
simvia/code_saturne |
Docker image name for docker runtime |
singularity_image |
(none) | Path or URI to .sif image for singularity runtime |
singularity_bin |
(auto-detected) | Path to apptainer or singularity binary |
use_slurm |
(auto-detected) | true to force Slurm submission, false to force local |
mpi_exec_options |
(none) | Options injected as CS_MPIEXEC_OPTIONS in Slurm jobs |
max_parallel |
1 |
Maximum simultaneous case launches |
mesh_mode |
symlink |
How prepare places the shared MESH/POST dirs into RUNS/: symlink or copy (see concepts.md) |
host |
127.0.0.1 |
Bind address for serve |
port |
8000 |
Bind port for serve |
[api].token |
(none) | API authentication token |
| Variable | Description |
|---|---|
CSAUTO_CONFIG |
Explicit path to csauto.toml |
CSAUTO_USE_SLURM |
Override Slurm mode: 1/true/yes/on or 0/false/no/off |
DISPLAY |
Required for GUI launch (Open GUI from the web UI) |
Runtime: CLI flags (--runtime, --saturne-bin, etc.) override the TOML values.
Slurm detection order:
use_slurmincsauto.toml— if set, this is authoritativeCSAUTO_USE_SLURMenvironment variable- Auto-detection: checks if
sbatchis inPATHand Slurm environment variables are set
API token: serve --token overrides [api].token from config.
When runtime = "auto", csauto tries backends in this order:
- Explicit
saturne_binset → usenative - Explicit
singularity_imageset → usesingularity dockercommand available → usedockercode_saturneinPATH→ usenative- None found → error
When Slurm submission is active and mpi_exec_options is set, the value is
injected as:
CS_MPIEXEC_OPTIONS="<mpi_exec_options>" <code_saturne run command>If not set, no CS_MPIEXEC_OPTIONS is injected.