relion icon indicating copy to clipboard operation
relion copied to clipboard

Relion compiling failed with GPU support

Open sgaosdgr opened this issue 3 years ago • 3 comments

This is a template for reporting bugs. Please fill in as much information as you can.

Describe your problem

Relion compiling failed with GPU support on CentOS 7.9.2009. The CUDA toolkit version is 11.4, NVIDIA driver 470.82.01.

Steps to reproduce:

  1. Clone relion repo:

git clone https://github.com/3dem/relion.git

  1. Run cmake:

cmake -DCMAKE_INSTALL_PREFIX=/scr/relion -DCUDA_ARCH=75 -DCUDA_TOOLKIT_ROOT_DIR=/scr/cuda-11.7 -DMPI_C_COMPILER=/usr/lib64/openmpi/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi/bin/mpicxx ..

  1. Build:

make -j 4

Environment:

  • OS: CentOS 7.9.2009
  • MPI runtime: OpenMPI 1.10.7
  • RELION version: 3.1.3
  • Memory: 64 GB
  • GPU: Tesla T4
  • CUDA: 11.4, 11.7

Error message:

-- BUILD TYPE set to the default type:  'Release'
-- Using provided CUDA_ARCH=75
-- ALLOW_CTF_IN_SAGD enabled - This build of RELION allows modulation of particle images by a contrast transfer function inside stochastic average gradient descent, as specified in Claim 1 of patent US10,282,513B2
-- CUDA enabled - Building CUDA-accelerated version of RELION
-- Setting cpu precision to double
-- Setting accelerated code precision to single
-- Using cuda wrapper to compile....
-- Cuda version is >= 7.5 and single-precision build, enable double usage warning.
-- MPI_INCLUDE_PATH : /usr/include/openmpi-x86_64
-- MPI_LIBRARIES : /usr/lib64/openmpi/lib/libmpi_cxx.so;/usr/lib64/openmpi/lib/libmpi.so
-- MPI_CXX_INCLUDE_PATH : /usr/include/openmpi-x86_64
-- MPI_CXX_LIBRARIES : /usr/lib64/openmpi/lib/libmpi_cxx.so;/usr/lib64/openmpi/lib/libmpi.so
-- CMAKE_C_COMPILER : /usr/bin/cc
-- CMAKE_CXX_COMPILER : /usr/bin/c++
-- MPI_C_COMPILER : /usr/lib64/openmpi/bin/mpicc
-- MPI_CXX_COMPILER : /usr/lib64/openmpi/bin/mpicxx
-- CMAKE_CXX_COMPILER_ID : GNU
-- X11 and FLTK were found
-- FLTK_LIBRARIES: /usr/lib64/libfltk_images.so;/usr/lib64/libfltk_forms.so;/usr/lib64/libfltk.so;/usr/lib64/libSM.so;/usr/lib64/libICE.so;/usr/lib64/libX11.so;/usr/lib64/libm.so
-- Found FFTW
-- FFTW_PATH: /usr/include
-- FFTW_INCLUDES: /usr/include
-- FFTW_LIBRARIES: /usr/lib64/libfftw3f.so;/usr/lib64/libfftw3.so
BUILD_SHARED_LIBS = OFF
-- Building static libs (larger build size and binaries)
Running apps/CMakeLists.txt...
-- CMAKE_BINARY_DIR:/scr/src/relion/build
-- Git commit ID: fa923df15ad272d7bdccce440a97c7c267880371
-- Configuring done
-- Generating done
-- Build files have been written to: /scr/src/relion/build
[  0%] Built target copy_scripts
[ 66%] Built target relion_lib
[ 67%] Building NVCC (Device) object src/apps/CMakeFiles/relion_gpu_util.dir/__/acc/cuda/./relion_gpu_util_generated_cuda_autopicker.cu.o
/scr/cuda-11.7/include/thrust/detail/type_traits.h(61): error: this declaration has no storage class or type specifier

/scr/cuda-11.7/include/thrust/detail/type_traits.h(61): error: expected a ";"

/scr/cuda-11.7/include/thrust/detail/execution_policy.h(47): error: this declaration has no storage class or type specifier

/scr/cuda-11.7/include/thrust/detail/execution_policy.h(47): error: "constexpr" is not a function or static data member

/scr/cuda-11.7/include/thrust/detail/execution_policy.h(69): error: expected a ";"

/scr/cuda-11.7/include/thrust/system/detail/sequential/execution_policy.h(52): error: identifier "constexpr" is undefined

/scr/cuda-11.7/include/thrust/system/detail/sequential/execution_policy.h(52): error: member function with the same name as its class must be a constructor

/scr/cuda-11.7/include/thrust/iterator/detail/iterator_traits.inl(38): error: expected a declaration

/scr/cuda-11.7/include/thrust/iterator/detail/iterator_traits.inl(38): error: expected a ";"

/scr/cuda-11.7/include/thrust/iterator/detail/iterator_traits.inl(47): error: expected a declaration

/scr/cuda-11.7/include/thrust/iterator/detail/iterator_traits.inl(47): error: expected a ";"

/scr/cuda-11.7/include/thrust/iterator/detail/iterator_traits.inl(56): error: expected a declaration

/scr/cuda-11.7/include/thrust/iterator/detail/iterator_traits.inl(56): error: expected a ";"

/scr/cuda-11.7/include/thrust/iterator/detail/iterator_traits.inl(65): error: expected a declaration

/scr/cuda-11.7/include/thrust/iterator/detail/iterator_traits.inl(65): error: expected a ";"

/scr/cuda-11.7/include/thrust/iterator/detail/iterator_traits.inl(104): error: expected a declaration

/scr/cuda-11.7/include/thrust/iterator/detail/iterator_traits.inl(104): error: expected a ";"

17 errors detected in the compilation of "/scr/src/relion/src/acc/cuda/cuda_autopicker.cu".
CMake Error at relion_gpu_util_generated_cuda_autopicker.cu.o.cmake:264 (message):
  Error generating file
  /scr/src/relion/build/src/apps/CMakeFiles/relion_gpu_util.dir/__/acc/cuda/./relion_gpu_util_generated_cuda_autopicker.cu.o


make[2]: *** [src/apps/CMakeFiles/relion_gpu_util.dir/__/acc/cuda/./relion_gpu_util_generated_cuda_autopicker.cu.o] Error 1
make[1]: *** [src/apps/CMakeFiles/relion_gpu_util.dir/all] Error 2
make: *** [all] Error 2

sgaosdgr avatar Jun 17 '22 05:06 sgaosdgr

What is your GCC version? Please try newer GCC (or use older CUDA).

biochem-fan avatar Jun 17 '22 05:06 biochem-fan

I think this is a duplicate of https://github.com/3dem/relion/issues/818.

biochem-fan avatar Jun 17 '22 05:06 biochem-fan

Successfully compiled and installed Relion 3.1.3 against CUDA 10.2 on CentOS 7.

It would be great to add some tips about building Relion on CentOS or other older os that has gcc 4.8.5.

Thanks.

sgaosdgr avatar Jun 17 '22 16:06 sgaosdgr