Compiling NAMD 2.7 on Phase 3
Setup environment
Use the GNU compiler suite and the FFTW 2 library.
unset CFLAGS module swap PrgEnv-pgi PrgEnv-gnu module add fftw/2.1.5.2
Full module list for the centrally compiled version:
Currently Loaded Modulefiles: 1) modules/3.2.6.6 2) nodestat/2.2-1.0400.29866.4.3.gem 3) sdb/1.0-1.0400.30000.6.18.gem 4) MySQL/5.0.64-1.0000.4667.20.1 5) lustre-cray_gem_s/1.8.4_2.6.32.45_0.3.2_1.0400.6221.1.1-1.0400.30252.1.29 6) udreg/2.3.1-1.0400.3911.5.6.gem 7) ugni/2.3-1.0400.3912.4.29.gem 8) gni-headers/2.1-1.0400.3906.5.1.gem 9) dmapp/3.2.1-1.0400.3965.10.12.gem 10) xpmem/0.1-2.0400.29883.4.6.gem 11) hss-llm/6.0.0 12) Base-opts/1.0.2-1.0400.29823.8.1.gem 13) xtpe-network-gemini 14) PrgEnv-gnu/4.0.30 15) xt-mpich2/5.3.4 16) atp/1.3.0 17) xt-asyncpe/5.03 18) pmi/2.1.4-1.0000.8596.8.9.gem 19) xt-libsci/11.0.03 20) gcc/4.6.1 21) pbs/10.4.0.101257 22) packages-phase2b 23) budgets/1.0 24) xtpe-interlagos 25) fftw/2.1.5.2
Build TCL
Download and unpack the TCL source tarball (you must use TCL 8.4). Go to subdirectory: tcl8.4.19/unix and Configure TCL with:
./configure --enable-gcc --disable-load --disable-shared --disable-threads --prefix=/usr/local/packages/2.7/tcl8.4
Modify the Makefile options to the following:
CC=cc -pipe -m64 -minline-all-stringops -march=native CFLAGS_OPTIMIZE=-O3 ENV_FLAGS=-DNO_UNAME
Build TCL with:
make clean make make install
Install CHARMM++
The version of CHARMM++ bundled with NAMD 2.7 version does not work on HECToR phase 3 so you should download and use CHARM++ version 6.1 instead.
Unzip the charm source
tar -xvf charm.6.1.tar
Modify charm-6.1/src/arch/mpi-crayxt/conv-mach.sh to remove all references to -lrca.
Build CHARMM++
cd charm-6.1 ./build charm++ mpi-crayxt -O -DCMK_OPTIMIZE=1
Build NAMD
Modify arch/CRAY-XT.fftw to:
FFTLIB=-lsrfftw -lsfftw FFTFLAGS=-DNAMD_FFTW FFT=$(FFTINCL) $(FFTFLAGS)
Modify arch/CRAY-XT.tcl to point to your TCL installtion. For example:
TCLDIR=/usr/local/packages/namd/2.7-phase3/tcl TCLINCL=-I$(TCLDIR)/include TCLLIB=-L$(TCLDIR)/lib -ltcl8.4 TCLFLAGS=-DNAMD_TCL TCL=$(TCLINCL) $(TCLFLAGS)
Make sure that the make.charm file points to the correct charm-6.1 directory for your CHARMM++ installation.
Configure NAMD:
./config CRAY-XT-g++
(If memory optimisation is required you can set this with --with-memopt option to config. See http://www.ks.uiuc.edu/Research/namd/wiki/index.cgi?NamdMemoryReduction for more information).
Make NAMD:
cd CRAY-XT-g++ make