Slurm queue system :
The principle of a resource manager is to reserve computing cores according to your needs.
You interact with the resource manager with the following commands:
sbatch : submission of a job in a queue (called partitions in Slurm);
scancel : canncel a job ;
squeue : job interrogation ;
sinfo :Queue Query ;
srun : immediate execution of an order ;
How to launch a "Job" :
To launch a job, you must create a script in which you must request resources and then call its program (see the following example).
#!/bin/bash
#SBATCH -J test # Job name
#SBATCH -o job.%j.out # Name of stdout output file (%j expands to %jobId)
#SBATCH -N 2 # Total number of nodes requested
#SBATCH -n 16 # Total number of mpi tasks #requested
#SBATCH -t 01:30:00 # Run time (hh:mm:ss) - 1.5 hours
# Launch MPI-based executable
prun ./a.out
# Submit job for batch execution
This script is then submitted to the queue manager with the sbatch command. for example :
# Submit job for batch execution
[test@sms ~]$ sbatch job.mpi
Submitted batch job 339
We then obtain a job number, which can be manipulated with the scancel or squeue commands.
Track the status of a job:
It is possible to obtain the detail of the status of a job, whether it is pending or in execution, with the scontrol or squeue commands.
List of current jobs:
squeue
Detail of the status of a job :
scontrol show job
Script for :
* Yt + Enzo ( yt.mpi )
* Gaussian09 (gaussian09.mpi )