User Tools

Site Tools


support:hpc:software: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
support:hpc:software:slurm [2019/12/05 13:33]
tdthatch [SLURM Partitions]
support:hpc:software:slurm [2021/06/21 15:53] (current)
omen [Interactive Sessions]
Line 21: Line 21:
 # NOTE the -l flag! # NOTE the -l flag!
  
-# If you need any help, please email help@cse.ucdavis.edu+# If you need any help, please email farm-hpc@ucdavis.edu
  
 # Name of the job - You'll probably want to customize this. # Name of the job - You'll probably want to customize this.
-#SBATCH -J bench+#SBATCH --job-name=benchmark-test 
 + 
 +# Use the med2 partition (or which ever you have access to) 
 +# Run this to see what partitions you have access to: 
 +# sacctmgr -s list user $USER format=partition 
 +#SBATCH --partition=med2
  
 # Standard out and Standard Error output files with the job number in the name. # Standard out and Standard Error output files with the job number in the name.
-#SBATCH -bench-%j.output +#SBATCH --output=bench-%j.output 
-#SBATCH -bench-%j.output+#SBATCH --error=bench-%j.output
  
-no -n here, the user is expected to provide that on the command line.+Request 4 CPUs and 8 GB of RAM from 1 node: 
 +#SBATCH --nodes=1 
 +#SBATCH --mem=8G 
 +#SBATCH --ntasks=1 
 +#SBATCH --cpus-per-task=4 
  
 # The useful part of your job goes below # The useful part of your job goes below
Line 99: Line 108:
 The newest version of slurm supports array jobs.  For example: The newest version of slurm supports array jobs.  For example:
 <code> <code>
-$ cat test.sh+$ cat test-array.sh
 #!/bin/bash #!/bin/bash
 hostname hostname
Line 107: Line 116:
 <code> <code>
 # Submit a job array with index values between 0 and 10,000 on all free CPUs: # Submit a job array with index values between 0 and 10,000 on all free CPUs:
-$ sbatch --array=0-1000 MyScript.sh+$ sbatch --array=0-10000 --partition=low test-array.sh
 </code> </code>
  
Line 177: Line 186:
 | -t | time limit for job, <minutes>, or <hours>:<minutes> are commonly used| | -t | time limit for job, <minutes>, or <hours>:<minutes> are commonly used|
 | -v -vv -vvv| Increasing levels of verbosity| | -v -vv -vvv| Increasing levels of verbosity|
-| -x node-name | Don't run job on node-name (and please report any problematic nodes to help@cse.ucdavis.edu) |+| -x node-name | Don't run job on node-name (and please report any problematic nodes to farm-hpc@ucdavis.edu) |
  
 ====== Interactive Sessions ====== ====== Interactive Sessions ======
  
-(takes 30 seconds or so)+(Usually takes 30 seconds or so, but it depends on job backlog)
  
-<code>$ srun -partition-name ---pty bash -il </code>+<code>$ srun --partition=partition-name --time=1:00:00 --unbuffered --pty /bin/bash -il </code>
  
 +When the time limit expires you will be forcibly logged out and anything left running will be killed.
 ======  Monitoring Jobs: ====== ======  Monitoring Jobs: ======
  
support/hpc/software/slurm.1575581623.txt.gz · Last modified: 2019/12/05 13:33 by tdthatch