Pages

28 January 2011

3. Compiling nwchem on Ubuntu 10.10 64 bit

** See post on 15/12/2011 for information about Debian 64 bit. It builds fine on Squeeze but not Wheezy. This seems to have to do with the version of mpich2.**

Figuring out how to compile nwchem with mpich support took a little while, but this seems to have worked:

First mpich2 and gfortran need to be installed (since it was not installed on a virgin system there may have been other required packages already installed)
sudo apt-get install mpich2 gfortran

I created a file called myconfig.sh in the nwchem directory, with the following content:

setenv LARGE_FILES TRUE
setenv TCGRSH /usr/local/bin/ssh
setenv NWCHEM_TOP /work/nwchem
setenv NWCHEM_TARGET LINUX64
setenv NWCHEM_MODULES all
setenv USE_MPI y
setenv USE_MPIF y
setenv MPI_LOC /usr
setenv MPI_LIB $MPI_LOC/lib
setenv MPI_INCLUDE $MPI_LOC/include/mpich2
setenv LIBMPI "-lfmpich -lmpich"
cd $NWCHEM_TOP/src
make nwchem_config
make FC=gfortran >& make.log


do a csh myconfig.sh and you should be good to go.

I then added the following to the end of my ~/.bashrc and sourced it:

PATH=$PATH://work/nwchem/bin/LINUX64
export NWCHEM_EXECUTABLE=/work/nwchem/bin/LINUX64/nwchem


Jobs can then be submitted (assuming that mpd is up) by
mpdrun -n 2 nwchem nameofjob.nw

2 comments:

  1. This doesn't quite work on Debian testing (wheezy) using mpich2 v1.4. You can use binaries compiled under ubuntu 10.10 according to the instructions above, but will have to install libfmpich1.2 separately, since there otherwise are unmet dependencies.

    I will try a newer version of NWChem some time during the end of the year and report back.

    ReplyDelete
  2. Nwchem is in the debian testing repos since April 2011. However, it does not seem to be supported by mpich -

    mpiexec -np 5 nwchem test.nw

    submits the same job five times, rather than as a single distributed job. I'm still using the binaries compiled under ubuntu 10.10 on my debian system for distributed jobs.

    ReplyDelete