User Tools

Site Tools


slurm-dummies

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
slurm-dummies [2020/05/09 14:56]
admin
slurm-dummies [2020/06/09 08:49] (current)
admin
Line 16: Line 16:
   - Your email address. the official epfl address or another, but valid (worldwide),​ email address. **This address mus be always present, no matter if you instruct the system to send or not the email messages**.   - Your email address. the official epfl address or another, but valid (worldwide),​ email address. **This address mus be always present, no matter if you instruct the system to send or not the email messages**.
   - How much time your job must run (if the job runs over this limit the cluster manager will kill it). the minimum is 1 minute and there'​s no maximum limit.   - How much time your job must run (if the job runs over this limit the cluster manager will kill it). the minimum is 1 minute and there'​s no maximum limit.
-  - How much memory (RAM) your job will use. Please remember that if your job use more memory than the limit you put here, then the cluster manager will kill the job. the minimum is 512 Mbyte, currently (as for Feb 2020) the maximum is 64 Gbyte.+  - How much memory (RAM) your job will use. Please remember that if your job use more memory than the limit you put here, then the cluster manager will kill the job. the minimum is 512 Mbyte, currently (as for Feb 2020) the maximum is 250 Gbyte.
   - How many nodes (computers) you're going to use with your script.   - How many nodes (computers) you're going to use with your script.
   - How many cores/cpu must be reserved for your job. If you don't include this parameter only one core/cpu will be assigned to your job and you cannot run more than a single threaded job.   - How many cores/cpu must be reserved for your job. If you don't include this parameter only one core/cpu will be assigned to your job and you cannot run more than a single threaded job.
-  - **the name of the queue/​partition** you want to use: currently only ''​slurm-cluster'' ​or ''​slurm-ws''​ are available.+  - **the name of the queue/​partition** you want to use: currently only ''​slurm-cluster''​, ''​slurm-gpu'' ​ and ''​slurm-ws''​ are available.
  
 ==== partitions (a.k.a. queues) ==== ==== partitions (a.k.a. queues) ====
 If you used other types of cluster management, you will already known the term ''​queue''​ to identify the type of nodes/jobs you want to use inside the clusters. in S.L.U.R.M. notation, queues are called **partitions**. The two terms are used to indicate the same entity and usage. If you used other types of cluster management, you will already known the term ''​queue''​ to identify the type of nodes/jobs you want to use inside the clusters. in S.L.U.R.M. notation, queues are called **partitions**. The two terms are used to indicate the same entity and usage.
 +The '​partitions'​ ''​slurm-cluster'',​ ''​slurm-gpu'' ​ and ''​slurm-ws''​ refer then to what kind of computer you want to use:
 +  - slurm-cluster:​ this includes all the real nodes dedicated to do just number crunching, most of the time you want to use this queue/​partition.
 +  - slurm-gpu: this includes computers that have a gpu (nvidia, mostly) that can be used for HPC.
 +  - slurm-ws: this includes all the workstations that are sitting under your desks, programs that run a very shor time (1 hour top) can take advantage of the workstation cpus not used by the users.
  
 The beginning of your script will be: The beginning of your script will be:
Line 33: Line 37:
 #SBATCH --mem=1G #SBATCH --mem=1G
 </​code>​ </​code>​
-If your job is running a simulation that is multi-threaded,​ you can use more than one CPU/core by indicating the number of cores you want with:+If your job is running a simulation that is multi-threaded ​(or parallel), you can use more than one CPU/core by indicating the number of cores you want with:
 <​code>​ <​code>​
 #Numer of cores needed by the application (8 in this example) #Numer of cores needed by the application (8 in this example)
 #SBATCH --cpus-per-task=8 #SBATCH --cpus-per-task=8
-#and of course ​the number of nodes (physical computers) your program is supposed to use (at least 1)+#and the number of nodes (physical computers) your program is supposed to use (you need at least 1)
 #SBATCH --nodes=1 #SBATCH --nodes=1
 </​code>​ </​code>​
  
  
-After this //prolog// you can add directives for instructing the system about the messages you+After this //prolog//you can add directives for instructing the system about the messages you
 want to receive: want to receive:
  
Line 50: Line 54:
 </​code>​ </​code>​
  
-Also you can tell the SLURM where you want to put the output and errors messages.\\+You can also tell SLURM where you want to put the output and errors messages.\\
 By default the cluster will put the output and errors messages in 2 separate files (<name of the job>​.e<​jobID>​ for errors and <name of the job>​.o<​jobID>​ for the output) By default the cluster will put the output and errors messages in 2 separate files (<name of the job>​.e<​jobID>​ for errors and <name of the job>​.o<​jobID>​ for the output)
  
Line 66: Line 70:
 </​code>​ </​code>​
  
-Another mandatory parameter is the queue (called partition in SLURM terminology) you want to use: at the moment we have only the queue ''​slurm-cluster'' ​active:+Another mandatory parameter is the queue (called partition in SLURM terminology) you want to use: to start always use the queue ''​slurm-cluster'':​
 <​code>​ <​code>​
 # queue to be used # queue to be used
Line 91: Line 95:
  
 </​code>​ </​code>​
-It's better to use the command srun to launch the executable command (just prefix srun to you normal command line), so SLURM can better manage the scheduling of the jobs+It's better to use the command srun to launch the executable command (just prefix srun to you normal command line), so SLURM can better manage the scheduling of the jobs
 +the use of ''​srun''​ is also mandatory in case of parallel computing.
 <​code>​ <​code>​
  
Line 124: Line 129:
 </​code>​ </​code>​
  
-Now you just need to tell the cluster system that you want to run this job, but how you do that? pretty simple, you use the command sbatch ​(short for queue submit) ​followed by the name of the script you just created. If you saved the previous example script as dummy.slurm in the current directory, you will want to launch this command from the shell:+Now you just need to tell the cluster system that you want to run this job, but how you do that? pretty simple, you use the command ​''​sbatch'', ​followed by the name of the script you just created. If you saved the previous example script as dummy.slurm in the current directory, you will want to launch this command from the shell:
  
 <​code>​ <​code>​
slurm-dummies.txt · Last modified: 2020/06/09 08:49 by admin