...
Column |
---|
Table 2. List of options for PBS Pro and Slurm Option | PBS Pro | Slurm |
---|
Script directive | #PBS | #SBATCH | Job name | -N [name] | --job-name=[name] | Queue | -q [queue] | --partition=[queue] | Accounting | -W group_list=[acct] | --account=[acct] | Wall clock limit | -l walltime=[hh:mm:ss] | --time=[hh:mm:ss] | Select | -l select=[chunk] | --nodes=[chunk] | Node count | -l nodes=[count] | --nodes=[count] | CPU count | -l mpiprocs=[count]
-l ppn=[count]
-l mppwidth=[count] | --ntasks-per-node=[count]
(alternatively use --ntasks -per-node=[count]option) | OpenMP threads | -l ompthreads=[nthr] | --cpus-per-task=[nthr] | Memory size | -l mem=[MB] | --mem=[mem][M|G|T]
--mem-per-cpu=[mem][M|G|T] | Standard output file | -o [filename] | --output=[filename] | Standard error file | -e [filename] | --error=[filename] | Combine stdout/stderr | -j oe (to stdout) | (this is the default behaviour if --output is used without –-error ) | Copy environment | -V | --export=ALL (default) | Copy environment variable | -v [var] | --export=var | Job dependency | -W depend=[state:jobid] | --dependency=[state:jobid] | Event notification | -m abe | --mail-type=[events] | Email address | -M [address] | --mail-user=[address] |
|
...
Column |
---|
|
Code Block |
---|
language | bash |
---|
theme | Emacs |
---|
title | Listing 4. A simple Slurm batch script |
---|
linenumbers | true |
---|
| #!/bin/bash -l
# 10 nodes, 2432 MPI processes/node, 240320 MPI processes total
#SBATCH --job-name="myjob"
#SBATCH --time=02:00:00
#SBATCH --ntasks=240320
#SBATCH --ntasks-per-node=24=32
#SBACTH --cpus-per-task=1
#SBATCH --mem=58G
#SBATCH --output=myjob.%j.o
#SBATCH --error=myjob.%j.e
#SBATCH --account=projectcode
#SBATCH --export=NONE
#======START=====
echo "The current job ID is $SLURM_JOB_ID"
echo "Running on $SLURM_JOB_NUM_NODES nodes"
echo "Using $SLURM_NTASKS_PER_NODE tasks per node"
echo "A total of $SLURM_NTASKS tasks is used"
echo "Node list:"
sacct --format=JobID,NodeList%100 -j $SLURM_JOB_ID
srun --export=ALL -uu -N $SLURM_JOB_NUM_NODES -n $SLURM_NTASKS -c $SLURM_CPUS_PER_TASK ./a.out
#=====END==== |
|
Line 1 invokes the shell (bash), and line 2 is a comment.
...