summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorGreg Lee <lee218@llnl.gov>2016-07-25 14:01:49 -0700
committerGreg Lee <lee218@llnl.gov>2016-07-25 14:01:49 -0700
commitdba384108b47eaf67c20e7b1110e0b29c1fe36c6 (patch)
tree5a9d70d881bf3518884cb0a5d37ae19f78118ab1 /var
parent7220bc1766a7c76e53464b009a5816c40f606575 (diff)
downloadspack-dba384108b47eaf67c20e7b1110e0b29c1fe36c6.tar.gz
spack-dba384108b47eaf67c20e7b1110e0b29c1fe36c6.tar.bz2
spack-dba384108b47eaf67c20e7b1110e0b29c1fe36c6.tar.xz
spack-dba384108b47eaf67c20e7b1110e0b29c1fe36c6.zip
intel parallel studio setup mkl environment
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/intel-parallel-studio/package.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py
index fb98b2473c..00a30cafaf 100644
--- a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py
+++ b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py
@@ -50,6 +50,11 @@ class IntelParallelStudio(IntelInstaller):
provides('daal', when='+daal')
provides('ipp', when='+ipp')
+ # virtual dependency
+ provides('blas', when='+mkl')
+ provides('lapack', when='+mkl')
+ # TODO: MKL also provides implementation of Scalapack.
+
def check_variants(self, spec):
error_message = '\t{variant} can not be turned off if "+all" is set'
@@ -159,6 +164,24 @@ class IntelParallelStudio(IntelInstaller):
os.symlink(os.path.join(self.prefix.man, "common", "man1"),
os.path.join(self.prefix.man, "man1"))
+ def setup_dependent_package(self, module, dspec):
+ # For now use Single Dynamic Library:
+ # To set the threading layer at run time, use the
+ # mkl_set_threading_layer function or set MKL_THREADING_LAYER
+ # variable to one of the following values: INTEL, SEQUENTIAL, PGI.
+ # To set interface layer at run time, use the mkl_set_interface_layer
+ # function or set the MKL_INTERFACE_LAYER variable to LP64 or ILP64.
+
+ # Otherwise one would need to specify several libraries
+ # (e.g. mkl_intel_lp64;mkl_sequential;mkl_core), which reflect
+ # different interface and threading layers.
+
+ name = 'libmkl_rt.%s' % dso_suffix
+ libdir = find_library_path(name, self.prefix.lib64, self.prefix.lib)
+
+ self.spec.blas_shared_lib = join_path(libdir, name)
+ self.spec.lapack_shared_lib = self.spec.blas_shared_lib
+
def setup_environment(self, spack_env, run_env):
# TODO: Determine variables needed for the professional edition.
@@ -227,6 +250,8 @@ class IntelParallelStudio(IntelInstaller):
run_env.set('I_MPI_ROOT', join_path(self.prefix, 'impi'))
if self.spec.satisfies('+all') or self.spec.satisfies('+mkl'):
+ spack_env.set('MKLROOT', self.prefix)
+
run_env.prepend_path('LD_LIBRARY_PATH',
join_path(self.prefix, 'mkl', 'lib',
'intel64'))