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

Disable CUB build in CCCL #806

Closed
wants to merge 2 commits into from

Conversation

beomki-yeo
Copy link
Contributor

When I try to use traccc as a 3rd party library in my analysis repository, I get the following error regarding CCCL CUB:

[ 64%] Building CUDA object _deps/traccc-build/device/cuda/CMakeFiles/traccc_cuda.dir/src/clusterization/kernels/ccl_kernel.cu.o
In file included from /mnt/nvme0n1/byeo/projects/traccc-tutorial/traccc-tutorial_build/_deps/cccl-src/thrust/thrust/system/cuda/detail/execution_policy.h:40,
                 from /mnt/nvme0n1/byeo/projects/traccc-tutorial/traccc-tutorial_build/_deps/cccl-src/thrust/thrust/iterator/detail/device_system_tag.h:31,
                 from /mnt/nvme0n1/byeo/projects/traccc-tutorial/traccc-tutorial_build/_deps/cccl-src/thrust/thrust/iterator/iterator_traits.h:74,
                 from /mnt/nvme0n1/byeo/projects/traccc-tutorial/traccc-tutorial_build/_deps/cccl-src/thrust/thrust/detail/sort.inl:28,
                 from /mnt/nvme0n1/byeo/projects/traccc-tutorial/traccc-tutorial_build/_deps/cccl-src/thrust/thrust/sort.h:1319,
                 from /mnt/nvme0n1/byeo/projects/traccc-tutorial/traccc-tutorial_build/_deps/traccc-src/device/cuda/src/clusterization/measurement_sorting_algorithm.cu:13:
/mnt/nvme0n1/byeo/projects/traccc-tutorial/traccc-tutorial_build/_deps/cccl-src/thrust/thrust/system/cuda/config.h:122: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.
  122 | #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.
      |  ^~~~~
[ 64%] Building CXX object _deps/acts-build/Core/CMakeFiles/ActsCore.dir/src/Surfaces/PerigeeSurface.cpp.o
make[2]: *** [_deps/traccc-build/device/cuda/CMakeFiles/traccc_cuda.dir/build.make:237: _deps/traccc-build/device/cuda/CMakeFiles/traccc_cuda.dir/src/clusterization/measurement_sorting_algorithm.cu.o] Error 1
make[2]: *** Waiting for unfinished jobs....

The error seems gone when I disable the CUB build in CCL

@krasznaa
Copy link
Member

No, this is not the solution to that problem. 🤔

That error shows up because something that uses Thrust publicly, clearly doesn't set up a correct public dependency on it.

Could you describe in a bit more detail how you use this project in the setup where you encountered this issue? I remember that there's at least one (though probably multiple) issue that we still work around in @paradajzblond's code. You'll have to do that sort of a workaround until we fix the issue properly.

@beomki-yeo
Copy link
Contributor Author

beomki-yeo commented Dec 22, 2024

EDIT: Sorry forgot the link to the project: https://github.com/beomki-yeo/traccc-tutorial
I already disabled CUB build in CCCL to make the project compilied. If you want to reproduce the error, comment the following lines:

  1. add_subdirectory(extern/cccl) in CMakeListst.txt
  2. set( TRACCC_SETUP_THRUST FALSE CACHE BOOL "Do not set up CCCL as part of Traccc" ) in extern/traccc/CMakeLists.txt

Of course, you need to build with -DBUILD_CUDA=ON

@beomki-yeo
Copy link
Contributor Author

That error shows up because something that uses Thrust publicly, clearly doesn't set up a correct public dependency on it.

If we can fix this way, I will be happy with that as well

@beomki-yeo
Copy link
Contributor Author

It indeed looks like a dependency problem as I can compile the project by turning on CUB build in extern/cccl - but still no clue on how it works

@krasznaa
Copy link
Member

krasznaa commented Jan 2, 2025

As described in beomki-yeo/traccc-tutorial#1, I believe I managed to understand what was going wrong in your build Beomki. I believe this project can stay as-is.

@krasznaa krasznaa closed this Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants