From 044496e81b1eba08396afc94d1ef83dfec74e66b Mon Sep 17 00:00:00 2001 From: Kareem Sorathia Date: Thu, 30 Oct 2025 14:27:21 -0400 Subject: [PATCH] Adding warning about weird MKL intel25 behavior --- cmake/compilers.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cmake/compilers.cmake b/cmake/compilers.cmake index 9a067e26..2dd08919 100644 --- a/cmake/compilers.cmake +++ b/cmake/compilers.cmake @@ -130,15 +130,24 @@ if(CMAKE_Fortran_COMPILER_ID MATCHES Intel) string(APPEND PRODWITHDEBUGINFO " -march=core-avx2") elseif (HOST MATCHES stampede3) message("You're on Stampede3!") + if (ENABLE_MKL) + string(APPEND CMAKE_Fortran_FLAGS " -qmkl") + endif() string(APPEND PROD " -xCORE-AVX512") string(APPEND PRODWITHDEBUGINFO " -xCORE-AVX512") endif() + #Check Intel Fortran version if(NOT ALLOW_INVALID_COMPILERS AND CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER "2021.9" AND CMAKE_Fortran_COMPILER_VERSION VERSION_LESS "2025.1") message(FATAL_ERROR "Intel OneAPI compilers between 2022-2024 have compiler bugs which cause weird numerical errors in our code. You can set the ALLOW_INVALID_COMPILERS variable to ON to force compilation at your own risk. You'll probably get what you deserve.") endif() + #Check for MKL + intel25 + if (ENABLE_MKL AND (CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER "2024")) + message(WARNING "Intel OneAPI MKL has been found to fail in weird ways and should probably be avoided. But hey, do what you want. I'm a warning message, not a cop.") + endif() + elseif(CMAKE_Fortran_COMPILER_ID MATCHES GNU) set(dialect "-ffree-form -ffree-line-length-none -fimplicit-none") #Base