[gmx-users] (cross-)compiling mdrun independently from the rest of gromacs tools

Vedat Durmaz vedat.durmaz at gmx.net
Mon Mar 25 14:28:04 CET 2019


hi guys,

according to the gromacs installation instructions (i think a saw it
here:
http://manual.gromacs.org/documentation/2018/install-guide/index.html)
it could make sense to compile gromacs mdrun independently from the
other gromacs tools in order to have a cross-compiled installation
working with compiler optimization flags.

i am compiling gromacs inside a singularity container on a local machine
and running it on a cluster. it works fine, but since i want to use high
level compiler flags for simulation optimization (e.g. AVX_256) which is
not available on the login nodes where i want to (need to) run commands
such as editconf, solvate, etc., but available on the cluster nodes
where mdrun is executed, i indeed need to compile mdrun independently
from the rest. i just don't know how exactly to achieve that. currently,
i'm compiling in two stages (non-mpi and mpi version) inside the container:

GMXVSN="gromacs-2018.1" #"gromacs-5.1.2"
TOOLPATH=/opt

## first round (without MPI)
tar xzf ${GMXVSN}.tar.gz
mv ${GMXVSN} ${GMXVSN}_src
mkdir ${GMXVSN}
cd ${GMXVSN}_src
mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=${TOOLPATH}/${GMXVSN}
-DGMX_BUILD_OWN_FFTW=ON -DGMX_MPI=OFF -DGMX_USE_RDTSCP=OFF
-DGMX_THREAD_MPI=OFF -DGMX_DEFAULT_SUFFIX=OFF -DGMX_SIMD=SSE2
make
make install
cd ${TOOLPATH}
rm -r ${GMXVSN}_src
mv ${GMXVSN} ${GMXVSN}_BAK    # backup install dir

## second round (with MPI)
tar xzf ${GMXVSN}.tar.gz
mv ${GMXVSN} ${GMXVSN}_src
mv ${GMXVSN}_BAK ${GMXVSN}    # restore install dir to put in mdrun_mpi
cd ${GMXVSN}_src
mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=${TOOLPATH}/${GMXVSN}
-DGMX_BUILD_OWN_FFTW=ON -DGMX_MPI=ON -DGMX_USE_RDTSCP=OFF
-DGMX_THREAD_MPI=OFF -DGMX_BUILD_MDRUN_ONLY=ON -DBUILD_SHARED_LIBS=OFF
-DGMX_BINARY_SUFFIX="_mpi" -DGMX_SIMD=SSE2
make
make install
cd ${TOOLPATH}
. ${GMXVSN}/bin/GMXRC


would some expert please give me an as concrete as possible hint, where
to put which modification in order to have mdrun compiled separately
(with AVX_256) from the other tools?

many thanks in advance & best wishes

vedat




More information about the gromacs.org_gmx-users mailing list