NAMD 2.14 (CPU)

Webpage

http://www.ks.uiuc.edu/Research/namd/

Version

2.14

Build Environment

  • Intel oneAPI Compiler Classic 2022.2.1
  • Intel MKL 2022.2.1
  • HPC-X 2.11 (Open MPI 4.1.4)
    • (HPC-X 2.13.1 was used in the actual build. Runtime library was switched to HPC-X 2.11 later to avoid errors in multi-node runs.)

Files Required

  • NAMD_2.14_Source.tar.gz
  • tcl8.5.9-linux-x86_64.tar.gz
  • tcl8.5.9-linux-x86_64-threaded.tar.gz
    • obtained from http://www.ks.uiuc.edu/Research/namd/libraries
    • For fftw, MKL was used.

Build Procedure

#!/bin/sh

VERSION=2.14
CHARM_VERSION=6.10.2
WORKDIR=/gwork/users/${USER}/namd-intel
SOURCEDIR=/home/users/${USER}/Software/NAMD/${VERSION}
NAME=NAMD_${VERSION}_Source
TARBALL=${SOURCEDIR}/${NAME}.tar.gz

LIBURL=http://www.ks.uiuc.edu/Research/namd/libraries
#FFTW=fftw-linux-x86_64
#FFTW_URL=${LIBURL}/${FFTW}.tar.gz
TCL=tcl8.5.9-linux-x86_64
#TCL_URL=${LIBURL}/${TCL}.tar.gz
TCL_THREADED=tcl8.5.9-linux-x86_64-threaded
#TCL_THREADED_URL=${LIBURL}/${TCL_THREADED}.tar.gz

#TARBALL_FFTW=${SOURCEDIR}/${FFTW}.tar.gz
TARBALL_TCL=${SOURCEDIR}/${TCL}.tar.gz
TARBALL_TCL_THREADED=${SOURCEDIR}/${TCL_THREADED}.tar.gz

PARALLEL=12

#------------------------------------------------------------------
umask 0022

export LANG=""
export LC_ALL=C

module -s purge

. ~/intel/oneapi/compiler/latest/env/vars.sh

module -s load mkl/2022.2.1
module -s load openmpi/4.1.5-hpcx/intel2022.2.1

cd ${WORKDIR}
if [ -d ${NAME} ]; then
  mv ${NAME} namd_erase
  rm -rf namd_erase &
fi

tar zxf ${TARBALL}
cd ${NAME}
tar xf charm-${CHARM_VERSION}.tar

cd charm-${CHARM_VERSION}

sed -i -e "s/_OPTIMIZE/_OPTIMIZE -march=core-avx2/" src/scripts/charmc

export CC=icc
export CXX=icpc
export F90=ifort
export F77=ifort
export MPICXX=mpicxx
export MPICC=mpicc
export MPIF90=mpif90
export MPIF77=mpif90

./build charm++ mpi-linux-x86_64 \
        --no-build-shared --with-production -j${PARALLEL}
cd mpi-linux-x86_64/tests/charm++/megatest
make pgm
mpirun -np ${PARALLEL} ./pgm
cd ../../../../
cd ../

tar zxf ${TARBALL_TCL}
mv ${TCL} tcl
tar zxf ${TARBALL_TCL_THREADED}
mv ${TCL_THREADED} tcl-threaded

NEWOPTS="-march=core-avx2 -static-intel -O2 -ip -fp-model fast=2 -DNAMD_DISABLE_SSE"
./config Linux-x86_64-icc \
         --charm-arch mpi-linux-x86_64 \
         --with-mkl \
         --with-python \
         --cxx-opts "$NEWOPTS" \
         --cxx-thread-opts "$NEWOPTS" \
         --cxx-noalias-opts "$NEWOPTS -fno-alias" \
         --cc-opts "$NEWOPTS"
cd Linux-x86_64-icc

sed -i -e "/PYTHONLIB/s/lib64/lib64 -lpython3.9/" Make.config

make -j${PARALLEL}
make release