summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/mkl/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/mkl/package.py')
-rw-r--r--var/spack/repos/builtin/packages/mkl/package.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/mkl/package.py b/var/spack/repos/builtin/packages/mkl/package.py
index 6ea64f5313..71a233ff3e 100644
--- a/var/spack/repos/builtin/packages/mkl/package.py
+++ b/var/spack/repos/builtin/packages/mkl/package.py
@@ -12,9 +12,9 @@ class Mkl(IntelInstaller):
mirror, see http://software.llnl.gov/spack/mirrors.html.
To set the threading layer at run time set MKL_THREADING_LAYER
- variable to one of the following values: INTEL, SEQUENTIAL, PGI.
+ variable to one of the following values: INTEL (default), SEQUENTIAL, PGI.
To set interface layer at run time, use set the MKL_INTERFACE_LAYER
- variable to LP64 or ILP64.
+ variable to LP64 (default) or ILP64.
"""
homepage = "https://software.intel.com/en-us/intel-mkl"
@@ -38,6 +38,13 @@ class Mkl(IntelInstaller):
for f in os.listdir(mkl_dir):
os.symlink(os.path.join(mkl_dir, f), os.path.join(self.prefix, f))
+ # Unfortunately MKL libs are natively distrubted in prefix/lib/intel64.
+ # To make MKL play nice with Spack, symlink all files to prefix/lib:
+ mkl_lib_dir = os.path.join(prefix, "lib", "intel64")
+ for f in os.listdir(mkl_lib_dir):
+ os.symlink(os.path.join(mkl_lib_dir, f),
+ os.path.join(self.prefix, "lib", f))
+
def setup_dependent_package(self, module, dspec):
# For now use Single Dynamic Library:
# To set the threading layer at run time, use the
@@ -53,6 +60,7 @@ class Mkl(IntelInstaller):
name = 'libmkl_rt.%s' % dso_suffix
libdir = find_library_path(name, self.prefix.lib64, self.prefix.lib)
+ # Now set blas/lapack libs:
self.spec.blas_shared_lib = join_path(libdir, name)
self.spec.lapack_shared_lib = self.spec.blas_shared_lib