Cluster functions for Slurm (https://slurm.schedmd.com/).
Job files are created based on the brew template
file is processed with brew and then submitted to the queue using the
sbatch command. Jobs are killed using the
scancel command and
the list of running jobs is retrieved using
squeue. The user must
have the appropriate privileges to submit, delete and list jobs on the
cluster (this is usually the case).
The template file can access all resources passed to
as well as all variables stored in the
It is the template file's job to choose a queue for the job and handle the desired resource
Note that you might have to specify the cluster name here if you do not want to use the default, otherwise the commands for listing and killing jobs will not work.
makeClusterFunctionsSlurm( template = "slurm", array.jobs = TRUE, nodename = "localhost", scheduler.latency = 1, fs.latency = 65 )
Either a path to a brew template file (with extension “tmpl”), or a short descriptive name enabling the following heuristic for the file lookup:
“batchtools.[template].tmpl” in the path specified by the environment variable “R_BATCHTOOLS_SEARCH_PATH”.
“batchtools.[template].tmpl” in the current working directory.
“[template].tmpl” in the user config directory (see
user_config_dir); on linux this is usually “~/.config/batchtools/[template].tmpl”.
“.batchtools.[template].tmpl” in the home directory.
“[template].tmpl” in the package installation directory in the subfolder “templates”.
If array jobs are disabled on the computing site, set to
Nodename of the master host. All commands are send via SSH to this host. Only works iff
Passwordless authentication (e.g., via SSH public key authentication) is set up.
The file directory is shared across machines, e.g. mounted via SSHFS.
Either the absolute path to the
file.dir is identical on the machines, or paths are provided relative to the home directory. Symbolic links should work.
Time to sleep after important interactions with the scheduler to ensure a sane state. Currently only triggered after calling
Expected maximum latency of the file system, in seconds. Set to a positive number for network file systems like NFS which enables more robust (but also more expensive) mechanisms to access files and directories. Usually safe to set to
0 to disable the heuristic, e.g. if you are working on a local file system.