Greetings,
Before I elaborate into my problem I would like to suggest to add compilation instructions in the documentation using both GNU and Intel compilers.
Now let's get back to the topic. I have managed to compile GROMACS-4.6.1 & PLUMED-2.0 using the Intel compilers (intel/11.1.072), intel-compiled mpich2 (parastation/mpi2-intel-5.0.26-1) and gnu compiled (gcc/4.5.1-64bit) double precision fftw3.3.3 on JUROPA (
http://www.fz-juelich.de/ias/jsc/EN/Expertise/Supercomputers/JUROPA/JUROPA_node.html). The problem is when I submit a job which runs normally on my laptop, I get some strange segmentation
faults which I cannot explain:
PSIlogger: Child with rank 9 exited on signal 11: Segmentation fault
PSIlogger: Child with rank 3 exited on signal 11: Segmentation fault
PSIlogger: Child with rank 2 exited on signal 11: Segmentation fault
Therefore I turned to GNU compilers this time, after recalling that in the past I have managed to run GNU-compiled GROMACS-4.5.5 & PLUMED-1.3 on the same cluster. The steps I followed are provided below:
module purge
module load gcc/4.5.1-64bit parastation/mpi2-gcc-5.0.26-1
export LD_LIBRARY_PATH=$MPIHOME/lib:$MPIHOME/include:$LD_LIBRARY_PATH
cd ~/Programs/plumed-2.0_gnu
# add the header and library paths to LD_LIBRARY_PATH otherwise plumed-2.0 won't find libmatheval.so.1
export LD_LIBRARY_PATH=/lustre/jhome19/esmi19/esmi1901/Programs/libmatheval/lib/.libs:$LD_LIBRARY_PATH
export PLUMED_PREFIX=`pwd`/build
export PLUMED_LIBSUFFIX=_2.0
./configure.sh # choose 3) linux.mpi.gcc
export PLUMED_ROOT="/lustre/jhome19/esmi19/esmi1901/Programs/plumed-2.0_gnu"
source $PLUMED_ROOT/sourceme.sh
# open Makefile.conf file
# change DYNAMIC_LIBS to this (adjust the path to libmatheval):
DYNAMIC_LIBS=-lstdc++ -llapack -lblas -lmatheval -L/lustre/jhome19/esmi19/esmi1901/Programs/libmatheval/lib/.libs -L/usr/local/parastation/mpi2-5.0.26-1/lib
# change CPPFLAGS to this (adjust the path to libmatheval):
CPPFLAGS=-D__PLUMED_HAS_DLOPEN -D__PLUMED_MPI $(CHECK_BOUNDARIES) -I. $(PLUMED_INCLUDE) -D__PLUMED_HAS_MATHEVAL -I/lustre/jhome19/esmi19/esmi1901/Programs/libmatheval/lib -I/usr/local/parastation/mpi2-5.0.26-1/include
# change LDFLAGS to this (adjust the path to libmatheval):
LDFLAGS=-rdynamic -L/lustre/jhome19/esmi19/esmi1901/Programs/libmatheval/lib/.libs -L/usr/local/parastation/mpi2-5.0.26-1/lib
# now compile plumed-2.0
make -j8
make -j8 doc
export FFTW_ROOT=/lustre/jhome19/esmi19/esmi1901/Programs/fftw-3.3.3/double_precision_GNU_build/
export PKG_CONFIG_PATH=$FFTW_ROOT/lib/pkgconfig
# ATTENTION: DO NOT CREATE IN-SOURCE BUILD WITH GROMACS-4.6.1 !!!
rm -rf gromacs-4.6.1; tar xvfz gromacs-4.6.1.tar.gz;
rm -rf gromacs-4.6.1_gnu_mpich2_plumed2.0; mkdir gromacs-4.6.1_gnu_mpich2_plumed2.0; cd gromacs-4.6.1_gnu_mpich2_plumed2.0
gmake distclean
gmake clean
## NOTE: PLUMED does not work with the threaded GROMACS version, hence we proceed directly to MPI version installion
export PLUMED_ROOT="/lustre/jhome19/esmi19/esmi1901/Programs/plumed-2.0_gnu"
source $PLUMED_ROOT/sourceme.sh
cd ../gromacs-4.6.1; echo 2 | ${PLUMED_ROOT}/patches/patch.sh -r; cd ../gromacs-4.6.1_gnu_mpich2_plumed2.0
module unload cmake
module load cmake #(get rid of old 2.6 cmake version)
cmake ../gromacs-4.6.1 -DGMX_DOUBLE:BOOL=ON -DGMX_GPU=OFF -DGMX_OPENMM=OFF -DGMX_MPI:BOOL=ON -DGMX_DEFAULT_SUFFIX:BOOL=ON -DCMAKE_INSTALL_PREFIX=`pwd` \
-DFFTW_LIBRARY="$FFTW_ROOT/lib/libfftw3.so" -DFFTW_INCLUDE_DIR="$FFTW_ROOT/include"
cd ../gromacs-4.6.1; echo 2 | $PLUMED_ROOT/patches/patch.sh -p; cd ../gromacs-4.6.1_gnu_mpich2_plumed2.0
gmake
And this is the error I get:
[ 70%] Building C object src/kernel/CMakeFiles/mdrun.dir/main.c.o
Linking C executable mdrun_mpi_d
/lustre/jhome19/esmi19/esmi1901/Programs/plumed-2.0_gnu/src/core/FlexibleBin.o: In function `PLMD::FlexibleBin::update(bool)':
FlexibleBin.cpp:(.text+0xac8): undefined reference to `std::ctype<char>::_M_widen_init() const'
/lustre/jhome19/esmi19/esmi1901/Programs/plumed-2.0_gnu/src/tools/Kearsley.o: In function `PLMD::Kearsley::calculate(bool)':
Kearsley.cpp:(.text+0x83c): undefined reference to `std::ctype<char>::_M_widen_init() const'
Kearsley.cpp:(.text+0x1720): undefined reference to `std::ctype<char>::_M_widen_init() const'
Kearsley.cpp:(.text+0x1894): undefined reference to `std::ctype<char>::_M_widen_init() const'
/lustre/jhome19/esmi19/esmi1901/Programs/plumed-2.0_gnu/src/tools/OptimalAlignment.o: In function `PLMD::OptimalAlignment::weightedAlignment(bool)':
OptimalAlignment.cpp:(.text+0x86d): undefined reference to `std::ctype<char>::_M_widen_init() const'
/lustre/jhome19/esmi19/esmi1901/Programs/plumed-2.0_gnu/src/tools/OptimalAlignment.o:OptimalAlignment.cpp:(.text+0x9c9): more undefined references to `std::ctype<char>::_M_widen_init() const' follow
collect2: ld returned 1 exit status
gmake[2]: *** [src/kernel/mdrun_mpi_d] Error 1
gmake[1]: *** [src/kernel/CMakeFiles/mdrun.dir/all] Error 2
gmake: *** [all] Error 2
Questions:
1) Has anyone encountered these segmentation faults and know how to avoid them?
2) How can I fix the error above with gromacs installation?
3) Can anyone provide the correct cmake flags to install GROMACS-4.6.1 & PLUMED-2.0 with mkl instead of fftw3? All the
combination I tried failed.
I thank you in advance,
Thomas