Resource allocation is the basic skill required to use the cluster.
By default, each task will be assigned one node with 2 cores and 4GB memory. Default values can be changed using the srun command options.
By allocating too much resources the user blocks these resources from using them by other users.
Such behavior will result in a warning and further abuse will lead to lower priority for cluster start-up.
Tasks that have insufficient resources allocated will not end due to the passage of time or will be retained by resource allocation and supervision systems (e.g. oom-killer, cgroups).
The most useful options are:
Option | Default value | Description | |
---|---|---|---|
--account= account | First service to which the user has been assigned | Account services that will be charged with used resources | |
--nodes= I_Node | 1 | Number of calculation nodes | |
--ntask= l_task | 1 | Number of sub-tasks in the application | |
--cpus-per-task= l_cpu | 2 | Number of cores per sub-heading | |
--mem= I_mem | 4 | Amount of memory (in gigabytes) per node | |
--time= l_time | 1 | Time limit for task in minutes. Alternatively, you can specify time in the form of hh:mm:ss | |
--partition= partition | normal | The name of the partition on which the task will be executed. The names of the available partitions can be obtained by command sinfo . | |
--nodelist= _Node list | The list of nodes on which the tasks will be running. The list of nodes can be displayed using the command sinfo |
Below are some examples of resource allocation
Run the task on partition short using 3 nodes
srun --partition=short --nodes=3 myjob.sh
Run the task on the default partition using 3 nodes, 2 cpus and 10GB for each task.
srun --mem=10gb --cpu-per-task=2 --nodes=3 --time=20 myjob.sh
For more information see running tasks.
Resources should be allocated within the cluster capacity. If you request 300 cores on one node, such a request will be rejected or queued, but will never be started.
Such allocations will be removed by administrators without warning.
Resources in batch tasks can be reserved using the options given from the command line (see interactive task) or in the task script.
Such a script may contain the following parameters:
Parameters | Description |
---|---|
#SBATCH -N2 | Number of calculation nodes set to 2 |
#SBATCH -c10 | Number of cores per task (10 cores) |
#SBATCH -mem=10gb | Memory for Task (10 gigabytes) |
#SBATCH --time=1:00:00 | time limit set to 1h |