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

Flag BLAS++ seems not to be working properly #905

Open
weslleyspereira opened this issue Aug 31, 2023 · 0 comments · May be fixed by #903
Open

Flag BLAS++ seems not to be working properly #905

weslleyspereira opened this issue Aug 31, 2023 · 0 comments · May be fixed by #903

Comments

@weslleyspereira
Copy link
Collaborator

The intent of the flags BLAS++ and LAPACK++ in the building system is to build libblaspp and liblapackpp. As I understand from the CMakeLists.txt, those libraries should be linked to the local libraries libblas and liblapack, the ones we store in the directory lib. However, I found out that this does not seem to be working properly.

Below, I assume that the patch c431f75 was already applied to the master branch. Otherwise, we may end up in the problem reported at #903.

Some of my findings using the flag BLAS++=ON:

  1. If I have a BLAS library previously installed in my system, libblaspp may actually choose that BLAS library instead of the local one.
  2. If I don't have a BLAS library installed and BUILD_SHARED=ON, it will link with "-lblas" (I assume it is the local one). However, I see libblas.so.3 => not found when I run ldd libblaspp.so. I would say this is a problem, but I am not sure about that.
  3. If I don't have a BLAS library installed and BUILD_SHARED_LIBS=OFF, occasionally I get the error BLAS library not found. from BLAS++. I didn't investigate further why this only happens occasionally.

Script to reproduce the problem on a Ubuntu system:

sudo apt update
sudo apt install -y cmake gfortran git
git clone https://github.com/weslleyspereira/lapack.git
cd lapack
git checkout c431f75a4a07e4842e69c7eadc1ff73836dee668
sudo apt install -y libopenblas-dev # Comment this line if you want to test cases 2 and 3.
cmake -B build -D BUILD_TESTING=OFF -D BLAS++=ON # -D BUILD_SHARED_LIBS=ON if you want to test case 2
cmake --build build

I tested both in my personal machine and in the docker image: ghcr.io/catthehacker/ubuntu:act-latest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant