This function prepares SLURM files for models that have not been successfully fitted yet. It generates command files for refitting and creates corresponding SLURM batch files to execute these commands on a HPC environment.
Usage
Mod_SLURM_Refit(
ModelDir = NULL,
NumArrayJobs = 210,
JobName = NULL,
MemPerCpu = NULL,
Time = NULL,
Partition = "small-g",
EnvFile = ".env",
CatJobInfo = TRUE,
ntasks = 1,
CpusPerTask = 1,
GpusPerNode = 1,
FromHPC = TRUE,
PrepSLURM = TRUE,
Path_Hmsc = NULL,
Refit_Prefix = "Commands2Refit",
SLURM_Prefix = "Bash_Refit"
)
Arguments
- ModelDir
String. Path to the model files directory. Must not end with a slash.
- NumArrayJobs
Integer specifying the maximum number of array jobs per SLURM script. Default: 210. See LUMI documentation for more details.
- JobName
String. The name of the submitted job(s).
- MemPerCpu
String. Memory per CPU allocation for the SLURM job. Example:
32G
for 32 gigabytes. Defaults toNULL
. If not provided, the function will throw an error.- Time
String. Duration for which the job should run. Example:
01:00:00
for one hour. If not provided, the function will throw an error.- Partition
String. The name of the partition. Default:
small-g
for running the array jobs on the GPU.- EnvFile
String. Path to read the environment variables. Default value:
.env
.- CatJobInfo
Logical. Add bash lines to print information on the submitted job. Default:
TRUE
.- ntasks
Integer. The value for the
#SBATCH --ntasks=
SLURM argument. Default: 1.- CpusPerTask
Integer. The value for the
#SBATCH --cpus-per-task=
SLURM argument. Default: 1.- GpusPerNode
Integer. The value for the
#SBATCH --gpus-per-node=
SLURM argument. Default: 1.- FromHPC
Logical. Indicates if the operation is being performed from an HPC environment. This adjusts file paths accordingly. Default:
TRUE
.- PrepSLURM
Logical indicating whether to prepare SLURM command files. If
TRUE
(default), the SLURM commands will be saved to disk using the Mod_SLURM function.- Path_Hmsc
String. Path for the Hmsc-HPC.
- Refit_Prefix
String. Prefix for the files that contain the commands to refit the models.
- SLURM_Prefix
String. Prefix for the exported SLURM file.