Hello,
I’m trying to compile a software (gromacs-5.0.5) using GCC and CUDA to enable the multithreading with the openmp flag.
I use cmake to configure and I specify:
-DCMAKE_C_COMPILER=gcc
-DCMAKE_CXX_COMPILER=gcc
-DGMX_GPU=on
as indicated in the software installation instructions (http://www.gromacs.org/Documentation/Installation_Instructions_5.0).
It uses the flag as follow :
– Try OpenMP C flag = [-fopenmp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Success
– Try OpenMP CXX flag = [-fopenmp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Success
– Found OpenMP: -fopenmp
[…]
– Configuring done
– Generating done
– Build files have been written to: /Users/jimi/Desktop/GROMACS/gromacs-5.0.5/build
Everything goes right for the configuration.
Then I run make and it issues the following fatal error :
[ 0%] Building NVCC (Device) object src/gromacs/gmxlib/gpu_utils/CMakeFiles/gpu_utils.dir//./gpu_utils_generated_me mtestG80_core.cu.o
nvcc fatal : GNU C/C++ compiler is no longer supported as a host compiler on Mac OS X.
CMake Error at gpu_utils_generated_memtestG80_core.cu.o.cmake:206 (message):
Error generating
/Users/jimi/Desktop/GROMACS/gromacs-5.0.5/build/src/gromacs/gmxlib/gpu_utils/CM akeFiles/gpu_utils.dir//./gpu_utils_generated_memtestG80_core.cu.o
make[2]: *** [src/gromacs/gmxlib/gpu_utils/CMakeFiles/gpu_utils.dir/./gpu_utils_generated_me mtestG80_core.cu.o] Error 1
make[1]: *** [src/gromacs/gmxlib/gpu_utils/CMakeFiles/gpu_utils.dir/all] Error 2
make: *** [all] Error 2
I’m using the following version of GCC:
gcc --version
gcc (GCC) 4.9.0
nvcc is a part of the CUDA toolkit:
Cuda compilation tools, release 7.0, V7.0.27
about the computer:
MacBook Pro (Retina, 15-inch, Late 2013)
Processor: 2,3 GHz Intel Core i7
Memory: 16 GB 1600 MHz DDR3
GPU: NVIDIA GeForce GT 750M
OS: OS X Yosemite (Version 10.10.3)
I can’t figure out what is the problem. If I don’t specify any special compiler it uses cc and c++ :
– Check for working C compiler: /usr/bin/cc – works
– Check for working CXX compiler: /usr/bin/c++ – works
But it doesn’t support openmp:
– Try OpenMP C flag = [-fopenmp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
And it warns:
– Could NOT find OpenMP (missing: OpenMP_C_FLAGS OpenMP_CXX_FLAGS)
CMake Warning at cmake/gmxManageOpenMP.cmake:78 (message):
The compiler you are using does not support OpenMP parallelism. This might
hurt your performance a lot, in particular with GPUs. Try using a more
recent version, or a different compiler. For now, we are proceeding by
turning off OpenMP.
And if I don’t take that into account the installation works and the GPU is supported but it uses only one CPU core.
Any insights would be of great help.
Thank you,
Kind regards