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

Link Issue with CUDA in v2.10.0 #4375

Open
trkk28097402 opened this issue Oct 23, 2024 · 1 comment
Open

Link Issue with CUDA in v2.10.0 #4375

trkk28097402 opened this issue Oct 23, 2024 · 1 comment

Comments

@trkk28097402
Copy link

trkk28097402 commented Oct 23, 2024

When I tried to make adios, it failed at linking cxx excutable with cuda,
the bug is undefined reference to __cudaRegisterLinkedBinary_ae8ecfd6_12_adiosCUDA_cu_985390a9'`.

Here is the error message:

[ 87%] Linking CXX executable ../../bin/bpls
/work/HPC_SYS/devtoolset/devtoolset-9/root/usr/bin/../libexec/gcc/x86_64-redhat-linux/9/ld: ../../lib64/libadios2_core_cuda.a(adiosCUDA.cu.o): in function `__sti____cudaRegisterAll()':
tmpxft_000231e6_00000000-6_adiosCUDA.cudafe1.cpp:(.text.startup+0x1d): undefined reference to `__cudaRegisterLinkedBinary_ae8ecfd6_12_adiosCUDA_cu_985390a9'
collect2: error: ld returned 1 exit status
make[2]: *** [source/utils/CMakeFiles/bpls.dir/build.make:145: bin/bpls] Error 1
make[1]: *** [CMakeFiles/Makefile2:1263: source/utils/CMakeFiles/bpls.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Here is my cmake configuration:

CC=mpicc CXX=mpicxx FC=mpifort \
CFLAGS=$CFALGS CXXFLAGS=$CXXFLAGS FCFLAGS=$FCFLAGS \
cmake .. \
-DCMAKE_INSTALL_PREFIX=$BUILD/adios-2.10 \
-DBUILD_SHARED_LIBS=OFF \
-DMPI_Fortran_COMPILER=mpifort \
-DCMAKE_Fortran_COMPILER=mpifort \
-DCMAKE_C_COMPILER=mpicc \
-DCMAKE_CXX_COMPILER=mpicxx \
-DCMAKE_CXX_FLAGS="-O3 -w -march=native" \
-DADIOS2_USE_MPI=ON \
-DADIOS2_USE_Fortran=ON \
-DADIOS2_USE_Python=OFF \
-DADIOS2_USE_HDF5=ON \
-DHDF5_ROOT=$BUILD/hdf5-1.8.18 \
-DBUILD_SHARED_LIBS=OFF \
-DADIOS2_RUN_INSTALL_TEST=OFF \
-DADIOS2_USE_CUDA=ON \
-DCMAKE_CUDA_ARCHITECTURES=80 

Also I'm using gcc 9.3.1 with OpenMPI 5.0.5 and cuda 11.7, thank you!

@vicentebolea
Copy link
Collaborator

what cmake version are you using? Can you share your cmakecache.txt

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

No branches or pull requests

2 participants