Contact Advanced Research Computing
Quick Links
GPU-Accelerated Jobs
Monsoon supports GPU-accelerated processing for several programs, such as NAMD and AMBER. To utilize the GPUs on the cluster you must do 3 things:
- Tell SLURM to use a gpu resource with ‐‐gres=gpu:tesla:<number>, where <number> is the number of gpu cores you want to use.
- Load the CUDA module.
- Load your CUDA-enabled (GPU-accelerated) software. Note that not all software on Monsoon supports GPU-acceleration.
The following script is an example of a GPU-accelerated NAMD job that utilizes 2 of Monsoon’s 20 GPU cores.
#!/bin/bash
#SBATCH --job-name=damd-cuda
#SBATCH --gres=gpu:tesla:2
#SBATCH --output=/scratch/abc123/cuda_test.%J.out
#SBATCH --cpus-per-task=4
module load cuda
module load namd/2.10-cuda
srun namd2 +idlepoll +p4
/home/abc123/namd_testing/apoa1/apoa1.namd
When running NAMD jobs with GPU-acceleration, the +idlepoll option is required. The +p4 option tells NAMD to run 4 processes, which we included because we told SLURM to use 4 cpus (‐‐cpus-per-task=4). Although you do not have to specify multiple processors with namd2 or SLURM, performance may increase significantly if you do.