Introduction to GPU Computing at S&T

What is a GPU Cluster?

 A GPU cluster is a computer cluster in which each node is equipped with a Graphics Processing Unit (GPU). By harnessing the computational power of modern GPUs via General-Purpose Computing on Graphics Processing Units (GPGPU), very fast calculations can be performed with a GPU cluster.  The cluster is used for electrical and computer engineering and computer science courses, for training workshops, as a platform to explore the potential for GPUs to accelerate applications to the petascale and beyond, and as a resource for science and engineering researchers.

Getting Started with GPU Computing

A really good place to get a start at GPGPU computing is at http://www.gpgpu.org where they have a very comprehensive breakdown of the capabilities and limitations of GPGPU computing.  On our campus, the main login appliance nic.mst.edu has full CUDA capability, whereas our remote access login appliance remote.nic.mst.eu does not.  

Compiling Code

In order to correctly compile GPGPU code, you must be logged into a system with CUDA capability, or specify the card type at compile time of the target system.  As it turns out our target architecture for all the GPU nodes in our cluster is the same, so you must simply supply the -arch sm_20 switch when compiling code.  For Example:  

$ module load cuda/6,0

$ nvcc -arch sm_20 -o new.exe ./src/new.cu

Creating a Job File

A jobfile for executing CUDA based code at S&T looks like the following:

#PBS -N Cuda_sample
#PBS -q cuda_cpu@nic-cluster.mst.edu
#PBS -l nodes=1
#PBS -l walltime=35:30:00
#PBS -m abe
#PBS -M joeminer@mst.edu
#PBS -V
cd $PBS_O_WORKDIR
/share/apps/job_data_prerun.py
./new.exe

Submitting the Job File

You submit the job to the cluster exactly like a regular CPU based cluster job:

$ module load cuda/6.0

$ qsub cuda.job