Closed edwinb-ai closed 2 years ago
Thanks for the bug report! Have you tried bumping up your version to HOOMD 2.9.7? I see you're using HOOMD 2.9.0, but there were some changes made in 2.9.7 to support CUDA 11.5:
https://github.com/glotzerlab/hoomd-blue/blob/trunk-minor/CHANGELOG.rst#v297-2021-08-03
We currently test our builds with HOOMD 2.9.7 and CUDA 11.5 and have not seen this before. If that does not work / run for you though, let me know. I have a pretty good idea of what would be needed to fix it.
Hi! Thanks for the quick reply. 😄
I have now updated HOOMD to version 2.9.7 and configured the build once more
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: /home/zhangyh/opt/miniconda3/bin/python (found version "3.7.13")
-- Found HOOMD: /home/zhangyh/opt/miniconda3/lib/python3.7/site-packages/hoomd (found suitable version "2.9.7", minimum required is "2.6.0")
-- Found PythonInterp: /home/zhangyh/opt/miniconda3/bin/python (found suitable version "3.7.13", minimum required is "3")
-- Found PythonLibs: /home/zhangyh/opt/miniconda3/lib/libpython3.7m.so
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found CUDA: /usr/local/cuda-11.5 (found suitable version "11.5", minimum required is "8.0")
-- Found Thrust: /usr/local/cuda-11.5/include (found suitable version "1.13.1", minimum required is "1.5.0")
-- Found cusolver: /usr/local/cuda-11.5/lib64/libcusolver.so
-- Setting build type to 'Release' as none was specified.
-- Found TBB: /home/zhangyh/opt/miniconda3/lib/libtbb.so (Required is at least version "4.3")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/zhangyh/Downloads/azplugins/build
And the result is the following
[ 1%] Building NVCC (Device) object azplugins/CMakeFiles/cuda_compile_1.dir/cuda_compile_1_generated_SinusoidalExpansionConstrictionFillerGPU.cu.o
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
[ 2%] Building NVCC (Device) object azplugins/CMakeFiles/cuda_compile_1.dir/cuda_compile_1_generated_AnisoPairPotentialTwoPatchMorse.cu.o
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
/home/zhangyh/opt/miniconda3/lib/python3.7/site-packages/hoomd/include/hoomd/WarpTools.cuh(119): error: explicit type is missing ("int" assumed)
/home/zhangyh/opt/miniconda3/lib/python3.7/site-packages/hoomd/include/hoomd/WarpTools.cuh(119): error: expected a ";"
/home/zhangyh/opt/miniconda3/lib/python3.7/site-packages/hoomd/include/hoomd/WarpTools.cuh(120): error: a class or namespace qualified name is required
/home/zhangyh/opt/miniconda3/lib/python3.7/site-packages/hoomd/include/hoomd/WarpTools.cuh(120): error: global-scope qualifier (leading "::") is not allowed
/home/zhangyh/opt/miniconda3/lib/python3.7/site-packages/hoomd/include/hoomd/WarpTools.cuh(120): error: expected a ";"
/home/zhangyh/opt/miniconda3/lib/python3.7/site-packages/hoomd/include/hoomd/WarpTools.cuh(349): error: explicit type is missing ("int" assumed)
/home/zhangyh/opt/miniconda3/lib/python3.7/site-packages/hoomd/include/hoomd/WarpTools.cuh(349): error: expected a ";"
/home/zhangyh/opt/miniconda3/lib/python3.7/site-packages/hoomd/include/hoomd/WarpTools.cuh(350): error: a class or namespace qualified name is required
/home/zhangyh/opt/miniconda3/lib/python3.7/site-packages/hoomd/include/hoomd/WarpTools.cuh(350): error: global-scope qualifier (leading "::") is not allowed
/home/zhangyh/opt/miniconda3/lib/python3.7/site-packages/hoomd/include/hoomd/WarpTools.cuh(350): error: expected a ";"
/home/zhangyh/opt/miniconda3/lib/python3.7/site-packages/hoomd/include/hoomd/WarpTools.cuh(354): error: name followed by "::" must be a class or namespace name
/home/zhangyh/opt/miniconda3/lib/python3.7/site-packages/hoomd/include/hoomd/WarpTools.cuh(354): error: the global scope has no "CATEGORY"
/home/zhangyh/opt/miniconda3/lib/python3.7/site-packages/hoomd/include/hoomd/WarpTools.cuh(354): error: name followed by "::" must be a class or namespace name
/home/zhangyh/opt/miniconda3/lib/python3.7/site-packages/hoomd/include/hoomd/WarpTools.cuh(354): error: name followed by "::" must be a class or namespace name
/home/zhangyh/opt/miniconda3/lib/python3.7/site-packages/hoomd/include/hoomd/WarpTools.cuh(354): error: the global scope has no "CATEGORY"
/home/zhangyh/opt/miniconda3/lib/python3.7/site-packages/hoomd/include/hoomd/WarpTools.cuh(354): error: name followed by "::" must be a class or namespace name
/home/zhangyh/opt/miniconda3/lib/python3.7/site-packages/hoomd/include/hoomd/WarpTools.cuh(63): error: name followed by "::" must be a class or namespace name
detected during:
instantiation of "void gpu_compute_pair_aniso_forces_kernel<evaluator,shift_mode,compute_virial,tpp>(Scalar4 *, Scalar4 *, Scalar *, unsigned int, unsigned int, const Scalar4 *, const Scalar *, const Scalar *, const Scalar4 *, const unsigned int *, BoxDim, const unsigned int *, const unsigned int *, const unsigned int *, const evaluator::param_type *, const evaluator::shape_param_type *, const Scalar *, unsigned int, unsigned int, unsigned int) [with evaluator=azplugins::detail::AnisoPairEvaluatorTwoPatchMorse, shift_mode=0U, compute_virial=1U, tpp=32]"
/home/zhangyh/opt/miniconda3/lib/python3.7/site-packages/hoomd/include/hoomd/md/AnisoPotentialPairGPU.cuh(443): here
instantiation of "void AnisoPairForceComputeKernel<evaluator, shift_mode, compute_virial, tpp>::launch(const a_pair_args_t &, std::pair<unsigned int, unsigned int>, const evaluator::param_type *, const evaluator::shape_param_type *) [with evaluator=azplugins::detail::AnisoPairEvaluatorTwoPatchMorse, shift_mode=0U, compute_virial=1U, tpp=32]"
/home/zhangyh/opt/miniconda3/lib/python3.7/site-packages/hoomd/include/hoomd/md/AnisoPotentialPairGPU.cuh(546): here
instantiation of "cudaError_t gpu_compute_pair_aniso_forces<evaluator>(const a_pair_args_t &, const evaluator::param_type *, const evaluator::shape_param_type *) [with evaluator=azplugins::detail::AnisoPairEvaluatorTwoPatchMorse]"
/home/zhangyh/Downloads/azplugins/azplugins/AnisoPairPotentials.cuh(56): here
instantiation of "cudaError_t azplugins::gpu::compute_aniso_pair_potential<evaluator>(const a_pair_args_t &, const evaluator::param_type *, const evaluator::shape_param_type *) [with evaluator=azplugins::detail::AnisoPairEvaluatorTwoPatchMorse]"
/home/zhangyh/Downloads/azplugins/azplugins/AnisoPairPotentialTwoPatchMorse.cu(13): here
17 errors detected in the compilation of "/home/zhangyh/Downloads/azplugins/azplugins/AnisoPairPotentialTwoPatchMorse.cu".
CMake Error at cuda_compile_1_generated_AnisoPairPotentialTwoPatchMorse.cu.o.Release.cmake:280 (message):
Error generating file
/home/zhangyh/Downloads/azplugins/build/azplugins/CMakeFiles/cuda_compile_1.dir//./cuda_compile_1_generated_AnisoPairPotentialTwoPatchMorse.cu.o
make[2]: *** [azplugins/CMakeFiles/_azplugins.dir/build.make:65: azplugins/CMakeFiles/cuda_compile_1.dir/cuda_compile_1_generated_AnisoPairPotentialTwoPatchMorse.cu.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:192: azplugins/CMakeFiles/_azplugins.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
Thanks, I have had someone else report a similar bug, and I think the cause is related to a change in wrapping the thrust/cub namespaces. We build HOOMD from source in tests rather than relying on the conda-forge version, so I will see if I can reproduce this locally and fix.
Could you try to checkout the branch in PR #67 and see if that fixes your error? However, I should ask: are you building HOOMD from source or using Anaconda? There seems to be some issues using the conda version on the GPU:
Hey! Thanks a lot, I checked out the branch and it now works perfectly. I had to compile HOOMD and the plugin separately, and it now works as expected. Thank you! 😄
Hello, thanks for the plugin!
I have tried compiling it under Ubuntu, with CUDA version 11.5 and the newest version of Thrust (v2.0), and I have the following configuration results when I run
cmake
However, when I run
make install
, I find the following errors, and don't know what to do from there.Any help would be greatly appreciated. :)