Skip to content

Commit

Permalink
Added BLAS_VENDOR
Browse files Browse the repository at this point in the history
  • Loading branch information
cnegre committed May 1, 2022
1 parent 3f89be6 commit 97afb34
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
21 changes: 21 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,27 @@ if(PROGRESS_MPI)
# add_definitions(-DDO_MPI_BLOCK)
endif()

set(BLAS_VENDOR ""
CACHE STRING "If set, the preferred BLAS/LAPACK vendor. Possible choices: {OpenBLAS,Intel,ACML,IBMESSL,...}")

if(BLAS_VENDOR STREQUAL "None")
set(NOBLAS TRUE)
add_definitions(-DNOBLAS)
elseif(NOT BLAS_LIBRARIES)
set(BLA_VENDOR ${BLAS_VENDOR})
message(STATUS "BLA_VENDOR=${BLA_VENDOR}")
include(FindBLAS)
if(NOT BLAS_FOUND)
message(FATAL_ERROR "Can not find suitable BLAS library")
endif()
endif()
message(STATUS "BLAS_LIBRARIES=${BLAS_LIBRARIES}")
if(BLAS_LIBRARIES)
set(BLAS_FOUND TRUE)
endif()

find_package(Threads REQUIRED)

set(SANITY_CHECK FALSE CACHE BOOL "Additional sanity checks")
if(SANITY_CHECK)
message(STATUS "Will add sanity checks")
Expand Down
2 changes: 2 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ EOF
echo "FC Path to Fortran compiler (default is ${FC})"
echo "BML_OPENMP {yes,no} (default is ${BML_OPENMP})"
echo "PROGRESS_OPENMP {yes,no} (default is ${PROGRESS_OPENMP})"
echo "BLAS_VENDOR {Default} (default is ${BLAS_VENDOR})"
echo "PROGRESS_MPI {yes,no} (default is ${PROGRESS_MPI})"
echo "PROGRESS_TESTING {yes,no} (default is ${PROGRESS_TESTING})"
echo "PROGRESS_EXAMPLES {yes,no} (default is ${PROGRESS_EXAMPLES})"
Expand Down Expand Up @@ -123,6 +124,7 @@ configure() {
-DPROGRESS_MPI="${PROGRESS_MPI}" \
-DBUILD_SHARED_LIBS="${BUILD_SHARED_LIBS:=no}" \
-DPROGRESS_TESTING="${PROGRESS_TESTING}" \
-DBLAS_VENDOR="${BLAS_VENDOR}" \
-DPROGRESS_EXAMPLES="${PROGRESS_EXAMPLES}" \
-DPROGRESS_BENCHMARKS="${PROGRESS_BENCHMARKS}" \
-DPROGRESS_GRAPHLIB="${PROGRESS_GRAPHLIB}" \
Expand Down

0 comments on commit 97afb34

Please sign in to comment.