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

Issue to compile test_prog #13

Open
aedera opened this issue Sep 29, 2022 · 0 comments
Open

Issue to compile test_prog #13

aedera opened this issue Sep 29, 2022 · 0 comments

Comments

@aedera
Copy link

aedera commented Sep 29, 2022

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 function gasal_host_batch_new(unsigned int, unsigned int)': /usr/local/cuda-11.2/targets/x86_64-linux/include/cuda_runtime.h:388: undefined reference to cudaHostAlloc'
/usr/bin/ld: ../lib/libgasal.a(host_batch.cppo): in function gasal_host_batch_new(unsigned int, unsigned int)': /home/ae/var/dl/gasal2/GASAL2-master/src/host_batch.cpp:15: undefined reference to cudaGetErrorString'
/usr/bin/ld: ../lib/libgasal.a(host_batch.cppo): in function gasal_host_batch_destroy(host_batch*)': /home/ae/var/dl/gasal2/GASAL2-master/src/host_batch.cpp:37: undefined reference to cudaFreeHost'
....

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.

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

1 participant