[gmx-users] gromacs 2018 compilation problem with stdlib

Mark Abraham mark.j.abraham at gmail.com
Mon Jul 16 17:12:58 CEST 2018


Hi,

Unfortunately the list cannot accept attachments.

Those examples intend for you to replace "/path/to/gcc" with the path to
your gcc, e.g. /usr/local/bin/gcc-5 or whatever it is. Thus for example

-DGMX_STDLIB_CXX_FLAGS=-gcc-name=/usr/local/bin/gcc-5

Mark

On Mon, Jul 16, 2018 at 5:02 PM Manoel Barrionuevo <manoelvfb at gmail.com>
wrote:

> Hi Mark,
>
>
> On 16/07/2018 05:09, Mark Abraham wrote:
> > Hi,
> >
> > On Sat, Jul 14, 2018 at 4:58 AM Manoel Barrionuevo <manoelvfb at gmail.com>
> > wrote:
> >
> >> Hi all,
> >>
> >> I'm trying to compile gromacs 2018.2 and I would like to use intel
> >> compilers along with nvidia gpu graphic (GTX 1060) card in a desktop
> >> computer with a intel i5 quad-core cpu (the only purpose of it is for
> >> learning), in order to do so I was first following the suggested
> >> procedures at the INSTALL file distributed along with gromacs, and got
> >> the command bellow:
> >>
> >> cmake ../ -DGMX_FFT_LIBRARY="mkl" -DMKL_LIBRARIES="-Wl,--start-group
> >> /opt/intel17/mkl/lib/intel64/libmkl_intel_ilp64.a
> >> /opt/intel17/mkl/lib/intel64/libmkl_gnu_thread.a
> >> /opt/intel17/mkl/lib/intel64/libmkl_core.a -Wl,--end-group -lgomp
> >> -lpthread -lm -ldl" -DMKL_INCLUDE_DIR="/opt/intel17/mkl/include"
> >> -DGMX_GPU=on -DCUDA_TOOLKIT_ROOT_DIR="/usr/local/cuda-9.1/"
> >> -DCMAKE_CXX_COMPILER=icpc -DCMAKE_C_COMPILER=icc -DGMX_CXX_FLAGS="-g -O2
> >> -std=c++11"
> >>
> > You're doing a few things that make your life hard (or are brittle) and
> > some that make things slow. Source the appropriate script for the intel
> > compiler that you want, and then leave MKL details up to it. Choosing -O2
> > for optimization overrides the defaults for no good reason. Thus
> >
> > source /path/to/compiler/bin/compilervars.sh intel64
> > cmake ../ -DGMX_FFT_LIBRARY="mkl" -DGMX_GPU=on
> > -DCUDA_TOOLKIT_ROOT_DIR="/usr/local/cuda-9.1/"
> > -DCMAKE_CXX_COMPILER=icpc -DCMAKE_C_COMPILER=icc
>
> Well, I may not get all details you pointed me however I have attached
> two files to show you what exactly happens when I do as said, first you
> will see "cmaking" file where you can find the output of cmake. I
> noticed some failures, I would be happy to hear from you what could them
> be.
>
> > It worths to say that the OS under current operation is Lubuntu (16.04)
> >> and it has both gcc-5.4.1 and g++-5.4.1. Everything goes smoothly
> >> without problems, however I noticed a std failure after issuing the
> >> "make" command, it says:
> >>
> >>
> /home/yokai/Programs/gromacs-2018.2/src/gromacs/utility/fatalerror.cpp(250):
> >>
> >> error: namespace "std" has no member "_Exit"
> >>         std:: _Exit(returnValue);
> >>               ^
> >>
> >>
> /home/yokai/Programs/gromacs-2018.2/src/gromacs/utility/fatalerror.cpp(251):
> >>
> >> warning #1628: function declared with "noreturn" does retu
> >> rn
> >>     }
> >>     ^
> >>
> >> The same problem can be seen if I start from a very simple "cmake ../"
> >> and "make". What am I doing wrong? Is there some environment preparation
> >> step to be done prior to everything else, and what should it be?
> >>
> > On Linux, Intel compilers rely on having and finding a suitable gcc for
> the
> > standard library, so I can only presume something is messed up there. For
> > example, gcc was installed or updated after icc. Try the advice at
> >
> http://manual.gromacs.org/documentation/current/install-guide/index.html#compiler
> >
> > Mark
>
> Next, you will see in "making" attached file the output of "make".
> Again, I still seeing the issue I reported before. I haven't, however,
> set up what you suggested by looking at gromacs manual
> (
> http://manual.gromacs.org/documentation/current/install-guide/index.html#compile).
>
> I'm aware of what you just said, but I can get how should it be the
> problem since the current OS have g++-5, gcc-5, gfortran-5 and clang-5
> available, and no other gcc, g++, gfortran or clang installed and/or
> updated/available as alternative for the system.
>
> I may also point out that it would be of great help if you clarify some
> points that I got stuck since, as I said, I'm not an expert (that's why
> I got so many dumb things with my first attempt with cmake). Here they are:
>
> 1) Gromacs manual suggests this:
> |-DGMX_STDLIB_CXX_FLAGS=-gcc-name=/path/to/gcc/binary
> |
>      Where we read "-gcc-name" should I change to "-gcc-5" and give it
> the expected path. Is it?
>
> 2) Also we get this:
> |-DCMAKE_CXX_LINK_FLAGS="-Wl,-rpath,/path/to/gcc/lib64
> -L/path/to/gcc/lib64"
> |
>      Where we read "-rpath", should I keep it as it is or change it to
> something else? (here you can realize how much I don't know about
> compiling stuff).
>
> 3) Finally we get the last one:
> |-DCMAKE_CXX_FLAGS=--gcc-toolchain=/path/to/gcc/folder|
>
>      Where we read "-gcc-toolchain" should it be changed too? And so,
> for what?
>
> Well, I told since my very first email that the purpose of it is
> learning. I hope I will learn something from my mistakes and I do
> appreciate the kind help you provided me till now.
>
> Thanks a lot.
>
> |
> |
> ||
> >> I must say that I'm not an expert on compiling things up and I got
> >> stuck. Could someone help me out? It would be of great help to know some
> >> tips from you guys.
> >>
> >> Thank you all.
> >>
> >> Kind regards,
> >>
> >> --
> >> Gromacs Users mailing list
> >>
> >> * Please search the archive at
> >> http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> >> posting!
> >>
> >> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
> >>
> >> * For (un)subscribe requests visit
> >> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
> >> send a mail to gmx-users-request at gromacs.org.
>
> --
> Gromacs Users mailing list
>
> * Please search the archive at
> http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> posting!
>
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>
> * For (un)subscribe requests visit
> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
> send a mail to gmx-users-request at gromacs.org.


More information about the gromacs.org_gmx-users mailing list