Search code examples
linuxluatorchopenblaszerobrane

Error: Lapack library not found in compile time (zerobrane, lua, torch)


After research I found:

git clone https://github.com/xianyi/OpenBLAS.git
cd OpenBLAS
make NO_AFFINITY=1 USE_OPENMP=1
sudo make install

and

CMAKE_LIBRARY_PATH=/opt/OpenBLAS/include:/opt/OpenBLAS/lib:$CMAKE_LIBRARY_PATH luarocks install torch

which again left me with an error:

Makefile.system:370: *** OpenBLAS: 
Cannot set both USE_OPENMP=1 and USE_THREAD=0. 
The USE_THREAD=0 is only for building single thread version.. Stop.

Solution

  • This is the necessary change:

    make NO_AFFINITY=1 USE_OPENMP=0 USE_THREAD=0
    

    Might be an issue if only one core is available.