[petsc-dev] Configure fails on macOS with MKL

Pierre Jolivet pierre.jolivet at enseeiht.fr
Wed Dec 21 08:39:11 CST 2016


Hello,
There are some issues when using (most recent versions of) the MKL on macOS:
1) the correct path to libmkl_*.dylib is now $MKLROOT/lib/, but this is not taken into account by the build system

diff --git a/config/BuildSystem/config/packages/BlasLapack.py b/config/BuildSystem/config/packages/BlasLapack.py
index 43597e2..017ed12 100644
--- a/config/BuildSystem/config/packages/BlasLapack.py
+++ b/config/BuildSystem/config/packages/BlasLapack.py
@@ -217,7 +217,7 @@ class Configure(config.package.Package):
         mkl_blacs_32=[]
       if useCPardiso or usePardiso:
         self.logPrintBox('BLASLAPACK: Looking for Multithreaded MKL for C/Pardiso')
-        for libdir in [os.path.join('lib','64'),os.path.join('lib','ia64'),os.path.join('lib','em64t'),os.path.join('lib','intel64'),'64','ia64','em64t','intel64',
+        for libdir in [os.path.join('lib','64'),os.path.join('lib','ia64'),os.path.join('lib','em64t'),os.path.join('lib','intel64'),'64','ia64','em64t','lib','intel64',
                        os.path.join('lib','32'),os.path.join('lib','ia32'),'32','ia32','']:
           if not os.path.exists(os.path.join(dir,libdir)):
             self.logPrint('MKL Path not found.. skipping: '+os.path.join(dir,libdir))

2) Once this is fixed, it is assumed that libiomp5.dylib is in the same folder as libmkl_intel_thread.dylib (which is wrong), or at least visible to the linker. Thus, the configure will fail because it can’t find libiomp5.dylib, unless explicitly using —CXX=icpc and —CC=icc, or —LDFLAGS=-L${PATH_TO_LIBIOMP5}

I don’t know if you care enough to fix this (I’m guessing there aren’t that many macOS users compiling PETSc with MKL support but without the Intel compilers), but just in case… 
Thanks,
Pierre


More information about the petsc-dev mailing list