From 7e2470c02d01fdec4e81982bf29fb9bb3bb230a6 Mon Sep 17 00:00:00 2001 From: Ajay Panyala Date: Thu, 27 Apr 2023 21:07:11 -0700 Subject: [PATCH 1/3] MKL fix for mac --- FindIntelMKL.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/FindIntelMKL.cmake b/FindIntelMKL.cmake index 1eb00d8..85bbc0a 100644 --- a/FindIntelMKL.cmake +++ b/FindIntelMKL.cmake @@ -364,6 +364,7 @@ if( IntelMKL_LIBRARY AND IntelMKL_THREAD_LIBRARY AND IntelMKL_CORE_LIBRARY ) if( IntelMKL_PREFERS_STATIC ) + if(NOT "${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Darwin") list( PREPEND IntelMKL_BLAS_LAPACK_LIBRARIES "-Wl,--start-group" ) list( APPEND IntelMKL_BLAS_LAPACK_LIBRARIES "-Wl,--end-group" ) @@ -371,6 +372,7 @@ if( IntelMKL_LIBRARY AND IntelMKL_THREAD_LIBRARY AND IntelMKL_CORE_LIBRARY ) list( PREPEND IntelMKL_BLACS_LIBRARIES "-Wl,--start-group" ) list( APPEND IntelMKL_BLACS_LIBRARIES "-Wl,--end-group" ) endif() + endif() if( "scalapack" IN_LIST IntelMKL_FIND_COMPONENTS ) set( IntelMKL_ScaLAPACK_LIBRARIES From 3a573e65b74b6c95ffa04795b94b17eded463576 Mon Sep 17 00:00:00 2001 From: Ajay Panyala Date: Fri, 28 Apr 2023 08:59:00 -0700 Subject: [PATCH 2/3] throw error if attempting to use mkl on arm architectures --- FindIntelMKL.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/FindIntelMKL.cmake b/FindIntelMKL.cmake index 85bbc0a..2b48695 100644 --- a/FindIntelMKL.cmake +++ b/FindIntelMKL.cmake @@ -26,6 +26,10 @@ if( "scalapack" IN_LIST IntelMKL_FIND_COMPONENTS AND NOT ("blacs" IN_LIST IntelM list(APPEND IntelMKL_FIND_COMPONENTS "blacs" ) endif() +if ("${CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "arm64") + message( FATAL_ERROR "IntelMKL is not supported for ARM architectures" ) +endif() + # MKL lib names if( IntelMKL_PREFERS_STATIC ) set( IntelMKL_LP64_LIBRARY_NAME "libmkl_intel_lp64.a" ) From 3df52e83a468013b322445c99b367da4c8f3d91f Mon Sep 17 00:00:00 2001 From: Ajay Panyala Date: Fri, 28 Apr 2023 09:14:13 -0700 Subject: [PATCH 3/3] [MKL] warn when arm64 is detected --- FindIntelMKL.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FindIntelMKL.cmake b/FindIntelMKL.cmake index 2b48695..3b2b307 100644 --- a/FindIntelMKL.cmake +++ b/FindIntelMKL.cmake @@ -27,7 +27,7 @@ if( "scalapack" IN_LIST IntelMKL_FIND_COMPONENTS AND NOT ("blacs" IN_LIST IntelM endif() if ("${CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "arm64") - message( FATAL_ERROR "IntelMKL is not supported for ARM architectures" ) + message( WARNING "IntelMKL is not supported for ARM architectures" ) endif() # MKL lib names