| Beide Seiten der vorigen Revision Vorhergehende Überarbeitung | |
| hpc:hpc_tubit:slurm_usage:general_commands [2018/10/30 18:14] – kraus | hpc:hpc_tubit:slurm_usage:general_commands [2018/10/30 18:15] (aktuell) – [Useful combination of arguments for srun/sbatch/salloc] kraus |
|---|
| | ====== Commands ====== |
| | |
| | \\ |
| | |
| | ===== Common Commands ===== |
| | |
| | - slurm (introduction) |
| | - launching jobs: **salloc** (resource reservation for jobs) && **srun** (jobs and job steps running tasks) |
| | - batch jobs: **sbatch** (batch jobs to queue) |
| | - **scancel** (signal/stop running jobs) |
| | - **sstat** (infos wrt. running jobs) |
| | - **squeue** (show queues) |
| | - sinfo (show node infos) |
| | |
| | ==== STUBL Tools ==== |
| | |
| | - snodes (list node features; wrapper for sinfo) |
| | - sqstat (list job queues and cluster status information) |
| | |
| | \\ |
| | |
| | ===== Manpages ===== |
| | |
| | * ''man 1 sbatch'' |
| | * ''man 1 srun'' |
| | * ''man 1 salloc'' |
| | * ''man 1 scancel'' |
| | * ''man 1 squeue'' |
| | * ''man 1 sinfo'' |
| | \\ |
| | |
| | ===== Important switches for sbatch/srun/salloc ===== |
| | |
| | - ''-a <index_range>'' <html> <span style="white-space:pre"> </span> </html>job array with index range, e.g. ''-a 0,1,4-6'' or ''-a 0-8:2'' (environment variables available: **SLURM_ARRAY_TASK_ID**, **SLURM_ARRAY_JOB_ID**, **SLURM_ARRAY_TASK_COUNT** etc.) |
| | - '' -d <dependency_list>'' <html> <span style="white-space:pre"> </span> </html>define dependencies on other jobs (dependency_list: **after:job_id[:job_id]** or **afterok:job_id[:job_id]** and so on) |
| | - <html>--</html>''begin=<time_string>'' <html> <span style="white-space:pre"> </span> </html>(absolute/relative) start time of job (see ''man 1 sbatch'') |
| | - <html>--</html>''deadline=<time_string>'' <html> <span style="white-space:pre"> </span> </html>job only scheduled as long as it finishes before deadline |
| | - <html>--</html>''mem=<amount[T|G|M|K]>'' <html> <span style="white-space:pre"> </span> </html>amount of **virtual memory per node** to allocate, e.g. 1G (1 Gibibyte) |
| | - ''-t <time>'' set job's wall clock time |
| | - ''-e <file>'' <html> <span style="white-space:pre"> </span> </html>where to redirect error output |
| | - ''-o <file>'' <html> <span style="white-space:pre"> </span> </html>where to redirect stdout |
| | - ''-i <file>'' <html> <span style="white-space:pre"> </span> </html>read stdin for job script from file |
| | - ''-J <job_name>'' |
| | - ''-n <ntasks>'' <html> <span style="white-space:pre"> </span> </html>the overall amount of task (all nodes); does NOT accept range of task number :-( |
| | - ''-N <min_nodes[-max_nodes]>'' <html> <span style="white-space:pre"> </span> </html>overall number of nodes; accepts range of node number :-D |
| | - <html>--</html>tasks-per-node=<ntasks> <html> <span style="white-space:pre"> </span> </html>number of tasks launched on each node |
| | - ''-w <node_list>'' <html> <span style="white-space:pre"> </span> </html>where <node_list> e. g.: node001; node[001-005,009]; node001,node008 |
| | - <html>--</html>''mail-type=<types>'' <html> <span style="white-space:pre"> </span> </html>**NONE**, **BEGIN**, **END**, **FAIL**, **REQUEUE**, **ALL**, **ARRAY_TASKS** etc., for further explanations see ''man 1 sbatch'' |
| | - ''-v'' <html> <span style="white-space:pre"> </span> </html>run in verbose mode |
| | \\ |
| | |
| | ===== Useful combination of arguments for srun/sbatch/salloc ===== |
| | |
| | - -N with -n |
| | - -N with -n and <html>--</html>tasks-per-node= |
| | |
| | \\ |
| | <WRAP rightalign> |
| | date of revision: 10-30-2018 © kraus |
| | </WRAP> |
| |