Skip to content

Commit

Permalink
Changed mkl library from shard to static
Browse files Browse the repository at this point in the history
  • Loading branch information
abenmao committed Dec 8, 2023
1 parent 5cf2200 commit 23a800a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,11 @@ else()
link_directories(${CMAKE_SOURCE_DIR}/3rdparty/oneccl/build/_install/lib/prov)
endif()

set(3RDPART_LIB_LIST ${MPI_LIBS} "ccl" "dnnl" "numa" "mkl_rt")
set(3RDPART_LIB_LIST ${MPI_LIBS} "ccl" "dnnl" "numa")

# Enable MKL library
list(APPEND 3RDPART_LIB_LIST "mkl_intel_ilp64" "mkl_gnu_thread" "mkl_core")

option(BUILD_WITH_SHARED_LIBS "Build with shared libraries" OFF)
if(BUILD_WITH_SHARED_LIBS)
message(STATUS "Notice: Building with shared libraries.")
Expand Down
5 changes: 1 addition & 4 deletions cmake/mkl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.24.0")
endif()

find_package (Python COMPONENTS Interpreter Development)
execute_process(COMMAND ${Python_EXECUTABLE} -m pip install --prefix=${CMAKE_SOURCE_DIR}/3rdparty/mkl mkl mkl-include
RESULT_VARIABLE EXIT_CODE
OUTPUT_QUIET)
execute_process(COMMAND ln -sf ${CMAKE_SOURCE_DIR}/3rdparty/mkl/lib/libmkl_rt.so.2 ${CMAKE_SOURCE_DIR}/3rdparty/mkl/lib/libmkl_rt.so
execute_process(COMMAND ${Python_EXECUTABLE} -m pip install --prefix=${CMAKE_SOURCE_DIR}/3rdparty/mkl mkl-static mkl-include
RESULT_VARIABLE EXIT_CODE
OUTPUT_QUIET)

0 comments on commit 23a800a

Please sign in to comment.