Tuesday, February 24, 2009

GROMACS with Intel compilers

Thanks to craigb I managed to compile GROMACS 4.0 using intel compilers.

In a simple test run GROMACS with intel compilers was atleast 33% faster than GNU compilers. IT CAN SAVE YOU 1/3rd OF YOUR TIME!!


Download and install intel compilers and math kernel libraries from Intel.
Note down your version numbers and change it where ever necessary.

Download gromacs and unzip/untar it.

Here is the step-by-step procedure I followed for installation:

1) Make changes at two place in the "configure" file

Alter
LIBS="-lmkl $LIBS"
to
LIBS="-lmkl_intel -lmkl_sequential -lmkl_core $LIBS"


2) Add the following to the ~/.bashrc file

export LD_LIBRARY_PATH="/opt/intel/mkl/10.0.4.023/lib/32"



3) To install GROMACS: (install dir is /usr/local/gromacs)

./configure CC="icc" CPPFLAGS="-I/opt/intel/mkl/10.0.4.023/include" LDFLAGS="-L/opt/intel/mkl/10.0.4.023/lib/32" --with-fft=mkl

make

make install


4) To enable mpi with mdrun: ("mdrun_mpi" will be installed)

make clean

./configure CC="icc" CPPFLAGS="-I/opt/intel/mkl/10.0.4.023/include" LDFLAGS="-L/opt/intel/mkl/10.0.4.023/lib/32" --with-fft=mkl --enable-mpi --program-suffix="_mpi"

make mdrun

make install-mdrun


5) To install GROMACS with double-precession and enable mpi: (install dir is /usr/local/gromacs_d)

make clean

./configure CC="icc" CPPFLAGS="-I/opt/intel/mkl/10.0.4.023/include" LDFLAGS="-L/opt/intel/mkl/10.0.4.023/lib/32" --with-fft=mkl --enable-mpi --program-suffix="_d" --prefix=/usr/local/gromacs_d

make

make install

No comments: