As the Center transitions from Grid Engine HPC scheduling to SLURM scheduling, here are a few tips on how to convert a grid engine batch job to a slurm batch job.
In grid engine, special comments in a shell script are used to pass parameters to grid engine. Slurm uses the same convention of a shell with “special comments” to tell slurm about the job, and the parameters have slightly different names.
In slurm, the comments start with #SBATCH .
For instance, in Grid Engine,
#$ -l h_vmem=12g
requests 12gb of ram
#$ -l h_cpu=2:00:00
requests 2 hours of cpu.
In SLURM, the special comments are #SBATCH
Requests 12gb of ram
request 2 hours of WALL time (note, not cpu)
To submit a job script, use the “sbatch” command.
For instance, here is a sample sbatch script “mysbatch.sbatch
module load matlab/2019a
matlab -nosplash -nodesktop -nojvm -nodisplay < mymatjob.m
To submit it, just type:
The “squeue” command will show you what is running (like the qstat command in SGE).