-
Notifications
You must be signed in to change notification settings - Fork 169
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
Rename thrust example version.cu
to print_version.cu
#3002
Conversation
If we follow the README to compile `version.cu` into an `version` executable, this will cause compilation of some other source files to fail: In file included from /opt/nvidia/hpc_sdk/Linux_x86_64/24.11/cuda/12.6/include/cuda/std/detail/libcxx/include/version:214, from /opt/nvidia/hpc_sdk/Linux_x86_64/24.11/cuda/12.6/include/cuda/std/version:26, from /opt/nvidia/hpc_sdk/Linux_x86_64/24.11/cuda/12.6/include/cuda/std/detail/libcxx/include/cstddef:50, from /opt/nvidia/hpc_sdk/Linux_x86_64/24.11/cuda/12.6/include/cuda/std/cstddef:26, from /opt/nvidia/hpc_sdk/Linux_x86_64/24.11/cuda/12.6/include/thrust/detail/config/cpp_compatibility.h:31, from /opt/nvidia/hpc_sdk/Linux_x86_64/24.11/cuda/12.6/include/thrust/detail/config/config.h:37, from /opt/nvidia/hpc_sdk/Linux_x86_64/24.11/cuda/12.6/include/thrust/detail/config.h:22, from /opt/nvidia/hpc_sdk/Linux_x86_64/24.11/cuda/12.6/include/thrust/binary_search.h:23, from weld_vertices.cu:1: ./version:11:121: error: extended character | is not valid in an identifier The following line in `/opt/nvidia/hpc_sdk/Linux_x86_64/24.11/cuda/12.6/include/cuda/std/detail/libcxx/include/version:214`: # include <version> mistakenly identified the `version` executable as the file to include. This issue can be resolved by renaming the file, as done in this commit. Tested with docker image: `nvcr.io/nvidia/nvhpc:24.11-devel-cuda_multi-ubuntu22.04`.
Hi! I am surprised this happens, because the binary directory where the |
/ok to test |
Hi, I'm also surprised too. The following are the minimal steps to reproduce this issue: docker run --rm -it --gpus all nvcr.io/nvidia/nvhpc:24.11-devel-cuda_multi-ubuntu22.04
# in the container
cd ~
git clone --depth 1 -b v2.5.0 https://github.com/NVIDIA/cccl.git
cd ~/cccl/thrust/examples
nvcc -o version version.cu
nvcc -o weld_vertices weld_vertices.cu
# observe the error |
I see. It seems you are not using CMake, the preferred way to setup and build CCCL. We also offer devcontainers, which offer a really nice integration with VSCode. You can find more information here: https://github.com/NVIDIA/cccl/blob/main/.devcontainer/README.md The error you describe is expected then, because you mix binary and source directories. That is, your compiled executables are put in the same directory as source files ( |
Thanks for the information on devcontainers! Currently, I'm using CCCL pre-installed in the
Therefore, I simply follow the thrust examples README to build them in the same directory with A similar fix would be modifying |
Ah, yes. I guess we only ship the examples but not all the CMake stuff around it. So I guess it would be better to experiment with a git clone of this repository.
Makes sense. I will add some more information here to prefer playing with the public git repo, because it contains better infrastructure.
@alliepiper what do you think? Should the |
🟩 CI finished in 2h 01m: Pass: 100%/224 | Total: 6d 20h | Avg: 44m 05s | Max: 1h 17m | Hits: 15%/12288
|
Project | |
---|---|
CCCL Infrastructure | |
libcu++ | |
CUB | |
+/- | Thrust |
CUDA Experimental | |
python | |
CCCL C Parallel Library | |
Catch2Helper |
Modifications in project or dependencies?
Project | |
---|---|
CCCL Infrastructure | |
libcu++ | |
+/- | CUB |
+/- | Thrust |
CUDA Experimental | |
+/- | python |
+/- | CCCL C Parallel Library |
+/- | Catch2Helper |
🏃 Runner counts (total jobs: 224)
# | Runner |
---|---|
185 | linux-amd64-cpu16 |
16 | linux-arm64-cpu16 |
14 | linux-amd64-gpu-v100-latest-1 |
9 | windows-amd64-cpu16 |
PR up: #3004 |
Thank you for the contribution! |
If we follow the README to compile
version.cu
into anversion
executable, this will cause compilation of some other source files to fail:The following line in
/opt/nvidia/hpc_sdk/Linux_x86_64/24.11/cuda/12.6/include/cuda/std/detail/libcxx/include/version:214
:mistakenly identified the
version
executable as the file to include. This issue can be resolved by renaming the file, as done in this commit.Tested with docker image:
nvcr.io/nvidia/nvhpc:24.11-devel-cuda_multi-ubuntu22.04
.