User Tools

Site Tools


techstaff:slurm

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
techstaff:slurm [2016/05/06 15:24] – [Partitions / Queues] kauffmantechstaff:slurm [2017/08/31 16:14] kauffman
Line 1: Line 1:
-====== DRAFT | Peanut Job Submission Cluster ======+===== Notice ===== 
 +**2017-08-31**: Configuration change to allow allocation on CPUs and RAM. Please read the 'Default Quota' section under https://howto.cs.uchicago.edu/techstaff:slurm#usage 
  
-We are currently **alpha** testing and gauging user interest in a cluster of machines that allows for the submission of long running compute jobs. Think of these machines as a dumping ground for discrete computing tasks that might have been rude or disruptive to execute on the main (shared) shell servers (i.e., linux1, linux2, linux3).+====== Peanut Job Submission Cluster ====== 
 + 
 +We are currently **alpha** testing and gauging user interest in a cluster of machines that allows for the submission of long running compute jobs. Think of these machines as a dumping ground for discrete computing tasks that might be rude or disruptive to execute on the main (shared) shell servers (i.e., linux1, linux2, linux3).
  
 For job submission we will be using a piece of software called [[http://slurm.schedmd.com|SLURM]]. Simply put, SLURM is a queue management system and stands for **S**imple **L**inux **U**tility for **R**esource **M**anagement; it was developed at the Lawrence Livermore National Lab. It currently supports some of the largest compute clusters in the world. The best description of SLURM can be found on its homepage: For job submission we will be using a piece of software called [[http://slurm.schedmd.com|SLURM]]. Simply put, SLURM is a queue management system and stands for **S**imple **L**inux **U**tility for **R**esource **M**anagement; it was developed at the Lawrence Livermore National Lab. It currently supports some of the largest compute clusters in the world. The best description of SLURM can be found on its homepage:
Line 28: Line 31:
   * [[http://slurm.schedmd.com/tutorials.html|SLURM tutorial videos]]   * [[http://slurm.schedmd.com/tutorials.html|SLURM tutorial videos]]
   * [[https://computing.llnl.gov/linux/slurm/quickstart.html|LLNL quick start user guide]]   * [[https://computing.llnl.gov/linux/slurm/quickstart.html|LLNL quick start user guide]]
- +  * [[http://research.computing.yale.edu/support/hpc/user-guide/slurm| Yale's User Guide]]
 ===== Infrastructure ===== ===== Infrastructure =====
  
Line 37: Line 39:
   * 64gb RAM   * 64gb RAM
   * 2x 500GB SATA 7200RPM in RAID1   * 2x 500GB SATA 7200RPM in RAID1
- 
-To better manage the cluster we have virtualized the job submission nodes and give them all resources of the hardware. So, the actual resources you can consume on any one node is: 
-  * 14 Cores, 14 threads 
-  * 62GB RAM 
  
 ==== Storage ==== ==== Storage ====
Line 88: Line 86:
 | **debug** | The partition your job will be submitted to if none is specified. The purpose of this partition is to make sure your code is running as it should before submitting a long running job to the general queue. | | **debug** | The partition your job will be submitted to if none is specified. The purpose of this partition is to make sure your code is running as it should before submitting a long running job to the general queue. |
 | **general** | All jobs that have been thoroughly tested can be submitted here. This partition will have access to more nodes and will process most of the jobs. If you need to use the ''%%--exclusive%%'' flag it should be done here.| | **general** | All jobs that have been thoroughly tested can be submitted here. This partition will have access to more nodes and will process most of the jobs. If you need to use the ''%%--exclusive%%'' flag it should be done here.|
-| **gpu** | Contains servers with graphics cards. As of May 2016 there is only one node containing a Tesla M2090. You will be forced to use this server exclusively for now. |+| **gpu** | Contains servers with graphics cards. As of May 2016 there is only one node containing a Tesla M2090. You will be forced to use this server exclusively for now. Please keep your time in interactive mode to a minimum.|
  
 ====== Job Submission ====== ====== Job Submission ======
Line 109: Line 107:
 ===== Usage ===== ===== Usage =====
 Below are some common examples. You should consult the [[http://slurm.schedmd.com/documentation.html|documentation]] of SLURM if you need further assistance. Below are some common examples. You should consult the [[http://slurm.schedmd.com/documentation.html|documentation]] of SLURM if you need further assistance.
 +
 +=== Default Quotas ===
 +By default we set a job to be run on one CPU and allocate 100MB of RAM. If you require more than that you should specify what you need. Using the following options will do: ''%%--mem-per-cpu%%'', ''%%--nodes%%'', ''%%--ntasks%%''.
  
 === Exclusive access to a node === === Exclusive access to a node ===
Line 118: Line 119:
 === Sample script === === Sample script ===
 Make sure you create a directory in which to deposit the ''%%STDIN%%'', ''%%STDOUT%%'', ''%%STDERR%%'' files. Make sure you create a directory in which to deposit the ''%%STDIN%%'', ''%%STDOUT%%'', ''%%STDERR%%'' files.
-   mkdir -p $HOME/slurm/slurm_out+   mkdir -p $HOME/slurm/out
  
 <code> <code>
Line 125: Line 126:
 #SBATCH --mail-user=cnetid@cs.uchicago.edu #SBATCH --mail-user=cnetid@cs.uchicago.edu
 #SBATCH --mail-type=ALL #SBATCH --mail-type=ALL
-#SBATCH --output=/home/cnetid/slurm/slurm_out/%j.%N.stdout +#SBATCH --output=/home/cnetid/slurm/out/%j.%N.stdout 
-#SBATCH --error=/home/cnetid/slurm/slurm_out/%j.%N.stderr+#SBATCH --error=/home/cnetid/slurm/out/%j.%N.stderr
 #SBATCH --workdir=/home/cnetid/slurm #SBATCH --workdir=/home/cnetid/slurm
 #SBATCH --partition=debug #SBATCH --partition=debug
Line 132: Line 133:
 #SBATCH --nodes=1 #SBATCH --nodes=1
 #SBATCH --ntasks=1 #SBATCH --ntasks=1
 +#SBATCH --mem-per-cpu=500
 #SBATCH --time=15:00 #SBATCH --time=15:00
  
Line 142: Line 144:
 Make sure to replace all instances of the word ''%%cnetid%%'' with your CNETID. Make sure to replace all instances of the word ''%%cnetid%%'' with your CNETID.
  
 +=== Submitting job script ===
 +Using the above example you will want to place your tested code into a file. 'hostname.job' is the file name in this example.
 +<code>
 +sbatch hostname.job
 +</code>
 +
 +You can then check the status via squeue or see the output in the output directory '$HOME/slurm/slurm_out'.
 ==== srun ==== ==== srun ====
 Used to submit a job to the cluster that doesn't necessarily need a script. Used to submit a job to the cluster that doesn't necessarily need a script.
Line 220: Line 229:
 | error: Unable to allocate resources: More processors requested than permitted | It usually has **nothing** to do with priviledges you may or may not have. Rather, it usually means that you have allocated more processors than one compute node actually has. | | error: Unable to allocate resources: More processors requested than permitted | It usually has **nothing** to do with priviledges you may or may not have. Rather, it usually means that you have allocated more processors than one compute node actually has. |
  
 +====== Using the GPU ======
 +===== Paths =====
 +You will need to add the following to your $PATH and $LD_LIBRARY_PATH.
 +
 +  export PATH=$PATH:/usr/local/cuda/bin
 +  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH=/usr/local/cuda/lib
 +
 +
 +===== Example =====
 +This sbatch script will get device information from the installed Tesla gpu.
 +<code>
 +#!/bin/bash
 +#
 +#SBATCH --mail-user=cnetid@cs.uchicago.edu
 +#SBATCH --mail-type=ALL
 +#SBATCH --output=/home/cnetid/slurm/slurm_out/%j.%N.stdout
 +#SBATCH --error=/home/cnetid/slurm/slurm_out/%j.%N.stderr
 +#SBATCH --workdir=/home/cnetid/slurm
 +#SBATCH --partition=gpu
 +#SBATCH --job-name=get_tesla_info
 +
 +export PATH=$PATH:/usr/local/cuda/bin
 +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH=/usr/local/cuda/lib
 +
 +cat << EOF > /tmp/getinfo.cu
 +#include <stdio.h>
 +
 +int main() {
 +  int nDevices;
 +
 +  cudaGetDeviceCount(&nDevices);
 +  for (int i = 0; i < nDevices; i++) {
 +    cudaDeviceProp prop;
 +    cudaGetDeviceProperties(&prop, i);
 +    printf("Device Number: %d\n", i);
 +    printf("  Device name: %s\n", prop.name);
 +    printf("  Memory Clock Rate (KHz): %d\n",
 +           prop.memoryClockRate);
 +    printf("  Memory Bus Width (bits): %d\n",
 +           prop.memoryBusWidth);
 +    printf("  Peak Memory Bandwidth (GB/s): %f\n\n",
 +           2.0*prop.memoryClockRate*(prop.memoryBusWidth/8)/1.0e6);
 +  }
 +}
 +EOF
 +
 +/usr/local/cuda/bin/nvcc /tmp/getinfo.cu -o /tmp/a.out
 +/tmp/a.out
 +rm /tmp/a.out
 +rm /tmp/getinfo.cu
 +</code>
 +==== Output ====
 +STDOUT will look something like this:
 +<code>
 +cnetid@linux1:~$ cat $HOME/slurm/slurm_out/12567.gpu1.stdout 
 +Device Number: 0
 +  Device name: Tesla M2090
 +  Memory Clock Rate (KHz): 1848000
 +  Memory Bus Width (bits): 384
 +  Peak Memory Bandwidth (GB/s): 177.408000
 +</code>
 +STDERR should be blank.
 ====== More ====== ====== More ======
 If you feel this documentation is lacking in some way please let techstaff know. Email [[techstaff@cs.uchicago.edu]], call (773-702-1031), or stop by our office (Ryerson 154). If you feel this documentation is lacking in some way please let techstaff know. Email [[techstaff@cs.uchicago.edu]], call (773-702-1031), or stop by our office (Ryerson 154).
/var/lib/dokuwiki/data/pages/techstaff/slurm.txt · Last modified: 2021/01/06 16:13 by kauffman

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki