Gromacs binaries installation for Nordugrid ARC runtime environment

Preface

This document is intended to help a system administrator to install Gromacs binaries for Nordugrid ARC GROMACS and GROMACS-MPI runtime environments. There are some generic observations first followed by a walkthrough of an installation done by compiling FFTW3 and Gromacs from the source.

See http://www.gromacs.org for additional information about installing and building. There are also prebuilt binaries available should you want to use those.

Example installation

Before you start

In this example we will install Gromacs on a shared filesystem by compiling it from the source.

We aim to support multiple co-existing versions of Gromacs, so the version number is included in the installation directory name.

Walkthrough

First we make a working directory for compilation

$ cd
$ mkdir gromacs
$ cd gromacs

Then we download fftw3, unpack and compile it. Here we have only a temporary installation to $HOME/install, you might consider a more permanent approach also.

$ wget http://www.fftw.org/fftw-3.1.2.tar.gz
$ tar xvfz fftw-3.1.2.tar.gz 
$ cd fftw-3.1.2
$ ls
$ ./configure --help
$ ./configure --prefix=$HOME/install/fftw3 --enable-shared --enable-float
$ make 
$ make install
$ cd ..

Then we download and unpack Gromacs sources and set the necessary environment variables. If you are building only serial version, you may skip the variables for MPI binaries and libraries.

$ wget ftp://ftp.gromacs.org/pub/gromacs/gromacs-3.3.3.tar.gz
$ tar xvfz gromacs-3.3.3.tar.gz 
$ export PATH=/pack/openmpi-1.2.5-gnu-ib/bin/:$PATH
$ export LD_LIBRARY_PATH=/pack/openmpi-1.2.5-gnu-ib/lib/:$LD_LIBRARY_PATH
$ export CPPFLAGS="-I $HOME/install/fftw3/include/" 
$ export LDFLAGS="-L$HOME/install/fftw3/lib/" 

Time to configure and build Gromacs serial version. In this case /grid is a shared directory visible to all the cluster.

$ cd gromacs-3.3.3
$ ./configure --prefix=/grid/nordugrid-arc/appl/gromacs/3.3.3
$ make
$ make install

Then we build the parallel version using the same source tree. The binary will be installed in the same directory as the serial version, just having a _mpi -prefix.

$ make distclean
$ ./configure --prefix=/grid/nordugrid-arc/appl/gromacs/3.3.3 --enable-mpi --program-suffix=_mpi
$ make mdrun
$ make install-mdrun

Finally we copy the fftw3 library to Gromacs lib directory, making the installation independent of our temporary fftw3 installation.

$ cp $HOME/install/fftw3/lib/libfftw3f.so.3 /grid/nordugrid-arc/appl/gromacs/3.3.3/lib/