[gmx-users] gromacs 2018 make error with multiple compilers and GPU support

Mark Abraham mark.j.abraham at gmail.com
Mon May 7 22:36:34 CEST 2018


Hi,

Mixing versions of C++ compilers is never a good idea, precisely because
there is no guarantee that linking can succeed, as here. Use gcc 4.8.5 for
all compilation if you are forced to use such a dated distro for
"stability." Bear in mind that that is often just code for "old, slow, and
hasn't been changed." ;-)

You can/should investigate whether devtoolset-6 works well enough, since it
contains a more recent gcc that is supported by that CUDA.

Mark

On Mon, May 7, 2018 at 7:38 PM Kevin Boyd <kevin.boyd at uconn.edu> wrote:

> Hi,
>
> I've been trying to install gromacs 2018 on a cluster running Centos7.
> In keeping with the guidelines for maximizing performance, I'm
> compiling with a recent (7.3.0) GCC version. However, Cuda 9.0 on
> Centos 7.x needs to be compiled with GCC 4.8.5, so my cmake command
> included -DCUDA_HOST_COMPILER=/path/to/gcc4.8.5. When installing, the
> following error occurred.
>
> [ 98%] Built target libgromacs
> [ 98%] Linking CXX executable ../../bin/template
> ../../lib/libgromacs.so.4.0.0: undefined reference to
> `gmx::formatString(char const*, ...)'
> ../../lib/libgromacs.so.4.0.0: undefined reference to
> `canDetectGpus(std::__cxx11::basic_string<char,
> std::char_traits<char>, std::allocator<char> >*)'
> ../../lib/libgromacs.so.4.0.0: undefined reference to
> `gmx::getCudaRuntimeVersionString[abi:cxx11]()'
> ../../lib/libgromacs.so.4.0.0: undefined reference to
> `gmx::getCudaDriverVersionString[abi:cxx11]()'
>
> The same error (or at least part of the error) shows up trying Gromacs
> 2018, 2018.1, and the current master branch.
>
> My full cmake configuration command was
>
> cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/prefix    \
>               -DGMX_GPU=ON                                               \
>               -DGMX_SIMD=AVX2_256                                  \
>               -DGMX_FFT_LIBRARY=fftw3                             \
>               -DCUDA_HOST_COMPILER=/path/to/gcc4.8.5 \
>               -DCMAKE_PREFIX+PATH=/path/to/fftwlib
>
>
> I can compile and run successfully if I turn off GPU support (with GCC
> 7.3.0), or by using GCC 4.8.5 for the entire install (with GPUs), so
> I'm assuming the issue has something to do with using both compilers.
>
> Has anyone else run into similar issues?
>
> Thanks,
>
> Kevin
> --
> 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