Last active
November 4, 2020 18:40
-
-
Save jandom/4bd1610e1892c61fccb0 to your computer and use it in GitHub Desktop.
Compilation instructions for gromacs 4.6.7 with plumed2 2.1-hrex (branch by Bussi) with intel-compilers, intel-mpi and intel-mkl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How to compile these two little monsters |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
module purge | |
module add intel-compilers/2015 intel-mkl/2015 mvapich2/2.0.1__intel-2015 | |
compilervars.sh intel64 | |
PREFIX=/opt/plumed/2.1-hrex | |
make clean | |
# ideally you only need to do | |
./configure --prefix=$PREFIX | |
# in practice, what you find... | |
./configure --enable-mpi CXX=mpicxx --prefix=$PREFIX | |
sed -i s#'DYNAMIC_LIBS=-lstdc++'#'DYNAMIC_LIBS=-lstdc++ -mkl'# Makefile.conf | |
make -j8 | |
make install | |
# verify the compilation | |
$ ldd `which plumed` | |
linux-vdso.so.1 => (0x00007fff895ff000) | |
libdl.so.2 => /lib64/libdl.so.2 (0x000000381dc00000) | |
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x0000003a1c400000) | |
libmkl_intel_lp64.so => /system/software/linux-x86_64/compilers/intel/intelPS-2016/mkl/lib/intel64/libmkl_intel_lp64.so (0x00007f0655909000) | |
libmkl_intel_thread.so => /system/software/linux-x86_64/compilers/intel/intelPS-2016/mkl/lib/intel64/libmkl_intel_thread.so (0x00007f06545b1000) | |
libmkl_core.so => /system/software/linux-x86_64/compilers/intel/intelPS-2016/mkl/lib/intel64/libmkl_core.so (0x00007f0652ccc000) | |
libiomp5.so => /system/software/linux-x86_64/compilers/intel/intelPS-2015/lib/intel64/libiomp5.so (0x00007f0652990000) | |
libz.so.1 => /lib64/libz.so.1 (0x000000381f000000) | |
libmpicxx.so.12 => /system/software/linux-x86_64/compilers/intel/intelPS-2016/impi/5.1.1.109/lib64/libmpicxx.so.12 (0x00007f065276f000) | |
libmpifort.so.12 => /system/software/linux-x86_64/compilers/intel/intelPS-2016/impi/5.1.1.109/lib64/libmpifort.so.12 (0x00007f06523de000) | |
libmpi.so.12 => /system/software/linux-x86_64/compilers/intel/intelPS-2016/impi/5.1.1.109/lib64/libmpi.so.12 (0x00007f0651c25000) | |
librt.so.1 => /lib64/librt.so.1 (0x000000381e800000) | |
libpthread.so.0 => /lib64/libpthread.so.0 (0x000000381e400000) | |
libm.so.6 => /lib64/libm.so.6 (0x000000381ec00000) | |
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003a1c000000) | |
libc.so.6 => /lib64/libc.so.6 (0x000000381e000000) | |
/lib64/ld-linux-x86-64.so.2 (0x000000381d800000) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
module purge | |
module add intel-compilers/2015 intel-mkl/2015 mvapich2/2.0.1__intel-2015 | |
compilervars.sh intel64 | |
wget ftp://ftp.gromacs.org/pub/gromacs/gromacs-4.6.7.tar.gz | |
tar xf gromacs-4.6.7.tar.gz ; cd gromacs-4.6.7 | |
mkdir build ; cd build | |
PREFIX=/opt/gromacs | |
cmake .. \ | |
-DGMX_USE_RDTSCP=OFF \ # better timing | |
-DGMX_FFT_LIBRARY=mkl \ # only with intel compilers, not with GCC, will give you BLAS/LAPACK/FFTW | |
-DGMX_MPI=ON \ # mpi-gromacs to run on multiple nodes | |
-DGMX_BUILD_MDRUN_ONLY=ON \ # it will only compile 'mdrun', much faster compilation | |
-DGMX_DEFAULT_SUFFIX=OFF \ # matter of style | |
-DCMAKE_INSTALL_PREFIX=$PREFIX \ # where to install | |
-DGMX_GPU=OFF \ # no need for a GPU in my scenario | |
-DGMX_SIMD=AVX_256 # important: will depend on the architecture of your cluster nodes | |
# optional | |
-DMKL_INCLUDE_DIR=${MKLROOT}/include \ | |
-DMKL_LIBRARIES="${MKLROOT}/lib/intel64/libmkl_intel_lp64.so; ${MKLROOT}/lib/intel64/libmkl_sequential.so; ${MKLROOT}/lib/intel64/libmkl_core.so" \ | |
# optional, important: will depend on the architecture of your cluster nodes | |
-DGMX_SIMD=AVX2_256 \ | |
-DCMAKE_C_FLAGS="-O3 -xCORE-AVX2 -ip" \ | |
-DCMAKE_CXX_FLAGS="-O3 -xCORE-AVX2 -ip" \ | |
make -j16 | |
cd .. | |
plumed patch -p << EOF | |
3 | |
EOF | |
cd build | |
make -j16 | |
make install | |
# verify the compilation | |
source /opt/gromacs/bin/GMXRC.bash | |
ldd `which mdrun ` | |
linux-vdso.so.1 => (0x00007ffff97ff000) | |
libmkl_intel_lp64.so => /system/software/linux-x86_64/compilers/intel/intelPS-2016/mkl/lib/intel64/libmkl_intel_lp64.so (0x00007fc2bb948000) | |
libmkl_intel_thread.so => /system/software/linux-x86_64/compilers/intel/intelPS-2016/mkl/lib/intel64/libmkl_intel_thread.so (0x00007fc2ba5f1000) | |
libmkl_core.so => /system/software/linux-x86_64/compilers/intel/intelPS-2016/mkl/lib/intel64/libmkl_core.so (0x00007fc2b8d0c000) | |
libiomp5.so => /system/software/linux-x86_64/compilers/intel/intelPS-2015/lib/intel64/libiomp5.so (0x00007fc2b89cf000) | |
libgmxpreprocess.so.8 => /home/sbcb-membr/jdomanski/privateopt/gromacs-4.6.7_plumed2.1-hrex-wenwei-icc/bin/../lib/libgmxpreprocess.so.8 (0x00007fc2b86fe000) | |
libmd.so.8 => /home/sbcb-membr/jdomanski/privateopt/gromacs-4.6.7_plumed2.1-hrex-wenwei-icc/bin/../lib/libmd.so.8 (0x00007fc2b81c5000) | |
libgmx.so.8 => /home/sbcb-membr/jdomanski/privateopt/gromacs-4.6.7_plumed2.1-hrex-wenwei-icc/bin/../lib/libgmx.so.8 (0x00007fc2b7ac0000) | |
libdl.so.2 => /lib64/libdl.so.2 (0x000000381dc00000) | |
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x0000003a1c400000) | |
libz.so.1 => /lib64/libz.so.1 (0x000000381f000000) | |
libmpifort.so.12 => /system/software/linux-x86_64/compilers/intel/intelPS-2016/impi/5.1.1.109/intel64/lib/libmpifort.so.12 (0x00007fc2b7717000) | |
libmpi.so.12 => /system/software/linux-x86_64/compilers/intel/intelPS-2016/impi/5.1.1.109/intel64/lib/libmpi.so.12 (0x00007fc2b6f5f000) | |
librt.so.1 => /lib64/librt.so.1 (0x000000381e800000) | |
libpthread.so.0 => /lib64/libpthread.so.0 (0x000000381e400000) | |
libm.so.6 => /lib64/libm.so.6 (0x000000381ec00000) | |
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003a1c000000) | |
libc.so.6 => /lib64/libc.so.6 (0x000000381e000000) | |
/lib64/ld-linux-x86-64.so.2 (0x000000381d800000) | |
libmkl_sequential.so => /system/software/linux-x86_64/compilers/intel/intelPS-2016/mkl/lib/intel64/libmkl_sequential.so (0x00007fc2b66b5000) | |
libimf.so => /system/software/linux-x86_64/compilers/intel/intelPS-2015/lib/intel64/libimf.so (0x00007fc2b61fa000) | |
libsvml.so => /system/software/linux-x86_64/compilers/intel/intelPS-2015/lib/intel64/libsvml.so (0x00007fc2b5327000) | |
libirng.so => /system/software/linux-x86_64/compilers/intel/intelPS-2015/lib/intel64/libirng.so (0x00007fc2b511f000) | |
libintlc.so.5 => /system/software/linux-x86_64/compilers/intel/intelPS-2015/lib/intel64/libintlc.so.5 (0x00007fc2b4ec4000) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@samcom12 happy to help – so many years after it was published!