Skip to content

Usage tips#

Tip: Slurm memory limits and Job efficiency

Slurm imposes a memory limit on each job. By default, it is deliberately relatively small — 2 GB per node. If your job uses more than that, you’ll get an error that your job Exceeded job memory limit. To set a larger limit, add to your job submission:

Look at Slurm memory limits

Tip: Reserve full compute nodes?

On compute nodes, it is possible to reserve full nodes using the -N <nodes> option and -ntask=<num_task> or any combination of --cpus-per-task=<num_threads> or --ntasks-per-node=<num_task>, so as not to interfere with the execution of other users.

On GPUs nodes, we recommend study your jobs before taking a full GPU.

Find out about our types of nodes and GPUs at

Remember that our billing is core per hour

Tip: Task per node

It is possible to run without using all available cores on the node. To do this, you only have to request the number of nodes with -N X and the number of processes to execute on each node with --tasks-per-node.

```batch
srun -N 4 --tasks-per-node=8 <software>

#SBATCH --N 4
#SBATCH --tasks-per-node=8
```

Tip: Slurm notifications

Automatic notification of certain job events can be managed with the following directives.

#SBATCH --mail-user=EMAIL                  # Email to send events
#SBATCH --mail-type=EVENT1,EVENT2,...      # Events to be reported
  • Explanation on Slurm's mail events:

Slurm can send mails to the specified email address about a series of events occurring to the job. These events can be:

  • BEGIN: The job is executed.
  • END: The execution of the job has been finished
  • FAIL: The job has failed.
  • TIME_LIMIT: The job reaches the maximum execution time.
  • TIME_LIMIT_50: The work has reached 50% of the time limit.
  • TIME_LIMIT_80: The work has reached 80% of the time limit.
  • TIME_LIMIT_90: The work has reached 90% of the time limit.
  • ARRAY_TASKS: Sends an email notification for each job in the array. If, when using arrays, this option is not specified, an email will be sent as if it were a single job.
  • ALL: All types of events.

We recommend using the ones related to the allowed time limit consumption, TIME_LIMIT_50, TIME_LIMIT_80 and TIME_LIMIT_90. In this way, the user is aware of the time left for the job and, if necessary, can send an email to the administrators in time to extend the execution time of the job.