GPU Guide

From Storrs HPC Wiki
Revision as of 16:19, 20 June 2012 by Stc07008 (talk | contribs) (Created page with "==Very basic GPU Guide== ===Basic CUDA compilation=== First you need to load the CUDA module: module load cuda/4.1" for loading cuda for current session If you plan on doing...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Very basic GPU Guide

Basic CUDA compilation

First you need to load the CUDA module:

module load cuda/4.1" for loading cuda for current session

If you plan on doing extensive GPU work, you'll want to initadd it, which will load it on every log-in:

module initadd cuda/4.1" for loading cuda for each session

To compile with CUDA, using the NVidia CUDA compiler:

nvcc {MYFILE.cu} -o {OUTPUT_FILE}"

Running GPU jobs

There are four GPU nodes, each with 8 NVIDIA Tesla M2050 GPU's. They can be used in EXCLUSIVE mode or SHARED mode. SHARED mode means that GPU's will be shared among those requiring it. It is the default, and satisfactory most of the time. The alternative is EXCLUSIVE mode, which ensures that you are the only user on the GPU nodes you are using. It is only recommended for jobs that utilize the GPUs almost 100% or require a lot of GPU memory. In this case, they may sit in the queue longer, but will provide better performance.


  • Use the following command to use a GPU in SHARED mode:
bsub -a gpushared -q gpu {COMMAND}
  • If you need to use between 1 and 8 GPU's in EXCLUSIVE mode:
bsub -a gpuexcl{NUM_GPUS}_p -q gpu {COMMAND}

For example, use the following command to use 1 available GPU in the cluster in EXCLUSIVE mode:

bsub -a gpuexcl_p -q gpu {COMMAND}

and the following command to use 8 available GPU's in the cluster in EXCLUSIVE mode:

bsub -a gpuexcl8_p -q gpu {COMMAND}


Other resources