Installing NAMD 2.7b1 on a 64-bit AMD Opteron Cluster running CentOS 5 Linux
Download the tarball (registration required), put it somewhere sensible (e.g.,
/usr/local/src/NAMD) and unpack (
tar xvf NAMD_2.7b1_Source.tar.gz) and enter that directory.
tar xzf NAMD_2.7b1_Source.tar.gz
Note the comment in the notes.txt (where the useful information is kept)
"Building a complete NAMD binary from source code requires working C and C++ compilers, Charm++/Converse, TCL, and FFTW. NAMD will compile without TCL or FFTW but certain features will be disabled."
Load the appropriate modules you will need for this install.
module load gcc/4.3.3
module load fftw/2.1.5-gcc-openmpi
module load tcl/8.5.3
module load openmpi/1.3.3-gcc
NB: This was initially installed with OpenMPI 1.3.1, which has a bug relating to InfiniBand. Please use OpenMPI 1.3.2
This will vary according to the installation of NAMD you are building. e.g.,
module load pgi/8.0
module load fftw/2.1.5-pgi-openmpi
module load tcl/8.5.3
module load openmpi-pgi/1.3.2
Within the new directory there will be a tar file for the Charm++ source code. Unpack this and enter that directory. Build and test the Charm++/Converse library with the following commands:
tar xf charm-6.1.tar
./build charm++ mpi-linux-x86_64 --no-shared -O -DCMK_OPTIMIZE=1
mpiexec -n 2 ./pgm
It should work like a charm (haha).
Make your way back up to the source directory and either follow the instructions in the readme.txt for installing the TCL and FFTW libraries or, in this particular case, load the modules as above. Load modules if you have not already done so (the parallel build would have failed if you did not load the
openmpi module), make a directory, and build for each FFTW, Open-MPI, GCC and PGI combination as appropriate.
Because NAMD's config file does not offer a
--prefix option, one needs to create a new directory for each combination. For example;
cp -r /usr/local/src/NAMD/NAMD_2.7b1_Source /usr/local/src/NAMD/2.7b1-openmpi-gcc
Note that there's significant differences between fftw 2.x and fftw 3.x; the former works, I haven't tried the latter.
Go into the arch directory and modify the
Linux-x86_64.tcl files so that the former includes the path
FFTDIR=/usr/local/fftw/2.1.5-gcc-openmpi and the later
TCLLIB=-L$(TCLDIR)/lib -ltcl8.5.3 -ldl
Then configure and make.
./config Linux-x86_64-g++ --charm-arch mpi-linux-x86_64
Linux-x86_64-g++ directory there will now be a
namd binary. Copy this to
/usr/local/namd/2.7b1-openmpi-gcc and create a new module
cp namd2 /usr/local/namd/2.7b1-openmpi-gcc
ln -s .base 2.7b1-openmpi-gcc
Next step; test - then you're on your way to the great world of protein folding and Modelling HIV Protease Mutations.