Actions

Generic resource requirements

From ALICE Documentation

Revision as of 11:14, 7 May 2020 by Dijkbvan (talk | contribs)

Generic resource requirements

The sbatch command takes several options to specify the requirements, of which we list the most commonly used ones below.

 $ sbatch --time=2:30:00

For the simplest cases, only the amount of maximum estimated execution time (called“walltime”) is really important. Here, the job requests 2 hours, 30 minutes. As soon as the job exceeds the requested walltime, it will be “killed” (terminated) by the job scheduler. There is no harm if you slightly overestimate the maximum execution time. If you omit this option, the queue manager will not complain but use a default value (one hour on most clusters). If you want to run some final steps (for example to copy files back) before the walltime kills your main process, you have to kill the main command yourself before the walltime runs out and then copy the file back. See section Running a command with a maximum time limit for how to do this.

 $ sbatch --mem=4gb

The job requests 4 GB of RAM memory. As soon as the job tries to use more memory, it will be “killed” (terminated) by the job scheduler. There is no harm if you slightly overestimate the requested memory.

 $ sbatch --ntasks=5 --ntasks-per-node=2

The job requests 5 compute nodes with two cores on each node ( “processors per node”, where "processors" here actually means "CPU cores").

 $ sbatch --ntasks=1 -–constraint=westmere

The job requests just one node, but it should have an Intel Westmere processor. A list with site-specific properties can be found here. These options can either be specified on the command line, e.g.

 $ sbatch --ntasks=1 --mem==2gb --job-name=fibo.sh

or in the job script itself using the #PBS-directive, so “fibo.sh” could be modified to:

 #!/bin/bash -l  
 #sbatch --ntasks=1  
 #sbatch --mem=2gb  
 cd $SLURM_SUBMIT_DIR 
 ./fibo.sh

Note that the resources requested on the command line will override those specified in the Slurm file.