Advanced use of SLURM

For programs that make more complex use of cluster resources, such as parallel and distributed programs, CUDA, etc., slanzarv script may not be sufficient to describe the job requirements.

In such a case, or simply because it is preferred, SLURM can be used directly.

The usage mode would be to create a script with the job specifications and then send it to execution via sbatch.

Example of a job description script:

#!/bin/sh
#SBATCH -N 2 #(solicita dos nodos)
#SBATCH -n 2 #(dos tareas en total)
#SBATCH -p short #(solicita la partición específica. Pueden solicitarse varias separadas por comas)
#SBATCH -t 00:00:30 #(30 sec ejecución)
srun hostname

In the script a series of resources and execution time are requested in a specific partition and finally the program (hostname) is executed.

If we called the script job.sh, it would send to SLURM with:

$ sbatch ./job.sh

The sbatch options can also be specified via sbatch, at the time of submission. The options specified in this way take precedence over those in the script. So, to send the above script to the htc-general partition, without changing the script, you would run:

$ sbatch -p htc-general ./job.sh
_

Do you need more info?

_