Preset of Configuration for the RSPH Cluster
Usage
swf_configs_rsph(
partition = "preemptable",
r_version = "4.5.1",
mail_user = NULL,
cleanup_workers = TRUE
)Arguments
- partition
Which partition to use on RSPH (either "compute" or "epimodel")
- r_version
Which version of R to load
- mail_user
The mail address to send the messages to, default is NULL (see 'sbatch –mail-type' argument)
- cleanup_workers
If
TRUE(the default), appendswf_cleanup_r_workerstor_loaderso each step reaps its own R workers on cancel or timeout. RSPH has no cgroup containment, so without this, workers survivescanceland squat on cores SLURM has re-allocated, starving later tasks. Seeswf_cleanup_r_workers.
Value
a list containing default_sbatch_opts, renv_sbatch_opts
and r_loader (see the "hpc_configs" section)
Node setup
r_loader sources the shared spack environment, unloads everything, and
loads R. It deliberately does not load git: git is on the default path on
RSPH, and the project template has not loaded it for some time. The
git_version argument was removed accordingly.
hpc_configs
default_sbatch_optsis a list of sbatch options to be passed toslurmworkflow::create_workflow.renv_sbatch_optsis a list of sbatch options to be passed toslurmworkflow::step_tmpl_renv_restore. It provides sane defaults for building the dependencies of an R project usingrenvr_loaderis a set of bash lines to make the R software available. This is passed to thesetup_linesarguments of theslurmworkflow::step_tmpl_functions that requires it.