Compiling NAMD-2.11 with Intel 2013-SP1 and iMPI 4.1.3 and FFTW-2.1.5


Step 1: Prepare for Environment Setup

source /usr/local/intel_2013sp1/composerxe/mkl/bin/mklvars.sh intel64
source /usr/local/intel_2013sp1/composerxe/bin/compilervars.sh intel64
source /usr/local/intel_2013sp1/impi/4.1.3.048/intel64/bin/mpivars.sh intel64
source /usr/local/intel_2013sp1/composerxe/tbb/bin/tbbvars.sh intel64
source /usr/local/intel_2013sp1/itac/8.1.4.045/intel64/bin/itacvars.sh

export CC=icc
export CXX=icpc
export F77=ifort
export F90=ifort

Step 2: Building FFTW-2.1.5 with Intel

$ wget http://www.fftw.org/fftw-2.1.5.tar.gz
$ tar -zxvf fftw-2.1.5.tar.gz
$ cd fftw-2.1.5
$ ./configure F77=ifort CC=icc CFLAGS=-O3 FFLAGS=-O3 --enable-threads --enable-float --enable-type-prefix --prefix=/usr/local/fftw-2.1.5_intel-4.1.3
$ make -j 16
$ make install

Step 3: Building CHARM-6.7.0

$ tar -zxvf NAMD_2.11_Source.tar.gz
$ export $NAMD_SRC=$PWD/NAMD_2.11_Source
$ cd $NAMD_SRC
$ tar -xvf charm-6.7.0.tar
$ MPICXX=mpiicpc CXX=icpc ./build charm++  mpi-linux-x86_64 mpicxx ifort --with-production --no-shared -O3 -DCMK_OPTIMIZE=1
$ cd $NAMD_SRC

Step 4: Building TCL-8.5.9

$ wget http://www.ks.uiuc.edu/Research/namd/libraries/tcl8.5.9-linux-x86_64.tar.gz
$ wget http://www.ks.uiuc.edu/Research/namd/libraries/tcl8.5.9-linux-x86_64-threaded.tar.gz
$ tar xzf tcl8.5.9-linux-x86_64.tar.gz
$ tar xzf tcl8.5.9-linux-x86_64-threaded.tar.gz
$ mv tcl8.5.9-linux-x86_64 tcl-8.5.9
$ mv tcl8.5.9-linux-x86_64-threaded tcl-8.5.9-threaded

Step 5: Setup the CHARMBASE in $NAMD_SRC for Make.charm

# Set CHARMBASE to the top level charm directory.
# The config script will override this setting if there is a directory
# called charm-6.7.0 or charm in the NAMD base directory.
CHARMBASE = /home/user1/NAMD/NAMD_2.11_Source/charm-6.7.0

Step 6: Setup the FFTW architecture files in $NAMD_SRC/arch

$ vim $NAMD_SRC/arch/Linux-x86_64.fftw
FFTDIR=/usr/local/fftw-2.1.5_intel-14.0.2
FFTINCL=-I$(FFTDIR)/include
FFTLIB=-L$(FFTDIR)/lib -lsrfftw -lsfftw
FFTFLAGS=-DNAMD_FFTW
FFT=$(FFTINCL) $(FFTFLAGS)

Step 7: Setup the TCL architecture files in $NAMD_SRC/arch

 $ vim $NAMD_SRC/arch/Linux-x86_64.tcl
TCLDIR=/usr/local/tcl8.5.9-threaded
TCLINCL=-I$(TCLDIR)/include
TCLLIB=-L$(TCLDIR)/lib -ltcl8.5 -ldl -lpthread
TCLFLAGS=-DNAMD_TCL
TCL=$(TCLINCL) $(TCLFLAGS)

Step 8: Setup the $NAMD_SRC/Linux-x86_64-ics-2013.arch

$ vim Linux-x86_64-ics-2013.arch
NAMD_ARCH = Linux-x86_64
CHARMARCH = mpi-linux-x86_64-ifort-mpicxx
FLOATOPTS = -O2
CXX = icpc -std=c++11
CXXOPTS = -static-intel -O2 $(FLOATOPTS)
CXXNOALIASOPTS = -O3 -fno-alias $(FLOATOPTS)
CC = icc
COPTS = -static-intel -O2 $(FLOATOPTS)

Step 9: Compile the Code.

$ ./config Linux-x86_64-ics-2013 --charm-base ./charm-6.7.0 --charm-arch mpi-linux-x86_64-ifort-mpicxx
$ cd Linux-x86_64-ics-2013
$ make -j 16

You should see the namd2 executable

Step 10: mpirun

$ mpirun -np 32 -machinefile $MACHINEFILE namd2  something.conf > job$LSB_JOBID.log

References:

  1. How to install NAMD 2.9 with Intel Cluster Studio 2013 on Intel Sandy Bridge architecture and IB support
  2. Compiling NAMD
  3. Namd-old
  4. How To Compile and Run NAMD (MPI Version)
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s