Showing posts with label Gromacs. Show all posts
Showing posts with label Gromacs. Show all posts

Sunday, March 8, 2015

Compiling Gromacs 5.0.4 on CentOS 6

Compiling Gromacs has never been easier using the cmake. There are a few assumptions.
  1. Use MKL and Intel Compilers
  2. Use OpenMPI as the MPI-of-choice. The necessary PATH and LD_LIBRARY_PATH have been placed in .bashrc
  3. We will use SINGLE precision for speed used MDRUN and MPI Flags
Here is my configuration file using Intel Compilers
# tar xfz gromacs-5.0.4.tar.gz
# cd gromacs-5.0.4
# mkdir build
# cd build

# /usr/local/cmake-3.1.3/bin/cmake -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON 
-DCMAKE_INSTALL_PREFIX=/usr/local/gromacs-5.0.4 -DGMX_MPI=on -DGMX_FFT_LIBRARY=mkl 
-DGMX_DOUBLE=off -DGMX_BUILD_MDRUN_ONLY=on -DCMAKE_C_COMPILER=icc -DCMAKE_CXX_COMPILER=icpc

# make
# make check
# sudo make install
# source /usr/local/gromacs/bin/GMXRC

References:
  1.  Compiling Gromacs 5.0.4 on CentOS 6 (linuxcluster.wordpress.com)

Thursday, July 11, 2013

Compiling and Installing Gromacs 4.6.2 with OpenMPI and Intel on CentOS


Step 1: Compiling cmake To compile Gromacs 4.6.2, first you need to compile cmake 2.8 and above. At this point in writing, the current version is cmake 2.8.11.2
# tar -zxvf cmake-2.8.11.2.tar.gz
# cd cmake-2.8.11.2
# ./configure --prefix=/usr/local/cmake-2.8.11.2
# make
# make install

Step 2: Installing OpenMPI
See Blog Entry Building OpenMPI with Intel Compilers

Step 3: Installing FFTW (Single and Double Precision) 
See Blog Entry Compiling and installing FFTW 3.3.3.  

Step 4: Compiling Gromacs 4.6.2 (Single-Precision with Intel and OpenMPI)
# tar -zxvf gromacs-4.6.2.tar.gz
# cd gromacs-4.6.2
# mkdir build-cmake
# cd build-cmake
# CC=icc CMAKE_PREFIX_PATH=/usr/local/fftw-3.3.3-single/ /usr/local/cmake-2.8.11.2/bin/cmake .. 
-DCMAKE_INSTALL_PREFIX=/usr/local/gromacs-4.6.2-single-intel -DGMX_X11=OFF -DGMX_MPI=ON 
-DGMX_PREFER_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF
# make
# make install

Step 5: Compiling Gromacs 4.6.2 (Double Precision with Intel and OpenMPI)
# tar -zxvf gromacs-4.6.2.tar.gz
# cd gromacs-4.6.2
# mkdir build-cmake
# cd build-cmake
# CC=icc CMAKE_PREFIX_PATH=/usr/local/fftw-3.3.3-single/ /usr/local/cmake-2.8.11.2/bin/cmake .. 
-DCMAKE_INSTALL_PREFIX=/usr/local/gromacs-4.6.2-single-intel -DGMX_X11=OFF -DGMX_MPI=ON 
-DGMX_PREFER_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF -DGMX_DOUBLE=ON# make
# make install
For more information,
  1. Compiling Gromacs 4.6 and PLUMED from Source
  2. Gromacs Installation instructions

Tuesday, September 20, 2011

/.../libfftw3f.a: could not read symbols: Bad value when compiling Gromacs

If you encounter this error like " /.../libfftw3f.a: could not read symbols: Bad value when compiling Gromacs ", it is likely due to that the compilation of FFTW did not enable shared libraries "--enable-shared" . GROMACS seems to require shared libraries extension from FFTW. So do follow the steps listed in
  1. Installing FFTW
  2. Installing Gromacs 4.0.x on CentOS 5.x
you should have a clean compilation

Wednesday, March 23, 2011

Installing Gromacs 4.0.x on CentOS 5.x


GROMACS is a versatile package to perform molecular dynamics, i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles.

 
It is primarily designed for biochemical molecules like proteins, lipids and nucleic acids that have a lot of complicated bonded interactions, but since GROMACS is extremely fast at calculating the nonbonded interactions (that usually dominate simulations) many groups are also using it for research on non-biological systems, e.g. polymers

Do note that this Gromacs Installation Guide is for Gromacs 4.0.x. For detailed instruction, see GROMACS Installation Instructions. For installation of FFTW, you may want to take a look at Blogh Entry Installing FFTW

Since I'm using FFTW, MPI (OpenMPI to be exact) and configure FFTW with --prefix=/usr/local/fftw,

I've configured the following

# ./configure CPPFLAGS="-I/usr/local/fftw/include" LDFLAGS="-L/usr/local/fftw/lib" \ 
--with-fft=fftw3 --enable-mpi --disable-float
Some notes...... (Assuming you are using bash)


  1. CPPFLAGS="-I/usr/local/fftw/include"
  2. LDFLAGS="-L/usr/local/fftw/lib"
  3. To compile with FFTW version 3 "--with-fft=fftw3"
  4. To enable MPI "--enable-mpi"
  5. To select Double precision  "--disable-float"
# make -j 8
where 8 is the number of cores.

# make mdrun
* if you have configure with "--enable-mpi"
# make install
* Install all the binaries, libraries and shared data files with:
# make install-mdrun
* If you only want to build the mdrun executable (in the case of an MPI build),

# make links
* If you want to create links in /usr/local/bin to the installed GROMACS executables