slurm

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
slurm [2020/05/19 02:08]
mickey [Use 'man' command after login to servers]
slurm [2020/09/17 13:00]
admin
Line 1: Line 1:
-====== SLURM ======+====== SLURM 19.04 ======
  
 Conceptos básicos Conceptos básicos
Line 21: Line 21:
 **Simple usage for soroban** **Simple usage for soroban**
  
-0. Note. +0. Note.
  
-'-p intel' (equivalent long option: '--partition=intel'​) is required for soroban. ​+'-p intel' (equivalent long option: 'partition=intel'​) is required for soroban
 + 
 +1. Save below as text file (e.g. my_first_slurm.sh).
  
-1. Save below as text file (e.g. my_first_slurm.sh). ​ 
 <​code>​ <​code>​
 #!/bin/bash #!/bin/bash
Line 37: Line 38:
 </​code>​ </​code>​
  
-2. Submit it as SLURM job. +2. Submit it as SLURM job.
  
-sbatch ​<​filename> ​(e.g. sbatch my_first_slurm.sh)+sbatch (e.g. sbatch my_first_slurm.sh)
  
-3. Check progress. ​+3. Check progress.
  
 squeue squeue
Line 60: Line 61:
 </​code>​ </​code>​
  
 +===== 4. Ejemplo básico 3 =====
 +
 +Este es un ejemplo de un script (ejemplo3.sh) con los elementos minimos para ejecutar el programa R-3.6.1 a través de slurm:
 +
 +<​code>​
 +#!/bin/bash
 +
 +#SBATCH -J R-NOMBRE-SIMULACION
 +#SBATCH -a 1-11%3
 +#SBATCH --nodes=1
 +#SBATCH --tasks-per-node=1
 +#SBATCH --mem=100G
 +#SBATCH --partition=intel
 +
 +module load R/3.6.1
 +
 +cmds=(
 +'sleep 10;echo 10'
 +'sleep 20;echo 20'
 +'sleep 30;echo 30'
 +'sleep 40;echo 40'
 +'sleep 50;echo 50'
 +)
 +eval ${cmds[$SLURM_ARRAY_TASK_ID - 1]}
 +</​code>​
 +
 +Para enviar este script a slurm, crear un job, y comenzar el procesamiento se requiere lo siguiente:
 +
 +<​code>​
 +chmod +x ejemplo3.sh
 +</​code>​
 +
 +<​code>​
 +sbatch ejemplo3.sh
 +</​code>​
  
 ===== List of available clusters and partitions ===== ===== List of available clusters and partitions =====
  • slurm.txt
  • Last modified: 2020/09/17 13:19
  • by admin