Skip to content

Commit 6f7207b

Browse files
authored
Build: fix compatibility with oneAPI 2024.2 (#4603)
* Build: fix compatibility with oneAPI 2024.2 * fix linking
1 parent 89a629e commit 6f7207b

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

CMakeLists.txt

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ if(ENABLE_LCAO)
215215
if(ENABLE_FFT_TWO_CENTER)
216216
add_compile_definitions(USE_NEW_TWO_CENTER)
217217
endif()
218-
218+
219219
if(ENABLE_PEXSI)
220220
find_package(PEXSI REQUIRED)
221221
target_link_libraries(${ABACUS_BIN_NAME} ${PEXSI_LIBRARY} ${SuperLU_DIST_LIBRARY} ${ParMETIS_LIBRARY} ${METIS_LIBRARY} pexsi)
@@ -397,13 +397,7 @@ if(MKLROOT)
397397
find_package(IntelMKL REQUIRED)
398398
add_definitions(-D__MKL)
399399
include_directories(${MKL_INCLUDE_DIRS} ${MKL_INCLUDE_DIRS}/fftw)
400-
401-
# Since libtorch will find its own MKL, the fftw part conflicts with the
402-
# original one. When enable deepks, mkl will be linked within
403-
# ${TORCH_LIBRARIES}.
404-
if(NOT ENABLE_DEEPKS)
405-
list(APPEND math_libs IntelMKL::MKL)
406-
endif()
400+
list(APPEND math_libs IntelMKL::MKL)
407401

408402
if(CMAKE_CXX_COMPILER_ID MATCHES Intel)
409403
list(APPEND math_libs -lifcore)

cmake/FindIntelMKL.cmake

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
# Find the native MKL headers and libraries.
33
#
44
# MKL_INCLUDE_DIRS - where to find mkl.h, etc.
5-
# MKL_LIBRARIES - List of libraries when using mkl.
65
# MKL_FOUND - True if mkl found.
7-
#
86

97
find_path(MKL_INCLUDE_DIR mkl_service.h HINTS ${MKLROOT}/include)
108

@@ -27,11 +25,6 @@ else()
2725
endif()
2826

2927
if(IntelMKL_FOUND)
30-
if (ENABLE_MPI)
31-
set(MKL_LIBRARIES ${MKL_INTEL} ${MKL_INTEL_THREAD} ${MKL_CORE} ${MKL_SCALAPACK} ${MKL_BLACS_INTELMPI})
32-
else()
33-
set(MKL_LIBRARIES ${MKL_INTEL} ${MKL_INTEL_THREAD} ${MKL_CORE})
34-
endif()
3528
set(MKL_INCLUDE_DIRS ${MKL_INCLUDE_DIR})
3629

3730
if(NOT TARGET IntelMKL::INTEL)

0 commit comments

Comments
 (0)