batch_submit: Submit an existing slurm batch script

View source: R/batch_submit.R

batch_submitR Documentation

Submit an existing slurm batch script

Description

Given an existing batch script, this script calls sbatch with parameters and gets job submitted. Ideal to simplify big loops.

Usage

batch_submit(name)

Arguments

name

Either the full batch job file path, or its base name (excluding the extension .q). Must exist.

See Also

batch_writer() to write slurm batch scripts. batch_cleanup() to remove slurm batch scripts.

Examples


# set desired parameters
commands <- 'time echo "Hello world!"'
name <- 'hola'
mem <- '1G'

# writes file `hola.q`
batch_writer(
    commands,
    name,
    mem
)

# this submits `hola.q`:
batch_submit( 'hola' )

# cleanup
batch_cleanup( name )


OchoaLab/ochoalabtools documentation built on July 28, 2024, 12:37 p.m.