Installing NWChem in on 64-bit Linux Cluster (CentOS, OpenMPI, Infiniband)

NWChem is a suite of computational chemistry tools that are scalable both in their ability to treat large scientific computational chemistry problems efficiently, and in their use of available parallel computing resources from high-performance parallel supercomputers to conventional workstation clusters.


mkdir /usr/local/src/NWCHEM
cd /usr/local/src/NWCHEM
wget http://www.nwchem-sw.org/download.php?f=Nwchem-6.3.revision2-src.2013-10-17.tar.gz
tar xvf Nwchem-6.3.revision2-src.2013-10-17.tar.gz
mv nwchem-6.3.revision2-src.2013-10-17 nwchem-6.3.2

You must use GNU make with a version of at least 3.71.

make -v

Set the environment variable, NWCHEM_TOP, to the top directory of the NWChem tree (where *this* file lives), and change to the source directory e.g.

export NWCHEM_TOP=/usr/local/src/NWCHEM/nwchem-6.3.2
cd $NWCHEM_TOP/src

NWchem doesn't believe in autoconfiguration. Instead it has a collection of alternative makefiles. Fortunately this includes LINUX64 x86_64, also for PGI and Intel compilers.

export NWCHEM_TARGET=LINUX64

ARMCI_NETWORK must be defined in order to achieve best performance on high performance networks, .e.g.

export ARMCI_NETWORK=OPENIB

MPI variables are needed to compile. Use MPI bindings, use fortran bindings and integer*4 fortran-bindings of MPI.


module load openmpi-gcc/1.6.5
export USE_MPI=y
export USE_MPIF=y
export USE_MPIF4=y
export MPI_LOC=/usr/local/openmpi/1.6.5-gcc/
export LIBMPI="-lmpi_f90 -lmpi_f77 -lmpi -ldl -Wl,--export-dynamic -lnsl -lutil"
export MPI_LIB=/usr/local/openmpi/1.6.5-gcc/lib
export MPI_INCLUDE=/usr/local/openmpi/1.6.5-gcc/include

Note that we're using the (currently stable) version of OpenMPI.

Include the NWchem modules and make the suite.


cd $NWCHEM_TOP/src
make nwchem_config NWCHEM_MODULES=all
make

This will take "a while".

Have a coffee and a round of Conquer Club.

This should install the executables and libraries into a platform-specific subdirectories in the directory tree.

i.e.,
$NWCHEM_TOP/bin/Linux64 (executables)
$NWCHEM_TOP/lib/Linux64 (libraries)

These should be put somewhere more sensible; and made available.


mkdir -p /usr/local/nwchem/6.3.2/bin
mkdir -p /usr/local/nwchem/6.3.2/lib
cp $NWCHEM_TOP/bin/LINUX64/* /usr/local/nwchem/6.3.2/bin
cp $NWCHEM_TOP/lib/LINUX64/* /usr/local/nwchem/6.3.2/lib
chmod -R 0755 /usr/local/nwchem/6.3.2/lib

Also make and copy data directory information; make that available too.


mkdir -p /usr/local/nwchem/6.3.2/data
cd $NWCHEM_TOP/src/basis
cp -r libraries /usr/local/nwchem/6.3.2/data
cd $NWCHEM_TOP/src/
cp -r data /usr/local/nwchem/6.3.2
cd $NWCHEM_TOP/src/nwpw
cp -r libraryps /usr/local/nwchem/6.3.2/data
chmod -R 0755 /usr/local/nwchem/6.3.2/data

Create an environment module file with the following content for .base


#%Module1.0#####################################################################
##
## $name modulefile
##
set ver [lrange [split [ module-info name ] / ] 1 1 ]
set name [lrange [split [ module-info name ] / ] 0 0 ]
set loading [module-info mode load]
set desc [join [read [ open "/usr/local/Modules/modulefiles/$name/.desc" ] ] ]
proc ModulesHelp { } {
puts stderr "\tThis module sets the envinronment for $name v$ver"
}
if { $loading && ![ is-loaded openmpi-gcc/1.6.5 ] } {
module load openmpi-gcc/1.6.5 }
module-whatis "$desc (v$ver)"
prepend-path LD_LIBRARY_PATH /usr/local/$name/$ver/lib
prepend-path PATH /usr/local/$name/$ver/bin
system ln -s /usr/local/nwchem/$ver/data/default.nwchemrc $::env(HOME)/.nwchemrc

Also create a .version and .whatis file as appropriate for modules.

Finally create the default .nwchemrc in /usr/local/nwchem/6.3.2/ with the following content.


nwchem_basis_library /usr/local/nwchem/6.3.2/data/libraries/
nwchem_nwpw_library /usr/local/nwchem/6.3.2/data/libraryps/
ffield amber
amber_1 /usr/local/nwchem/6.3.2/data/amber_s/
amber_2 /usr/local/nwchem/6.3.2/data/amber_q/
amber_3 /usr/local/nwchem/6.3.2/data/amber_x/
amber_4 /usr/local/nwchem/6.3.2/data/amber_u/
spce /usr/local/nwchem/6.3.2/data/solvents/spce.rst
charmm_s /usr/local/nwchem/6.3.2/data/charmm_s/
charmm_x /usr/local/nwchem/6.3.2/data/charmm_x/