Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile error with cuda-11.4 "Define THRUST_IGNORE_CUB_VERSION_CHECK to ignore this." #602

Open
zhouxzh opened this issue Aug 4, 2021 · 1 comment

Comments

@zhouxzh
Copy link

zhouxzh commented Aug 4, 2021

When I compile the code with cuda-11.4, I got the following error massage. But I could correctly compile the code with cuda-10.0.

/usr/local/cuda-11.4/bin/../targets/x86_64-linux/include/thrust/system/cuda/config.h:78:2: error: #error The version of CUB in your include path is not compatible with this release of Thrust. CUB is now included in the CUDA Toolkit, so you no longer need to use your own checkout of CUB. Define THRUST_IGNORE_CUB_VERSION_CHECK to ignore this.
   78 | #error The version of CUB in your include path is not compatible with this release of Thrust. CUB is now included in the CUDA Toolkit, so you no longer need to use your own checkout of CUB. Define THRUST_IGNORE_CUB_VERSION_CHECK to ignore this.
      |  ^~~~~
make[2]: *** [core/CMakeFiles/Spirit.dir/build.make:141: core/CMakeFiles/Spirit.dir/src/engine/Hamiltonian_Heisenberg.cu.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:510: core/CMakeFiles/Spirit.dir/all] Error 2
make: *** [Makefile:163: all] Error 2

Ubuntu 20.04, gcc 9.3.0 cuda-11.4 Geforce 2080

@GPMueller
Copy link
Member

If, as the message suggests, you add #define THRUST_IGNORE_CUB_VERSION_CHECK above the cub-includes here

#ifdef SPIRIT_USE_CUDA
#include <cub/cub.cuh>
#define SPIRIT_LAMBDA __device__

and here
#include <curand.h>
#include <curand_kernel.h>
#include <cub/cub.cuh>

does it compile fine again?


@MSallermann I suppose the better fix would be to exclude cub in cmake if the cuda-version is >= 11.0 (?which version exactly introduced cub?) and at some point support for older cuda-versions could be dropped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants