Closed ara137 closed 3 years ago
This is not likely an issue with a particular version of HOOMD, but with the version of the CUDA toolkit.
Starting with CUDA 11, CUB is bundled with the toolkit like thrust. Hence, we no longer require the extern/cub
headers, and including both causes a symbol redefinition. That these files compile with the include commented out is probably chance that cub is still being included properly elsewhere.
This is the required fix:
#if __CUDACC_VER_MAJOR__ >= 11
#include <cub/cub.cuh>
#else
#include "hoomd/extern/cub/cub/cub.cuh"
#endif
Can you try that and let me know if it works?
Here is a pull request with the changes if you just want to check out the branch and try compiling:
Resolved with #49
azplugins fails to compile with version 2.9.4 of HOOMD-blue. Several errors are thrown, which seem to be related to cub:
/usr/local/lib/python3.7/dist-packages/hoomd/include/hoomd/extern/cub/cub/block/specializations/../../block/../util_type.cuh(72): error: class template "cub::If" has already been defined
Commenting out the include of the cub header in the offending files (MPCDReversePerturbationFlowGPU.cu and ReversePerturbationFlowGPU.cu) seems to fix this issue.