diff options
-rw-r--r-- | var/spack/repos/builtin/packages/intel-mkl/package.py | 30 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/intel-parallel-studio/package.py | 30 |
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.""" |