Usage tips#
Tip: Using modules in a script
In order to use the modules environment, it is necessary to source the modules profile file. To do this, the following line must be added to the submit scripts before using any modules command:
source /etc/profile.d/profile.modules.sh
Tip: Reserve full compute nodes
On compute nodes, it is recommended to reserve full nodes using the -N <nodes
option, so as not to interfere with the execution of other users. Remember that billing for these nodes is per node usage.
Tip: Submit a job with sbatch
We advise submitting the job via sbatch and using -D <directory\>
and -t <time\>
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.