CMake fails when no BLAS library present.

Issue #345 wontfix
Eamonn O'Shea created an issue

Running

cmake -DCMAKE_INSTALL_PREFIX=/usr/local

results in the error:

-- The CXX compiler identification is GNU 4.8.5
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring blaze version 3.8
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
CMake Error at /usr/local/cmake/3.9.4/share/cmake-3.9/Modules/FindBLAS.cmake:699 (message):
  A required library with BLAS API not found.  Please specify library
  location.
Call Stack (most recent call first):
  /usr/local/cmake/3.9.4/share/cmake-3.9/Modules/FindLAPACK.cmake:162 (find_package)
  CMakeLists.txt:72 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/eamonn/Apps/blaze/CMakeFiles/CMakeOutput.log".
See also "/home/eamonn/Apps/blaze/CMakeFiles/CMakeError.log".

Of course one should practically want to have a BLAS installation as the documentation says:

“For maximum performance, Blaze expects you to have a BLAS library installed (Intel MKL, ACML, Atlas, Goto, ...). If you don't have a BLAS library installed on your system, Blaze will still work and will not be reduced in functionality, but performance may be limited. Thus it is strongly recommended to install a BLAS library.”

but I think I would expect blaze to successfully install even without BLAS available. If BLAS is indeed required and not just strongly suggested would it be possible for the documentation to reflect that?

Thanks!

Eamonn

Comments (4)

  1. Klaus Iglberger

    Hi Eamonn!

    Thanks a lot for creating this bug report. You are correct, the installation should be successful even without BLAS available. We will fix the problem as quickly as possible. Thanks again for pointing out this defect,

    Best regards,

    Klaus!

  2. Klaus Iglberger

    Hi Eamonn!

    I’ve checked the CMakeLists.txt file to see if we missed anything. However, only in case the BLAZE_BLAS_MODE is activated (i.e. set to ON), CMake tries to detect a BLAS library. In that case it is expected and failing to provide a BLAS library should result in an error.

    Could you please check if BLAZE_BLAS_MODE is disabled when you run CMake? For that purpose you can either use cmake-gui or pass the setting on the command line:

    cmake -DBLAZE_BLAS_MODE:BOOL=OFF .
    

    Thanks in advance,

    Best regards,

    Klaus!

  3. Klaus Iglberger

    Without further feedback we assume that the problem has been resolved. Therefore we mark the issue as 'wontfix'.

  4. Adam Lugowski

    You must also disable LAPACK with USE_LAPACK=OFF since LAPACK can transitively depend on BLAS.

    Notice in the error message above the FindBLAS error came from FindLAPACK.

  5. Log in to comment