Search

link to homepage

Institute for Advanced Simulation (IAS)

Navigation and service


Usage of NAMD on JUQUEEN

Access and Usage on JUQUEEN

NAMD is available on JUQUEEN in /bgsys/local/namd/<version>
where <version> is one of the following:

  • 2.8
  • 2.9
  • 2.9p
  • 2.10

NAMD can be accessed using

module load namd/<version>

Example inputs and the corresponding submission scripts for JUQUEEN can be found in

/bgsys/local/namd/<version>/examples

apoa1
stmv (only >=2.9)
replica_exchange (only >=2.9p)

Since NAMD version 2.9 two different executables are available, the standard executable (namd2) and a memory-optimized executable (namd2-memopt).

Standard NAMD executable (all versions)

To run the example copy all files from

/bgsys/local/namd/<version>/examples/apoa1

into a local directory and submit the jobscript below with the following command

llsubmit job_namd_apoa1

where job_namd_apoa1 is the following script

# @job_name = apoa1
# @comment = "namd apoa1 benchmark"
# @output = apoa1_benchmark.out
# @error = apoa1_benchmark.err
# @environment = COPY_ALL
# @job_type = bluegene
# @notification = never
# @bg_size = 32
# @bg_connectivity = Torus
# @wall_clock_limit = 00:15:00
# @queue

module load namd/2.9

# Running on 32 nodes with 64 tasks per node
# (2048 tasks in total)
runjob -p 64 -n 2048 --exe $NAMD_EXEDIR/namd2 \
--args "apoa1.namd"

Memory-Optimized Executable (only version 2.9 and higher)

Running the memory-optimized executable needs some preparation. First a compressed PSF file needs to be generated using the standard namd2 executable with the option

genCompressedPsf on

This will generate the compressed PSF file (file extension inter). Then switch genCompressedPsf off and add the following keyword to the NAMD configuration file

useCompressedPsf on

and change the structure field to use the newly generated psf file by simply adding .inter. Finally, replace coordinates with bincoordinates and replace the reference to the pdb file with a file containing binary format coordinates (you can obtain binary coordinated for example from VMD). Then run this input deck with the namd2-memopt executable.

You can find an example setup and workflow in

/bgsys/local/namd/<version>/examples/stmv

To run the example copy all files from into a local directory and submit the job script file job_namd_stmv_memopt with the following command

llsubmit job_namd_stmv_memopt

where job_namd_stmv_memopt is the following script (you find a version of this script in the directory stmv):

#!/bin/bash
# @job_name = stmv-memopt
# @comment = "stmv-memopt"
# @output = stmv-memopt_$(jobid).out
# @error = stmv-memopt_$(jobid).err
# @environment = COPY_ALL
# @job_type = bluegene
# @notification = never
# @bg_size = 128
# @bg_connectivity = Torus
# @wall_clock_limit = 00:30:00
# @queue

########################
# Load the namd module #
########################
module load namd/2.9

##################################################
# Define control file and binary coordinate file #
##################################################
NAMD_INPUTNA=stmv
NAMD_CONTROL_BACKUP=$NAMD_INPUTNA.namd.backup
NAMD_CONTROL=$NAMD_INPUTNA.namd
NAMD_BINCOOR=$NAMD_INPUTNA.coor
NAMD_TMPFILE=$NAMD_INPUTNA.tmp

###########################
# Generate compressed PSF #
###########################
echo -e "\n====="
echo -e "==> Save original control file "
echo -e "==> $NAMD_CONTROL to $NAMD_CONTROL_BACKUP"
echo -e "====="
cp $NAMD_CONTROL $NAMD_CONTROL_BACKUP
echo -e "\n====="
echo -e "==> Done with backup"
echo -e "====="
echo -e "\n====="
echo -e "==> Generating compressed PSF ..."
echo -e "====="
echo -e "\n# Generate compressed file:" \
>> $NAMD_CONTROL
echo "genCompressedPsf on" >> $NAMD_CONTROL
echo -e "\n====="
echo -e "==> runjob -p 1 -n 1 --verbose 2 \\"
echo -e " --exe $NAMD_EXEDIR/namd2\\"
echo -e " --args $NAMD_CONTROL"
echo -e "====="
runjob -p 1 -n 1 --verbose 2 \
--exe $NAMD_EXEDIR/namd2 \
--args $NAMD_CONTROL
echo -e "\n====="
echo -e "==> Done with generation of compressed PSF"
echo -e "====="

#######################################
# Prepare actual memory optimized run #
#######################################
echo -e "\n====="
echo -e "==> Preparing actual memopt run ..."
echo -e "====="
awk -v NAMD_BINCOOR=${NAMD_BINCOOR}\
'{if ($1 == "genCompressedPsf") {print $1" off";}\
else if ($1 == "structure") {print $1" "$2".inter";}\
else if ($1 == "coordinates") \
{print "bincoordinates " NAMD_BINCOOR;}\
else {print;}}' $NAMD_CONTROL > $NAMD_TMPFILE
echo "useCompressedPsf on" >> $NAMD_TMPFILE
mv $NAMD_TMPFILE $NAMD_CONTROL
echo -e "\n====="
echo -e "==> runjob -p 32 -n 1024 \\"
echo -e " --verbose 2 \\"
echo -e " --exe $NAMD_EXEDIR/namd2-memopt \\"
echo -e " --args $NAMD_CONTROL"
echo -e "====="
runjob -p 32 -n 1024 \
--verbose 2 \
--exe $NAMD_EXEDIR/namd2-memopt \
--args $NAMD_CONTROL
echo -e "\n====="
echo -e "==> Done with memopt run."

For further information please see http://www.ks.uiuc.edu/Research/namd/wiki/?NamdMemoryReduction .

Replica-Exchange Model (only version 2.9p and higher)

With the patched charm++ version 6.4.0 and newer versions of charm++ the replica-exchange model works on Blue Gene. To run the replica-exchange example copy all files from

/bgsys/local/namd/<version>/examples/replica_exchange

into a local directory and submit the jobscript below with the following command

llsubmit job_namd_alanin_re

where job_namd_alanin_re is the following script

# @job_name = alanin
# @comment = "namd alanin replica exchange"
# @output = alanin_benchmark.out
# @error = alanin_benchmark.err
# @environment = COPY_ALL
# @job_type = bluegene
# @notification = never
# @bg_size = 32
# @bg_connectivity = Torus
# @wall_clock_limit = 00:15:00
# @queue

module load namd/2.9p

# Setup replica exchange
mkdir output
cd output
mkdir 0 1 2 3 4 5 6 7
cd ../

# Running on 32 nodes with 32 tasks per node
runjob -n 1024 -p 32 : $NAMD_EXEDIR/namd2\
+replicas 8 job0.conf\
+stdout output/%d/job0.%d.log


Servicemeu

Homepage