clMathLibraries / clBLAS

a software library containing BLAS functions written in OpenCL
Apache License 2.0
843 stars 237 forks source link

undefined clblassetup #356

Open jvalleros opened 3 years ago

jvalleros commented 3 years ago

i'm trying to use clblas in my project but i can't do it because i got undefined error imagen

i don't know if i do anything bad

GasonC commented 2 years ago

Same problem here.

jpola commented 2 years ago

Hi you can execute ldd -d -r <name_of_the_executable> to display the dependencies of your application. Maybe the clBLAS library is not visible.

GasonC commented 2 years ago

Hi you can execute ldd -d -r <name_of_the_executable> to display the dependencies of your application. Maybe the clBLAS library is not visible.

root@user-System-Product-Name:/home/user/clBLAS/src/samples# ldd -d -r example_sgemm.c not a dynamic executable root@user-System-Product-Name:/home/user/clBLAS/src/samples# file ./example_sgemm.c ./example_sgemm.c: C source, ASCII text

Is that means my clBLAS install incorrect?

jpola commented 2 years ago

Have you compiled the clBLAS successfully? I thought the issue presented itself during the linking stage with your program.

GasonC commented 2 years ago

Have you compiled the clBLAS successfully? I thought the issue presented itself during the linking stage with your program.

before I compiled clBLAS, I install AMD ROCm 4.3.1 when compile, it shows some message, then I install some package and set path 1.install gfortran 2.set ROCm dir OpenCL as OpenCL_ROOT 3.install libblas-dev 4.install libboost-all-dev then clBlas can compiled with no errors.

so I can't figure out why it can't run.

jpola commented 2 years ago

Ok, if you compiled the clBLAS then fine. The next thing you are probably doing is to use the clBLAS in your application. For doing that you have to instruct the compiler where to find the clBLAS headers and libs. it is -I path_to_the_clBLAS_headers and -L path_to_dir_with_clBLAS_libs -lclBLAS How does it look like in your case?

GasonC commented 2 years ago

Ok, if you compiled the clBLAS then fine. The next thing you are probably doing is to use the clBLAS in your application. For doing that you have to instruct the compiler where to find the clBLAS headers and libs. it is -I path_to_the_clBLAS_headers and -L path_to_dir_with_clBLAS_libs -lclBLAS How does it look like in your case?

Hi, after add those command It's seems this problem solved. thanks.