clMathLibraries / clBLAS

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

Build clBLAS without OpenBLAS? #346

Open cponder opened 5 years ago

cponder commented 5 years ago

I can't build clBLAs because of this error:

/usr/bin/ld: cannot find -lopenblas

I don't want to have to install another BLAS on the system. The documentation doesn't say that clBLAS has any dependency like this:

Build dependencies Library for Linux GCC 4.6 and onwards An OpenCL SDK, such as APP SDK 2.9 Latest CMake

Also I've tried to disable all the tests:

-DBUILD_KTEST:BOOL=OFF" -DBUILD_TEST:BOOL=OFF"

Is there a way to turn this dependency off??

cponder commented 5 years ago

Also, I've got to say, I can't figure out build options from CMake the way i can from AutoTools.

tingxingdong commented 5 years ago

sudo apt install liblapack-dev liblapack3 libopenblas-base libopenblas-dev

cponder commented 5 years ago

I'm using a system where I don't have the authority to do this. Also I'm trying to build separate copies of the library to be ported to other CentOS- and Ubuntu- based systems, and want to minimize the number of external library dependencies Since, assuming I read correctly, the OpenBLAS is only being used in the testing phase, that dependency shouldn't have to be in the library.

CNugteren commented 5 years ago

I believe by setting BUILD_TEST to off you wouldn't need a reference BLAS library as a dependency, because you shouldn't get into this bit of code.

cponder commented 4 years ago

Ok -- thenks -- this solved the problem! I had been setting -DBUILD_KTEST:BOOL=OFF but that isn't the same thing. So here's the next question: is there a way to separate the build/install of the libraries from the build/install of the tests? Like cmake -DBUILD_TEST:BOOL=OFF ... make install `

` ` cmake -DBUILD_TEST:BOOL=ON ... ` ` make test `