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

fix linker errors about multiply defined symbols in STF #2641

Merged
merged 2 commits into from
Oct 29, 2024

Conversation

ericniebler
Copy link
Collaborator

Description

my pr's are failing CI with errors like this:

/usr/bin/ld: cudax/CMakeFiles/cudax.cpp17.headers.basic.stf.dir/./headers/cudax.cpp17.headers.basic.stf/cuda/experimental/__stf/places/exec/host/callback_queues.cuh.cu.o: in function `cuda::experimental::stf::callback_completion_kernel(int*)':
  tmpxft_00006f23_00000000-6_callback_queues.cuh.compute_80.cudafe1.cpp:(.text+0x10): multiple definition of `cuda::experimental::stf::callback_completion_kernel(int*)'; cudax/CMakeFiles/cudax.cpp17.headers.basic.stf.dir/headers/cudax.cpp17.headers.basic.stf/cuda/experimental/__stf/places/exec/host/callback_queues.cuh.cu.o:tmpxft_00006f23_00000000-6_callback_queues.cuh.compute_80.cudafe1.cpp:(.text+0x10): first defined here
  /usr/bin/ld: cudax/CMakeFiles/cudax.cpp17.headers.basic.stf.dir/./headers/cudax.cpp17.headers.basic.stf/cuda/experimental/__stf/places/exec/host/callback_queues.cuh.cu.o: in function `cuda::experimental::stf::cudaCallbackSetStatus(int, void*)':
  tmpxft_00006f23_00000000-6_callback_queues.cuh.compute_80.cudafe1.cpp:(.text+0xc0): multiple definition of `cuda::experimental::stf::cudaCallbackSetStatus(int, void*)'; cudax/CMakeFiles/cudax.cpp17.headers.basic.stf.dir/headers/cudax.cpp17.headers.basic.stf/cuda/experimental/__stf/places/exec/host/callback_queues.cuh.cu.o:tmpxft_00006f23_00000000-6_callback_queues.cuh.compute_80.cudafe1.cpp:(.text+0xc0): first defined here
  /usr/bin/ld: cudax/CMakeFiles/cudax.cpp17.headers.basic.stf.dir/./headers/cudax.cpp17.headers.basic.stf/cuda/experimental/__stf/places/exec/host/callback_queues.cuh.cu.o: in function `cuda::experimental::stf::cudaCallbackGetStatus(int*, void**)':
  tmpxft_00006f23_00000000-6_callback_queues.cuh.compute_80.cudafe1.cpp:(.text+0x150): multiple definition of `cuda::experimental::stf::cudaCallbackGetStatus(int*, void**)'; cudax/CMakeFiles/cudax.cpp17.headers.basic.stf.dir/headers/cudax.cpp17.headers.basic.stf/cuda/experimental/__stf/places/exec/host/callback_queues.cuh.cu.o:tmpxft_00006f23_00000000-6_callback_queues.cuh.compute_80.cudafe1.cpp:(.text+0x150): first defined here
  /usr/bin/ld: cudax/CMakeFiles/cudax.cpp17.headers.basic.stf.dir/./headers/cudax.cpp17.headers.basic.stf/cuda/experimental/__stf/places/exec/host/callback_queues.cuh.cu.o: in function `__device_stub__ZN4cuda12experimental3stf26callback_completion_kernelEPi(int*)':
  tmpxft_00006f23_00000000-6_callback_queues.cuh.compute_80.cudafe1.cpp:(.text+0x1f0): multiple definition of `__device_stub__ZN4cuda12experimental3stf26callback_completion_kernelEPi(int*)'; cudax/CMakeFiles/cudax.cpp17.headers.basic.stf.dir/headers/cudax.cpp17.headers.basic.stf/cuda/experimental/__stf/places/exec/host/callback_queues.cuh.cu.o:tmpxft_00006f23_00000000-6_callback_queues.cuh.compute_80.cudafe1.cpp:(.text+0x1f0): first defined here
  collect2: error: ld returned 1 exit status

this is caused by function definition in headers without inline. there's also a multiply-defined symbols error about a cuda kernel. i'm not sure what is the right way to handle kernels in headers, so i just made it a template. i would be happy to learn the right way to do this.

@ericniebler ericniebler requested a review from a team as a code owner October 28, 2024 22:51
@ericniebler ericniebler enabled auto-merge (squash) October 28, 2024 23:22
Copy link
Contributor

🟩 CI finished in 36m 21s: Pass: 100%/54 | Total: 4h 02m | Avg: 4m 29s | Max: 17m 37s | Hits: 89%/224
  • 🟩 cudax: Pass: 100%/54 | Total: 4h 02m | Avg: 4m 29s | Max: 17m 37s | Hits: 89%/224

    🟩 cpu
      🟩 amd64              Pass: 100%/50  | Total:  3h 51m | Avg:  4m 38s | Max: 17m 37s | Hits:  89%/224   
      🟩 arm64              Pass: 100%/4   | Total: 11m 03s | Avg:  2m 45s | Max:  3m 23s
    🟩 ctk
      🟩 12.0               Pass: 100%/19  | Total:  1h 25m | Avg:  4m 30s | Max: 17m 11s | Hits:  89%/112   
      🟩 12.5               Pass: 100%/2   | Total:  9m 30s | Avg:  4m 45s | Max:  4m 52s
      🟩 12.6               Pass: 100%/33  | Total:  2h 27m | Avg:  4m 28s | Max: 17m 37s | Hits:  89%/112   
    🟩 cudacxx
      🟩 nvcc12.0           Pass: 100%/19  | Total:  1h 25m | Avg:  4m 30s | Max: 17m 11s | Hits:  89%/112   
      🟩 nvcc12.5           Pass: 100%/2   | Total:  9m 30s | Avg:  4m 45s | Max:  4m 52s
      🟩 nvcc12.6           Pass: 100%/33  | Total:  2h 27m | Avg:  4m 28s | Max: 17m 37s | Hits:  89%/112   
    🟩 cudacxx_family
      🟩 nvcc               Pass: 100%/54  | Total:  4h 02m | Avg:  4m 29s | Max: 17m 37s | Hits:  89%/224   
    🟩 cxx
      🟩 Clang9             Pass: 100%/2   | Total:  6m 43s | Avg:  3m 21s | Max:  3m 41s
      🟩 Clang10            Pass: 100%/2   | Total:  6m 07s | Avg:  3m 03s | Max:  3m 20s
      🟩 Clang11            Pass: 100%/4   | Total: 11m 30s | Avg:  2m 52s | Max:  3m 08s
      🟩 Clang12            Pass: 100%/4   | Total: 12m 07s | Avg:  3m 01s | Max:  3m 22s
      🟩 Clang13            Pass: 100%/4   | Total: 11m 51s | Avg:  2m 57s | Max:  3m 09s
      🟩 Clang14            Pass: 100%/4   | Total: 24m 49s | Avg:  6m 12s | Max: 15m 34s
      🟩 Clang15            Pass: 100%/2   | Total:  6m 26s | Avg:  3m 13s | Max:  3m 22s
      🟩 Clang16            Pass: 100%/4   | Total: 12m 17s | Avg:  3m 04s | Max:  3m 23s
      🟩 Clang17            Pass: 100%/2   | Total:  6m 13s | Avg:  3m 06s | Max:  3m 13s
      🟩 Clang18            Pass: 100%/2   | Total: 20m 03s | Avg: 10m 01s | Max: 16m 57s
      🟩 GCC9               Pass: 100%/2   | Total:  6m 06s | Avg:  3m 03s | Max:  3m 05s
      🟩 GCC10              Pass: 100%/4   | Total: 11m 25s | Avg:  2m 51s | Max:  3m 08s
      🟩 GCC11              Pass: 100%/4   | Total: 12m 08s | Avg:  3m 02s | Max:  3m 13s
      🟩 GCC12              Pass: 100%/7   | Total:  1h 03m | Avg:  9m 02s | Max: 17m 37s
      🟩 GCC13              Pass: 100%/3   | Total:  7m 49s | Avg:  2m 36s | Max:  2m 39s
      🟩 MSVC14.36          Pass: 100%/1   | Total:  6m 46s | Avg:  6m 46s | Max:  6m 46s | Hits:  89%/112   
      🟩 MSVC14.39          Pass: 100%/1   | Total:  7m 40s | Avg:  7m 40s | Max:  7m 40s | Hits:  89%/112   
      🟩 NVHPC24.7          Pass: 100%/2   | Total:  9m 30s | Avg:  4m 45s | Max:  4m 52s
    🟩 cxx_family
      🟩 Clang              Pass: 100%/30  | Total:  1h 58m | Avg:  3m 56s | Max: 16m 57s
      🟩 GCC                Pass: 100%/20  | Total:  1h 40m | Avg:  5m 02s | Max: 17m 37s
      🟩 MSVC               Pass: 100%/2   | Total: 14m 26s | Avg:  7m 13s | Max:  7m 40s | Hits:  89%/224   
      🟩 NVHPC              Pass: 100%/2   | Total:  9m 30s | Avg:  4m 45s | Max:  4m 52s
    🟩 gpu
      🟩 v100               Pass: 100%/54  | Total:  4h 02m | Avg:  4m 29s | Max: 17m 37s | Hits:  89%/224   
    🟩 jobs
      🟩 Build              Pass: 100%/49  | Total:  2h 39m | Avg:  3m 15s | Max:  7m 40s | Hits:  89%/224   
      🟩 Test               Pass: 100%/5   | Total:  1h 23m | Avg: 16m 41s | Max: 17m 37s
    🟩 sm
      🟩 90                 Pass: 100%/1   | Total:  2m 42s | Avg:  2m 42s | Max:  2m 42s
      🟩 90a                Pass: 100%/1   | Total:  2m 39s | Avg:  2m 39s | Max:  2m 39s
    🟩 std
      🟩 17                 Pass: 100%/29  | Total:  1h 55m | Avg:  3m 59s | Max: 17m 11s
      🟩 20                 Pass: 100%/25  | Total:  2h 06m | Avg:  5m 04s | Max: 17m 37s | Hits:  89%/224   
    

👃 Inspect Changes

Modifications in project?

Project
CCCL Infrastructure
libcu++
CUB
Thrust
+/- CUDA Experimental
pycuda
CCCL C Parallel Library

Modifications in project or dependencies?

Project
CCCL Infrastructure
libcu++
CUB
Thrust
+/- CUDA Experimental
pycuda
CCCL C Parallel Library

🏃‍ Runner counts (total jobs: 54)

# Runner
43 linux-amd64-cpu16
5 linux-amd64-gpu-v100-latest-1
4 linux-arm64-cpu16
2 windows-amd64-cpu16

@ericniebler ericniebler merged commit bc6d193 into NVIDIA:main Oct 29, 2024
68 checks passed
fbusato pushed a commit to fbusato/cccl that referenced this pull request Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants