Slurm
Module for preparing files necessary to run simulations using the SLURM workload manager.
run_slurm_prep(dir_work, path_slurm_write, simlify_config)
¶
Prepares the necessary files for running simulations using the SLURM workload manager.
This function takes a working directory, a path for the SLURM submission script, and
the Simlify configuration. It ensures that the working directory exists and then renders
a SLURM submission script based on the SLURM configuration found within the provided
simlify_config
. This script is then written to the specified path within the working
directory.
PARAMETER | DESCRIPTION |
---|---|
dir_work
|
The absolute or relative path to the local directory where the simulation files, including the SLURM submission script, will be written. This directory will be created if it does not already exist.
TYPE:
|
path_slurm_write
|
The path to write the SLURM submission script, relative to
the
TYPE:
|
simlify_config
|
An instance of the Simlify configuration object,
which should contain a
TYPE:
|
RAISES | DESCRIPTION |
---|---|
OSError
|
If there is an error creating the working directory or writing the SLURM submission script. |
Examples:
To prepare SLURM files for a simulation in the directory "my_simulation" and write the submission script to "submit.sh":