Skip to content

matmul compilation in MN5 (with BLAS)

I try to compile all the tests I can with the optional libraries that cmake detects. The matmul benchmark needs BLAS, which I don't have installed. cmake detects this correctly, but it adds the benchmark to the Makefile. When I execute make, it fails to compile matmul (as I don't have BLAS).

Outputs:

cmake .. (I'm inside a build folder)

...
-- Could NOT find BLAS (missing: BLAS_LIBRARIES) 
-- Could NOT find BLAS (missing: BLAS_LIBRARIES) 
-- Could NOT find LAPACK (missing: LAPACK_LIBRARIES) 
    Reason given by package: LAPACK could not be found because dependency BLAS could not be found.

-- The following OPTIONAL packages have been found:

 * MPI
 * Nodes
 * OpenMP
 * Threads

-- The following OPTIONAL packages have not been found:

 * Nanos6
 * Tampi
 * Gaspi
 * Tagaspi
 * OpenMPV
 * BLAS
 * LAPACK

-- Configuring done
CMake Error at src/matmul/CMakeLists.txt:12 (target_link_libraries):
  Target "b6_matmul_nodes" links to:

    BLAS::BLAS

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.



CMake Error at src/matmul/CMakeLists.txt:18 (target_link_libraries):
  Target "b6_matmul_omp_iter" links to:

    BLAS::BLAS

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.



-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.

And make

[ 79%] Linking C executable b6_matmul_nodes
/usr/bin/ld: cannot find -lBLAS::BLAS
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [src/matmul/CMakeFiles/b6_matmul_nodes.dir/build.make:98: src/matmul/b6_matmul_nodes] Error 1
make[1]: *** [CMakeFiles/Makefile2:640: src/matmul/CMakeFiles/b6_matmul_nodes.dir/all] Error 2
make: *** [Makefile:136: all] Error 2