Orchestrates remote SLURM array jobs over SSH/SCP with zero dependency on
ZeroMQ or open worker ports. Stages self-contained bundles (payload.rds,
chunks.rds, standalone worker.R, and submit.sbatch), submits array jobs
with sbatch --parsable, reconciles live squeue and sacct telemetry,
performs surgical retries of failed array indices with optional --mem /
--time scaling, and retrieves completed checkpoints via scp.
Accepts an injectable command_runner callback (defaulting to
processx::run) and dry_run = TRUE mode so every SSH/SLURM workflow can be
verified offline in contract and snapshot tests.
Super class
SlurmBackend -> SlurmSshBackend
Public fields
nameBackend identifier (
"slurm_ssh").hostRemote SLURM login node hostname.
userOptional SSH username.
remote_dirBase directory on the remote cluster for job workspaces.
local_stage_dirLocal staging directory for job bundles and retrieved artifacts.
portSSH port (default
22L).ssh_keyOptional SSH private key path.
ssh_optionsOptional extra SSH/SCP flags.
partitionOptional default SLURM partition.
accountOptional default SLURM account.
qosOptional default SLURM QOS.
container_sifOptional default remote Apptainer
.sifpath.container_bindsOptional Apptainer
--bindmounts.modulesOptional HPC environment modules loaded in
sbatch.dry_runLogical; if
TRUE, stages bundles locally and records commands without executing SSH/SCP.ssh_max_retriesNon-negative integer transient SSH/SCP retry limit (default
2L).ssh_retry_base_secBase delay in seconds for bounded exponential SSH backoff (default
0.5).ssh_retry_max_secMaximum backoff delay cap in seconds (default
8.0).command_runnerFunction
(cmd, args)returninglist(status, stdout, stderr).
Methods
Inherited methods
SlurmSshBackend$new()
Create a new SlurmSshBackend.
Usage
SlurmSshBackend$new(
host,
user = NULL,
remote_dir = "~/slurmpilot_jobs",
local_stage_dir = NULL,
port = 22L,
ssh_key = NULL,
ssh_options = character(),
partition = NULL,
account = NULL,
qos = NULL,
container_sif = NULL,
container_binds = character(),
modules = character(),
dry_run = FALSE,
ssh_max_retries = 2L,
ssh_retry_base_sec = 0.5,
ssh_retry_max_sec = 8,
command_runner = NULL
)Arguments
hostRemote SLURM cluster hostname.
userOptional SSH username.
remote_dirBase remote workspace directory. Default
"~/slurmpilot_jobs".local_stage_dirLocal staging directory. Defaults to a temporary directory.
portSSH port integer. Default
22L.ssh_keyOptional private SSH key path.
ssh_optionsOptional extra SSH options.
partitionOptional default SLURM
--partition.accountOptional default SLURM
--account.qosOptional default SLURM
--qos.container_sifOptional remote path to Apptainer
.sifimage.container_bindsOptional character vector of Apptainer bind mounts.
modulesOptional character vector of HPC modules to load.
dry_runLogical; record commands without making network calls. Default
FALSE.ssh_max_retriesNon-negative integer retries on transient SSH/SCP transport errors. Default
2L.ssh_retry_base_secBase backoff delay in seconds. Default
0.5.ssh_retry_max_secMaximum backoff delay cap in seconds. Default
8.0.command_runnerOptional runner
function(cmd, args)overridingprocessx::run.
SlurmSshBackend$submit()
Stage and submit a SLURM array job over SSH/SCP.
SlurmSshBackend$retry()
Surgically resubmit only failed/OOM/timeout/cancelled array indices.
SlurmSshBackend$collect()
Retrieve remote chunk checkpoints via SCP and collect ordered task results.
