URL: http://www.ks.uiuc.edu/Research/namd/
Source URL: git clone https://charm.cs.illinois.edu/gerrit/namd
Categories: application, open-source
MD; Parallel molecular dynamics code designed for high-performance simulation of large biomolecular systems.
Versions
NAMD 2.12 Arm 18 - NAMD 2.12 Arm 18 MPI -
Build details for version 2.12 with Arm Compiler for HPC 18
Configuration
- NAMD version 2.12
- CHARM++ version 6.8.0
- Arm compiler version 18
- FFTW3
- OpenMPI version 3.0.0
- Last updated 17/1/18
Build instructions
Build the dependencies
This recipe for building NAMD requires CHARM++ version 6.8.0 built with CHARMARCH=multicore-linux-aarch64
.
Make a note of the install location as this will be required for the NAMD build.
Choose install and build locations for NAMD, and set as environment variables INSTALL_DIR
and BUILD_DIR
respectively.
Download and unpack
cd $BUILD_DIR
wget http://www.ks.uiuc.edu/Research/namd/2.12/download/832164/NAMD_2.12_Source.tar.gz
tar -xf NAMD_2.12_Source.tar.gz
Compiler configuration
: ${CC:=armclang}
: ${CXX:=armclang++}
: ${FC:=armflang}
export CC CXX FC
Set tuning flags and (optionally) disable some compiler warnings:
TUNE="-march=armv8.1-a -mcpu=native"
WARN="-Wno-parentheses-equality -Wno-writable-strings -Wno-return-type -Wno-logical-op-parentheses -Wno-writable-strings -Wno-deprecated-register "
Build configuration
cd ./NAMD_2.12_Source
Generate an armclang architecture file based on the existing Linux-ARM64-g++.arch file.
This will need to know the location of the CHARM build NAMD_CHARM_DIR
, and the architecture used for the CHARM build CHARMARCH
.
export CHARMARCH=multicore-linux-aarch64
export NAMD_CHARM_DIR=${INSTALL_DIR}/charm680
cp arch/Linux-ARM64-g++.arch arch/Linux-ARM64-armclang.arch
sed -i "s|CHARMBASE.*|CHARMBASE = ${NAMD_CHARM_DIR}/|g" Make.charm
sed -i "s|^CHARMARCH =.*|CHARMARCH = $CHARMARCH|g" arch/Linux-ARM64-armclang.arch
sed -i "s|^FLOATOPTS =.*|FLOATOPTS = -O3 -fomit-frame-pointer ${WARN} ${TUNE}|g" arch/Linux-ARM64-armclang.arch
sed -i "s|^CC = gcc|CC = $CC|g" arch/Linux-ARM64-armclang.arch
sed -i "s|^CXX = g++|CXX = $CXX |g" arch/Linux-ARM64-armclang.arch
Set the FFTW config based on the x86_64 one. This will need to link to the FFTW3 library, given by NAMD_FFTW3_DIR
.
cp arch/Linux-x86_64.fftw3 arch/Linux-ARM64.fftw3
sed -i "s|^FFTDIR=.*|FFTDIR=$NAMD_FFTW3_DIR|g" arch/Linux-ARM64.fftw3
sed -i "s|^FFTINCL=.*|FFTINCL=-I$NAMD_FFTW3_DIR/include|g" arch/Linux-ARM64.fftw3
sed -i "s|^FFTLIB=.*|FFTLIB=-L$NAMD_FFTW3_DIR/lib -lfftw3|g" arch/Linux-ARM64.fftw3
Finally, configure, build...
./config Linux-ARM64-armclang --with-fftw3 --without-tcl --charm-arch $CHARMARCH
cd Linux-ARM64-armclang
make -j
...and create symbolic link to the executables.
cd $INSTALL_DIR
ln -s $BUILD_DIR/NAMD_2.12_Source/Linux-ARM64-armclang/charmrun charmrun
ln -s $BUILD_DIR/NAMD_2.12_Source/Linux-ARM64-armclang/namd2 namd2
Example decks
The Apoa1 example is a standard NAMD cross-platform benchmark and suitable for small platforms.
wget http://www.ks.uiuc.edu/Research/namd/utilities/apoa1.tar.gz
tar -xf apoa1.tar.gz
${INSTALL_DIR}/namd2 +p40 apoa1/apoa1.namd +setcpuaffinity
Build details for version 2.12 with Arm Compiler for HPC 18 MPI
Configuration
- NAMD version 2.12
- CHARM++ version 6.8.0
- Arm compiler version 18
- FFTW3
- OpenMPI version 3.0.0
- Last updated 17/1/18
Build instructions
Build the dependencies
This recipe for building NAMD requires CHARM++ version 6.8.0 built with CHARMARCH=mpi-linux-aarch64
.
Make a note of the install location as this will be required for the NAMD build.
Choose install and build locations for NAMD, and set as environment variables INSTALL_DIR
and BUILD_DIR
respectively.
Download and unpack
cd $BUILD_DIR
wget http://www.ks.uiuc.edu/Research/namd/2.12/download/832164/NAMD_2.12_Source.tar.gz
tar -xf NAMD_2.12_Source.tar.gz
Compiler configuration
: ${CC:=armclang}
: ${CXX:=armclang++}
: ${FC:=armflang}
export CC CXX FC
Set tuning flags and (optionally) disable some compiler warnings:
TUNE="-march=armv8.1-a -mcpu=native"
WARN="-Wno-parentheses-equality -Wno-writable-strings -Wno-return-type -Wno-logical-op-parentheses -Wno-writable-strings -Wno-deprecated-register"
Build configuration
cd ./NAMD_2.12_Source
Generate an armclang architecture file based on the existing Linux-ARM64-g++.arch file.
This will need to know the location of the CHARM build NAMD_CHARM_DIR
, and the architecture used for the CHARM build CHARMARCH
.
export CHARMARCH=mpi-linux-aarch64
export NAMD_CHARM_DIR=${BUILD_DIR}/install/charm680
cp arch/Linux-ARM64-g++.arch arch/Linux-ARM64-armclang.arch
sed -i "s|CHARMBASE.*|CHARMBASE = ${NAMD_CHARM_DIR}/|g" Make.charm
sed -i "s|^CHARMARCH =.*|CHARMARCH = $CHARMARCH|g" arch/Linux-ARM64-armclang.arch
sed -i "s|^FLOATOPTS =.*|FLOATOPTS = -O3 -fomit-frame-pointer ${WARN} ${TUNE}|g" arch/Linux-ARM64-armclang.arch
sed -i "s|^CC = gcc|CC = $CC|g" arch/Linux-ARM64-armclang.arch
sed -i "s|^CXX = g++|CXX = $CXX |g" arch/Linux-ARM64-armclang.arch
Set the FFTW config based on the x86_64 one. This will need to know the location of the FFTW interface for Arm Performance libraries, given by NAMD_FFTW3_DIR
, e.g. NAMD_FFTW3_DIR=${ARMPL_DIR}
, and the name of the ArmPL library armpl_lp64
.
cp arch/Linux-x86_64.fftw3 arch/Linux-ARM64.fftw3
sed -i "s|^FFTDIR=.*|FFTDIR=$NAMD_FFTW3_DIR|g" arch/Linux-ARM64.fftw3
sed -i "s|^FFTINCL=.*|FFTINCL=-I$NAMD_FFTW3_DIR/include|g" arch/Linux-ARM64.fftw3
sed -i "s|^FFTLIB=.*|FFTLIB=-L$NAMD_FFTW3_DIR/lib -larmpl_mp|g" arch/Linux-ARM64.fftw3
Finally, configure, build...
./config Linux-ARM64-armclang --with-fftw3 --without-tcl --charm-arch $CHARMARCH
cd Linux-ARM64-armclang
make -j
...and create symbolic link to the executables.
cd $INSTALL_DIR
ln -s $BUILD_DIR/NAMD_2.12_Source/Linux-ARM64-armclang/charmrun charmrun
ln -s $BUILD_DIR/NAMD_2.12_Source/Linux-ARM64-armclang/namd2 namd2
Example decks
The Apoa1 example is a standard NAMD cross-platform benchmark and suitable for small platforms.
wget http://www.ks.uiuc.edu/Research/namd/utilities/apoa1.tar.gz
tar -xf apoa1.tar.gz
`${INSTALL_DIR}/charmrun +p26 ${INSTALL_DIR}/namd2 ./apoa1/apoa1.namd`