Skip to content

Getting started

Installing slurmtools

slurmtools can be installed with pak:

#install.packages("pak")
pak::pkg_install("a2-ai/slurmtools")

Once installed, load slurmtools with:

library(slurmtools)

slurmtools options

When slurmtools loads, you’ll see an onAttach message listing several options that can be set for convenience when submitting jobs:

── Needed slurmtools options ────────────────────── options(‘slurmtools.slurm_job_template_path’) is not set. options(‘slurmtools.submission_root’) is not set. options(‘slurmtools.bbi_config_path’) is not set. Please set all options for job submission defaults to work.

These options are used in submit_slurm_job and help slurmtools locate specific files and directories for job submissions. While the message suggests that these options are necessary, they primarily save time by avoiding repeated typing when submitting multiple jobs. Here’s what each option should be set to:

  1. options('slurmtools.slum_job_template_path') - the template file that will be populated for submitting jobs
  2. options('slurmtools.submission_root') - the path to the directory where slurm jobs are submitted from
  3. options('slurmtools.bbi_config_path') - the path of the bbi.yaml config file

If you set these options before loading slurmtools, you’ll see a confirmation message:

── Set slurmtools options ───────────────────────── slurmtools.slurm_jon_template_path: nonmem/slurm-job.tmpl slurmtools.submission_root: nonmem/submission-root/ slurmtools.bbi_config_path: nonmem/bbi.yaml

If only some options are set, slurmtools will show which ones still need setting:

── Set slurmtools options ───────────────────────── slurmtools.slurm_jon_template_path: nonmem/slurm-job.tmpl slurmtools.submission_root: nonmem/submission-root/── Needed slurmtools options ─────────────────────── options(‘slurmtools.bbi_config_path’) is not set. Please set all options for job submission defaults to work.

With these options set (or if you’re aware of their use), you’re all set to work with slurmtools!