-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Hello,
I could successfully compile GASAL2 using the configure.sh and then make, but I am experiencing issues to compile test_prog. Below there is a part of the output when executing the Makefile in the folder test_prog
$ g++ -std=c++11 -g -c -O3 -Wall -Werror -fopenmp -I ../include -o test_prog.o test_prog.cpp
$ g++ -std=c++11 -O3 -o test_prog.out -L/usr/local/cuda-11.2/targets/x86_64-linux/lib -L../lib test_prog.o -fopenmp -lcudart -lgasal
/usr/bin/ld: ../lib/libgasal.a(host_batch.cppo): in functiongasal_host_batch_new(unsigned int, unsigned int)': /usr/local/cuda-11.2/targets/x86_64-linux/include/cuda_runtime.h:388: undefined reference tocudaHostAlloc'
/usr/bin/ld: ../lib/libgasal.a(host_batch.cppo): in functiongasal_host_batch_new(unsigned int, unsigned int)': /home/ae/var/dl/gasal2/GASAL2-master/src/host_batch.cpp:15: undefined reference tocudaGetErrorString'
/usr/bin/ld: ../lib/libgasal.a(host_batch.cppo): in functiongasal_host_batch_destroy(host_batch*)': /home/ae/var/dl/gasal2/GASAL2-master/src/host_batch.cpp:37: undefined reference tocudaFreeHost'
....
It seems there is a problem when linking cudart to the object file ( test_prog.o). I checked that cudart was available in the path indicated by the option -L (/usr/local/cuda-11.2/targets/x86_64-linux/lib).
What I am missing?
Thanks in advance.