GROMACS-4.6.1 & PLUMED-2.0 installation

1,187 views
Skip to first unread message

Thomas Evangelidis

unread,
Jul 27, 2013, 6:06:51 AM7/27/13
to plumed...@googlegroups.com
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


Giovanni Bussi

unread,
Jul 27, 2013, 8:22:25 AM7/27/13
to plumed...@googlegroups.com
Hi Thomas!

On Sat, Jul 27, 2013 at 12:06 PM, Thomas Evangelidis <tev...@gmail.com> wrote:
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.

You are right... I elaborated a bit the documentation for compiling a few days ago (you can find it on the git v2.0), but it is probably still not detailed enough. Anyway, thanks for all your mails, I think that this mailing list will be very useful for future users!
 

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

Difficult to say. I am using intel 13.1.3 with no problem on my workstation.
* Which optimization flags are you using in Makefile.conf? 
* Gromacs alone is running correctly, right?
* Can you try with an *empty* plumed.dat file, to see if the problem is in one specific feature you are using?
Is plumed compiled fully and correctly? I noticed you use plumed2/patches/patch.sh instead of "plumed patch". Does plumed2/src/lib/plumed executable exist and run?
I assume so (otherwise you have to solve that in advance).

Now, it is strange that "std::ctype<char>::_M_widen_init() const" is found when linking plumed and not found when linking gromacs.

Can you try to patch in "shared library" mode? i.e.
patch --shared -p

To briefly summarize:
patch --static (default):
links plumed to gromacs as a collection of .o files. thus, the command line options in DYNAMIC_LIBS are added to the gromacs link line. There could be confusion if you use two different versions of the same library with gromacs and plumed. Still, on some system this is the only option (require static executable)
patch --shared:
links plumed to gromacs as a shared library. You can also add to DYNAMIC_LIB the flag "-Wl,-rpath,$(LD_LIBRARY_PATH)" so that libraries linked to the plumed libraries will have hardcoded path. This is probably the most robust choice
patch --runtime:
this allows you to change the version of plumed runtime changing an environment variable. I don't think you need it now.

So, in principle if you use patch --shared and add the rpath flags to DYNAMIC_LIB the resulting library in src/lib/libplumed.so should be sort of "selfcontained", and I would be surprised if you get problems like the one you show above.

Tell us if this works for you. Thanks again for all tour feedbacks!!!


Giovanni


 


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



--
You received this message because you are subscribed to the Google Groups "PLUMED users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plumed-users...@googlegroups.com.
To post to this group, send email to plumed...@googlegroups.com.
Visit this group at http://groups.google.com/group/plumed-users.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Thomas Evangelidis

unread,
Aug 15, 2013, 1:44:09 PM8/15/13
to plumed...@googlegroups.com
Hi Giovanni!

Sorry for the late reply, I didn't have access to the internet through my laptop all these days.

I installed PLUMED-2.2 (shared mode) with GROMACS-4.6.3 using intel/12.1.1, mkl/10.2.5.035, parastation/mpi2-intel12-5.0.27-1 and fftw/3.3_intel12.1.1 modules, and surprisingly BEMD runs fine!

I still haven't managed to compile GROMACS with the MKL libraries. If you have any configuration commandline please send it. I use the following without any success:

cmake ../gromacs-4.6.3 -DGMX_DOUBLE:BOOL=ON -DGMX_GPU=OFF -DGMX_OPENMM=OFF -DGMX_MPI:BOOL=ON -DGMX_DEFAULT_SUFFIX:BOOL=ON -DCMAKE_INSTALL_PREFIX=`pwd` -DGMX_FFT_LIBRARY=mkl -DMKL_LIBRARIES=$MKLPATH -DMKL_INCLUDE_DIR=$MKLINCLUDE

I shall let you know if I notice anything bizarre.

thanks,
Thomas



--
You received this message because you are subscribed to a topic in the Google Groups "PLUMED users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/plumed-users/aCMSa5nio6w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to plumed-users...@googlegroups.com.

To post to this group, send email to plumed...@googlegroups.com.
Visit this group at http://groups.google.com/group/plumed-users.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--

======================================================================

Thomas Evangelidis

PhD student

University of Athens
Faculty of Pharmacy
Department of Pharmaceutical Chemistry
Panepistimioupoli-Zografou
157 71 Athens
GREECE

email: tev...@pharm.uoa.gr

          tev...@gmail.com


website: https://sites.google.com/site/thomasevangelidishomepage/


edm...@gmail.com

unread,
Feb 8, 2014, 10:29:20 AM2/8/14
to plumed...@googlegroups.com

Plumed sounds like a great util, but it remains to be implemented at a level that can be used by members of other labs . . . We'll see how version 3.0 turns out :( Impossible to get the thing running

Jim Pfaendtner

unread,
Feb 8, 2014, 10:37:03 AM2/8/14
to plumed...@googlegroups.com
Dear Prospective User,

There are MANY tutorials and instructions online on how to get going and get started.  Moreover the PLUMED developer community work TIRELESSLY to support new users and help them get going with their projects.  They do this on a 100% volunteer basis because of their love for enhanced sampling and all things "Meta*". 

I'm not a developer myself, I just want to note that when you say "Impossible to get the thing running", it is not really an accurate reflection of the effort that has gone into this important contribution to the scientific community. 

Keep at it and good luck! I know you will get it running, and it is worth the effort. 

You could also try the TCL interface in NAMD instead, scripting languages are a great place to start if you are not able to compile code yourself. 

Jim Pfaendtner

Giovanni Bussi

unread,
Feb 8, 2014, 11:26:13 AM2/8/14
to plumed...@googlegroups.com
Thanks Jim. Giovanni

Inviato da iPhone
Reply all
Reply to author
Forward
0 new messages