[gmx-users] Problem compiling 4.6.7 with gpu support

Szilárd Páll pall.szilard at gmail.com
Thu Nov 26 18:27:07 CET 2015


Hi,

CUDA 7.0 supports gcc 4.9 and earlier as you can see stated in the docs as
well as in the somewhat awkward error message that originates from
the include/host_config.h:105 header.

I think you did not correctly set up your build to use gcc 4.8 or 4.9 and
you are simply using your system default gcc 5. Your cmake invocation
contains neither CC/CXX env. variables to nor the
CMAKE_C_COMPILER/CMAKE_CXX_COMPILER variables.

Otherwise, it should just work. I would encourage you to use a newer
version, though, 5.0 and 5.1 has been released since. If you still want to
stick to 4.6.x, I would recommend considering building from git because
some potentially important fixes have been made post-4.6.7 (and have not
been released).

Cheers,
--
Szilárd

On Thu, Nov 26, 2015 at 5:06 PM, Saverio Lemme <xave at inwind.it> wrote:

> Hi,
> I am trying to compile gromacs 4.6.7 on a notebook with two gt 650m ,
> ubuntu
> 15.10 and cuda 7.0 installed.
> On my system are installed gcc 4.8 4.9 and 5.2
> For the gpu support I use the following:
>
> cmake .. -DGMX_GPU=ON -DGMX_MPI=ON  -DGMX_BUILD_OWN_FFTW=ON
> -DCMAKE_INSTALL_PREFIX=/home/xxxx/gromacs-4.6.7-gpu
> -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-7.0
>
> Then make gives me the following obvious error:
>
> [  1%] Building NVCC (Device) object
> src/gmxlib/cuda_tools/CMakeFiles/cuda_tools.dir/cuda_tools_generated_cudautils.cu.o
> In file included from /usr/local/cuda-7.0/include/cuda_runtime.h:62:0,
>                  from <command-line>:0:
> /usr/local/cuda-7.0/include/host_config.h:105:2: error: #error --
> unsupported GNU version! gcc 4.10 and up are not supported!
>  #error -- unsupported GNU version! gcc 4.10 and up are not supported!
>   ^
> CMake Error at cuda_tools_generated_cudautils.cu.o.cmake:206 (message):
>   Error generating
>
> /home/xxxx/sources/gromacs-4.6.7/build/src/gmxlib/cuda_tools/CMakeFiles/cuda_tools.dir//./cuda_tools_generated_cudautils.cu.o
>
>
> src/gmxlib/cuda_tools/CMakeFiles/cuda_tools.dir/build.make:71: set di
> istruzioni per l'obiettivo
> "src/gmxlib/cuda_tools/CMakeFiles/cuda_tools.dir/cuda_tools_generated_cudautils.cu.o"
> non riuscito
> make[2]: ***
> [src/gmxlib/cuda_tools/CMakeFiles/cuda_tools.dir/cuda_tools_generated_cudautils.cu.o]
> Errore 1
> CMakeFiles/Makefile2:1311: set di istruzioni per l'obiettivo
> "src/gmxlib/cuda_tools/CMakeFiles/cuda_tools.dir/all" non riuscito
> make[1]: *** [src/gmxlib/cuda_tools/CMakeFiles/cuda_tools.dir/all] Errore 2
> Makefile:146: set di istruzioni per l'obiettivo "all" non riuscito
> make: *** [all] Errore 2
>
> How can I hint cmake to use gcc4.9?
>
> Thanks in advance.
>
> Saverio
> --
> 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