I am trying to link the CUDA core with a C ++ autotools project, but it seems it cannot go through the linking step.
I have a GPUFloydWarshall.cu file that contains the core and C shell function that I would like to host in the libgpu.a library. This will fit the rest of the project. Is it possible?
Secondly, then the library must be linked to ten other libraries for the main executable that mpicxx currently uses.
I am currently using / generating the following commands to compile and create the libgpu.a library
nvcc -rdc=true -c -o temp.o GPUFloydWarshall.cu nvcc -dlink -o GPUFloydWarshall.o temp.o -L/usr/local/cuda/lib64 -lcuda -lcudart rm -f libgpu.a ar cru libgpu.a GPUFloydWarshall.o ranlib libgpu.a
When all this is related to the main executable, I get the following error:
problem/libproblem.a(libproblem_a-UTRP.o): In function `UTRP::evaluate(Solution&)': UTRP.cpp:(.text+0x1220): undefined reference to `gpu_fw(double*, int)'
The gpu_fw function is my wrapper function.
source share