summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorCarlos Bederián <zzzoom@gmail.com>2017-02-04 04:18:31 +0200
committerTodd Gamblin <tgamblin@llnl.gov>2017-02-03 18:18:31 -0800
commit384698157a01a1861ee4f4c19e2cbf5d512f03c0 (patch)
treedd240dfe491e69feadc40cb9860e78d5a40a8142 /var
parent4c1c284e569f0e1496e85d7a3462e99b6278fc4f (diff)
downloadspack-384698157a01a1861ee4f4c19e2cbf5d512f03c0.tar.gz
spack-384698157a01a1861ee4f4c19e2cbf5d512f03c0.tar.bz2
spack-384698157a01a1861ee4f4c19e2cbf5d512f03c0.tar.xz
spack-384698157a01a1861ee4f4c19e2cbf5d512f03c0.zip
MKL: Provide scalapack (#2974)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/intel-mkl/package.py30
-rw-r--r--var/spack/repos/builtin/packages/intel-parallel-studio/package.py30
2 files changed, 58 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/intel-mkl/package.py b/var/spack/repos/builtin/packages/intel-mkl/package.py
index f369e10d38..1d7ea1ee89 100644
--- a/var/spack/repos/builtin/packages/intel-mkl/package.py
+++ b/var/spack/repos/builtin/packages/intel-mkl/package.py
@@ -55,8 +55,8 @@ class IntelMkl(IntelInstaller):
# virtual dependency
provides('blas')
provides('lapack')
+ provides('scalapack')
provides('mkl')
- # TODO: MKL also provides implementation of Scalapack.
@property
def blas_libs(self):
@@ -83,6 +83,34 @@ class IntelMkl(IntelInstaller):
def lapack_libs(self):
return self.blas_libs
+ @property
+ def scalapack_libs(self):
+ libnames = ['libmkl_scalapack']
+ if self.spec.satisfies('^openmpi'):
+ libnames.append('libmkl_blacs_openmpi')
+ elif self.spec.satisfies('^mpich@1'):
+ libnames.append('libmkl_blacs')
+ elif self.spec.satisfies('^mpich@2:'):
+ libnames.append('libmkl_blacs_intelmpi')
+ elif self.spec.satisfies('^mvapich2'):
+ libnames.append('libmkl_blacs_intelmpi')
+ elif self.spec.satisfies('^mpt'):
+ libnames.append('libmkl_blacs_sgimpt')
+ # TODO: ^intel-parallel-studio can mean intel mpi, a compiler or a lib
+ # elif self.spec.satisfies('^intel-parallel-studio'):
+ # libnames.append('libmkl_blacs_intelmpi')
+ else:
+ raise InstallError("No MPI found for scalapack")
+
+ shared = True if '+shared' in self.spec else False
+ integer = 'ilp64' if '+ilp64' in self.spec else 'lp64'
+ libs = find_libraries(
+ ['{0}_{1}'.format(l, integer) for l in libnames],
+ root=join_path(self.prefix.lib, 'intel64'),
+ shared=shared
+ )
+ return libs
+
def install(self, spec, prefix):
self.intel_prefix = os.path.join(prefix, "pkg")
IntelInstaller.install(self, spec, prefix)
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 941ef9befb..fbafb4fb0d 100644
--- a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py
+++ b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py
@@ -77,7 +77,7 @@ class IntelParallelStudio(IntelInstaller):
# virtual dependency
provides('blas', when='+mkl')
provides('lapack', when='+mkl')
- # TODO: MKL also provides implementation of Scalapack.
+ provides('scalapack', when='+mkl')
@property
def blas_libs(self):
@@ -104,6 +104,34 @@ class IntelParallelStudio(IntelInstaller):
def lapack_libs(self):
return self.blas_libs
+ @property
+ def scalapack_libs(self):
+ libnames = ['libmkl_scalapack']
+ if self.spec.satisfies('^openmpi'):
+ libnames.append('libmkl_blacs_openmpi')
+ elif self.spec.satisfies('^mpich@1'):
+ libnames.append('libmkl_blacs')
+ elif self.spec.satisfies('^mpich@2:'):
+ libnames.append('libmkl_blacs_intelmpi')
+ elif self.spec.satisfies('^mvapich2'):
+ libnames.append('libmkl_blacs_intelmpi')
+ elif self.spec.satisfies('^mpt'):
+ libnames.append('libmkl_blacs_sgimpt')
+ # TODO: ^intel-parallel-studio can mean intel mpi, a compiler or a lib
+ # elif self.spec.satisfies('^intel-parallel-studio'):
+ # libnames.append('libmkl_blacs_intelmpi')
+ else:
+ raise InstallError("No MPI found for scalapack")
+
+ shared = True if '+shared' in self.spec else False
+ integer = 'ilp64' if '+ilp64' in self.spec else 'lp64'
+ libs = find_libraries(
+ ['{0}_{1}'.format(l, integer) for l in libnames],
+ root=join_path(self.prefix, 'mkl', 'lib', 'intel64'),
+ shared=shared
+ )
+ return libs
+
def url_for_version(self, version):
"""Assume the tarball is in the current directory."""