-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
When compiling Bonsai against CUDA 12.6, I'm getting
In file included from /var/scratch/lveen/ReDiTSAp/amuse/src/amuse/community/bonsai2/src/bonsai/runtime/src/sort_bodies_gpu.cu:2:
/var/scratch/lveen/miniforge3/envs/amuse-dev/targets/x86_64-linux/include/nvToolsExt.h:187: warning: "NVTX_DECLSPEC" redefined
187 | #define NVTX_DECLSPEC
|
In file included from /var/scratch/lveen/miniforge3/envs/amuse-dev/targets/x86_64-linux/include/cub/detail/nvtx3.hpp:635,
from /var/scratch/lveen/miniforge3/envs/amuse-dev/targets/x86_64-linux/include/cub/detail/nvtx.cuh:49,
from /var/scratch/lveen/miniforge3/envs/amuse-dev/targets/x86_64-linux/include/cub/device/device_for.cuh:40,
from /var/scratch/lveen/miniforge3/envs/amuse-dev/targets/x86_64-linux/include/thrust/system/cuda/detail/for_each.h:42,
from /var/scratch/lveen/miniforge3/envs/amuse-dev/targets/x86_64-linux/include/thrust/system/detail/adl/for_each.h:50,
from /var/scratch/lveen/miniforge3/envs/amuse-dev/targets/x86_64-linux/include/thrust/detail/for_each.inl:30,
from /var/scratch/lveen/miniforge3/envs/amuse-dev/targets/x86_64-linux/include/thrust/for_each.h:266,
from /var/scratch/lveen/miniforge3/envs/amuse-dev/targets/x86_64-linux/include/thrust/system/detail/generic/copy.inl:29,
from /var/scratch/lveen/miniforge3/envs/amuse-dev/targets/x86_64-linux/include/thrust/system/detail/generic/copy.h:51,
from /var/scratch/lveen/miniforge3/envs/amuse-dev/targets/x86_64-linux/include/thrust/detail/copy.inl:30,
from /var/scratch/lveen/miniforge3/envs/amuse-dev/targets/x86_64-linux/include/thrust/detail/copy.h:72,
from /var/scratch/lveen/miniforge3/envs/amuse-dev/targets/x86_64-linux/include/thrust/detail/allocator/copy_construct_range.inl:30,
from /var/scratch/lveen/miniforge3/envs/amuse-dev/targets/x86_64-linux/include/thrust/detail/allocator/copy_construct_range.h:45,
from /var/scratch/lveen/miniforge3/envs/amuse-dev/targets/x86_64-linux/include/thrust/detail/contiguous_storage.inl:29,
from /var/scratch/lveen/miniforge3/envs/amuse-dev/targets/x86_64-linux/include/thrust/detail/contiguous_storage.h:190,
from /var/scratch/lveen/miniforge3/envs/amuse-dev/targets/x86_64-linux/include/thrust/detail/temporary_array.h:47,
from /var/scratch/lveen/miniforge3/envs/amuse-dev/targets/x86_64-linux/include/thrust/system/cuda/detail/internal/copy_cross_system.h:47,
from /var/scratch/lveen/miniforge3/envs/amuse-dev/targets/x86_64-linux/include/thrust/system/cuda/detail/copy.h:79,
from /var/scratch/lveen/miniforge3/envs/amuse-dev/targets/x86_64-linux/include/thrust/system/cuda/detail/assign_value.h:33,
from /var/scratch/lveen/miniforge3/envs/amuse-dev/targets/x86_64-linux/include/thrust/system/detail/adl/assign_value.h:50,
from /var/scratch/lveen/miniforge3/envs/amuse-dev/targets/x86_64-linux/include/thrust/detail/reference.h:35,
from /var/scratch/lveen/miniforge3/envs/amuse-dev/targets/x86_64-linux/include/thrust/memory.h:35,
from /var/scratch/lveen/miniforge3/envs/amuse-dev/targets/x86_64-linux/include/thrust/device_ptr.h:33,
from /var/scratch/lveen/ReDiTSAp/amuse/src/amuse/community/bonsai2/src/bonsai/runtime/include/my_cuda_rt.h:27,
from /var/scratch/lveen/ReDiTSAp/amuse/src/amuse/community/bonsai2/src/bonsai/runtime/include/octree.h:21,
from /var/scratch/lveen/ReDiTSAp/amuse/src/amuse/community/bonsai2/src/bonsai/runtime/src/sort_bodies_gpu.cu:1:
/var/scratch/lveen/miniforge3/envs/amuse-dev/targets/x86_64-linux/include/nvtx3/nvToolsExt.h:207: note: this is the location of the previous definition
207 | #define NVTX_DECLSPEC NVTX_INLINE_STATIC
|
/var/scratch/lveen/miniforge3/envs/amuse-dev/targets/x86_64-linux/include/nvToolsExt.h:223: warning: "NVTX_VERSION" redefined
223 | #define NVTX_VERSION 2
|
/var/scratch/lveen/miniforge3/envs/amuse-dev/targets/x86_64-linux/include/nvtx3/nvToolsExt.h:184: note: this is the location of the previous definition
184 | #define NVTX_VERSION 3
|
It seems like I have two copies of this nvToolsExt.h header installed, one in include/ and one in include/nvtx3/, and it seems that the former is included directly from sort_bodies_gpu.cu while the latter is included indirectly via thrust/device_ptr.h from my_cuda_rt.h.
So I tried replacing #include "nvToolsExt.h" in sort_bodies_gpu.cu with #include "nvtx3/nvToolsExt.h" and that seems to actually fix the problem, I can build the latest version with that change and the AMUSE stuff and it even passes the tests. I don't know enough about CUDA to know if that's a proper fix though.
Metadata
Metadata
Assignees
Labels
No labels