Skip to content

Commit 9ff41d8

Browse files
committed
Report MKL BLACS interface; block mkl_threads with non-OpenMP build
1 parent fb505c2 commit 9ff41d8

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

cmake/modules/FindMKL.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ if(ENABLE_MPI)
9797
endif()
9898

9999
set(_mkl_blacs_name mkl_blacs_${_mkl_mpi}_lp64)
100+
message(STATUS "oneMKL BLACS interface: ${_mkl_blacs_name}")
100101
endif()
101102

102103
# Re-run searches when a configuration axis or the selected MKL root changes.
@@ -192,10 +193,14 @@ if(MKL_FOUND)
192193
message(FATAL_ERROR "MKL_LINK=dynamic did not select shared oneMKL libraries.")
193194
endif()
194195

196+
# oneMKL requires pthread even with mkl_sequential
195197
find_package(Threads REQUIRED)
196198
set(_mkl_runtime Threads::Threads ${CMAKE_DL_LIBS})
197199
list(APPEND _mkl_runtime m)
198200
if(NOT _mkl_threading STREQUAL "sequential")
201+
if(NOT USE_OPENMP)
202+
message(FATAL_ERROR "MKL_THREADING=${_mkl_threading} requires USE_OPENMP=ON.")
203+
endif()
199204
find_package(OpenMP REQUIRED COMPONENTS CXX)
200205
list(APPEND _mkl_runtime OpenMP::OpenMP_CXX)
201206
endif()

0 commit comments

Comments
 (0)