NAMD¶
NAMD is a parallel molecular dynamics code designed for high-performance simulation of large biomolecular systems.
For more information, consult the official NAMD website.
Package availability¶
| Compute node type | Available |
|---|---|
| CPU | ✓ |
| NVIDIA A100 GPU | ✓ |
| NVIDIA Grace Hopper GPU | ✓ |
Run NAMD¶
Below are some examples of how to run NAMD’s GPU-resident mode, which executes entire molecular dynamics simulations directly on the GPU. This approach can deliver significant performance improvements by minimizing data transfers between the GPU and CPU.
NVIDIA A100 GPU¶
#!/bin/bash -e
#SBATCH --job-name=namd
#SBATCH --cluster=gmerlin7
#SBATCH --partition=a100-hourly
#SBATCH --nodes=1
#SBATCH --hint=nomultithread
#SBATCH --cpus-per-task=8
#SBATCH --gres=gpu:1
#SBATCH --time=01:00:00
#SBATCH --output=namd_%j.log
module purge
module use Alps_A100
module load NAMD
namd3 +p8 +devices ${CUDA_VISIBLE_DEVICES} stmv.namd
Grace Hopper GPU¶
#!/bin/bash -e
#SBATCH --job-name=namd
#SBATCH --cluster=gmerlin7
#SBATCH --partition=gh-hourly
#SBATCH --nodes=1
#SBATCH --cpus-per-task=8
#SBATCH --gres=gpu:1
#SBATCH --time=01:00:00
#SBATCH --output=namd_%j.log
module purge
module load NAMD
namd3 +p8 +setcpuaffinity +devices ${CUDA_VISIBLE_DEVICES} stmv.namd
Resource allocation
Request resources according to the requirements of your job. Requesting more resources than necessary may increase queue wait times and reduce cluster efficiency.
Benchmark results¶
We performed a performance benchmark using the Satellite Tobacco Mosaic Virus (STMV), comparing GPU-resident runs on 1, 2, and 4 A100 and GH GPUs with a CPU-only execution. All simulations were performed in the NVE (constant-energy) ensemble using the following commands.
CPU-only¶
The CPU-only benchmark used 128 cores per node, 4 processes per node, and 3 nodes: