Running a single command in cluster

At times, you just want to run a command in the cluster, and you do not want to build a whole jobscript just for that. There's still a way. Slurm provides an option such that it can automatically build the wrapper script for your command itself based on options you supply to sbatch.

For example:

asampath@console1:[~] > sbatch -p nav -n 4 --wrap="sas hello.sas"
Submitted batch job 453

Where, the command - sas hello.sas is executed as a batch job on a compute node using the "nav" queue with a reservation of 4 cpus.

If you do not specify the requests for resources, the defaults will apply.

In GHPC,

default queue = ghpc

default number of cpus = 2

default amount of memory = 20 GiB

default stdout and stderr file = slurm-jobid.out in the directory where you run the command from.

default jobname = wrap

or you can specify all of the options yourself as in the example:

asampath@console1:[~] > sbatch -p nav -n 4 -J SAS_test --mem=1024 -o sas_test.out -e sas_test.err --wrap="sas hello.sas"
Submitted batch job 455