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 revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
slurm-dummies [2020/05/06 11:45] adminslurm-dummies [2020/05/09 16:56] admin
Line 30: Line 30:
 # how much time this process must run (hours:minutes:seconds)? 4 hours for this example # how much time this process must run (hours:minutes:seconds)? 4 hours for this example
 #SBATCH --time=04:00:00 #SBATCH --time=04:00:00
-# how much memory it needs ? 1 GB (1024MB) for the example+# how much memory it needs ? 1 GB (1024MB) for the example. Different units can be specified using the suffix [K|M|G|T]
 #SBATCH --mem=1G #SBATCH --mem=1G
 </code> </code>
Line 37: Line 37:
 #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 (computers) your program is supposed to use (usually 1)+#and of course the number of nodes (physical computers) your program is supposed to use (at least 1)
 #SBATCH --nodes=1 #SBATCH --nodes=1
 </code> </code>
Line 46: Line 46:
  
 <code> <code>
-# this line instruct the PBS to send a mail when the job start and finish +# this line instruct SLURM to send a mail when the job start and finish 
-#SBATCH --mail-type=begin +#SBATCH --mail-type=begin,end
-#SBATCH --mail-type=end+
 </code> </code>
  
Line 109: Line 108:
 #SBATCH --mail-user=dummy.epfl@epfl.ch #SBATCH --mail-user=dummy.epfl@epfl.ch
 #SBATCH --time=04:00:00 #SBATCH --time=04:00:00
-#SBATCH --mem=1024mb+#SBATCH --mem=1024M
 #SBATCH --cpu-per-task=8 #SBATCH --cpu-per-task=8
 #SBATCH --mail-type=begin #SBATCH --mail-type=begin
Line 125: Line 124:
 </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 qsub (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 (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:
  
 <code> <code>
slurm-dummies.txt · Last modified: 2023/10/09 15:17 by admin