Skip to content

Warning

This is as a Lab Notebook which describes how to solve a specific problem at a specific time. Please keep this in mind as you read and use the content. Please pay close attention to the date, version information and other details.

Running NAMD across multiple nodes (2023-02-07)

NAMD is a parallel molecular dynamics code. At the time of writing we have 3 major versions installed on the HPCC. This guide is for running NAMD across multiple compute nodes.

Below is a sbatch script that should allow NAMD to be run across multiple nodes. Note that items in <> should be replaced with appropriate values.

Especially note that <NUMBER OF NODES> * <NUMBER OF CPUS> should be entered as one number e.g. 5 nodes * 50 CPUs = 200. This script assumes one task per core.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
#!/bin/bash --login
#SBATCH --nodes=<NUMBER OF NODES>
#SBATCH --ntasks-per-node=<NUMBER OF CPUS>
#SBATCH --time=<WALLTIME>
#SBATCH --mem=<MEMORY REQUEST>
#SBATCH --output=namd.sb.o%j
#SBATCH --error=namd.sb.e%j

module purge
module load GCC/9.3.0 OpenMPI/4.0.3
module load NAMD/2.14-mpi

cd $SLURM_SUBMIT_DIR

charmrun +p <NUMBER OF NODES> * <NUMBER OF CPUS> namd2 <CONFIGURATION FILE>