From f3e6bdd9e19a38292f8a299b6cd2696b9ab9301e Mon Sep 17 00:00:00 2001 From: Mahrud Sayrafi Date: Sun, 21 Jul 2024 14:46:55 +0200 Subject: [PATCH] added fixes for Intel MKL 2024.1 --- M2/Macaulay2/e/engine-includes.hpp | 4 ++++ M2/Macaulay2/e/lapack.hpp | 2 ++ 2 files changed, 6 insertions(+) diff --git a/M2/Macaulay2/e/engine-includes.hpp b/M2/Macaulay2/e/engine-includes.hpp index 7d6a0bb7e37..a823ece8a5d 100644 --- a/M2/Macaulay2/e/engine-includes.hpp +++ b/M2/Macaulay2/e/engine-includes.hpp @@ -7,6 +7,10 @@ // IWYU pragma: begin_exports +// For zgetrf_ from Intel MKL +// See mkl_lapack.hpp and mkl_types.hpp +#define MKL_Complex16 double + #include #if !defined(SAFEC_EXPORTS) diff --git a/M2/Macaulay2/e/lapack.hpp b/M2/Macaulay2/e/lapack.hpp index 9e02c721ded..b870a70012f 100644 --- a/M2/Macaulay2/e/lapack.hpp +++ b/M2/Macaulay2/e/lapack.hpp @@ -13,6 +13,7 @@ /* MES, On my mac, 10.12.4, lapack include file is at /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/Headers/clapack.h */ +#ifndef _MKL_LAPACK_H_ extern "C" { int dgesv_(int *n, // number of rows in A int *nrhs, // number of right hand sides @@ -389,6 +390,7 @@ void cblas_zgemm( void *C, // matrix C; on output, alphaAB+betaC const int ldc); // rows of C }; +#endif class Lapack {