summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Davydov <davydden@gmail.com>2019-03-29 21:01:43 +0100
committerGregory Lee <lee218@llnl.gov>2019-03-29 13:01:43 -0700
commitdef5b237633f6cfa51d5619d34880a993c5d3a32 (patch)
tree6ac5654744d012d806363c7c90f0c74e2727b021
parent03d39ed34cfab7008232678c8dd2ba5103a569e6 (diff)
downloadspack-def5b237633f6cfa51d5619d34880a993c5d3a32.tar.gz
spack-def5b237633f6cfa51d5619d34880a993c5d3a32.tar.bz2
spack-def5b237633f6cfa51d5619d34880a993c5d3a32.tar.xz
spack-def5b237633f6cfa51d5619d34880a993c5d3a32.zip
add libs property to IntelMkl and IntelParallelStudio (#10993)
* add libs property to IntelMkl and IntelParallelStudio * fix scalapack_libs when MPI is provided by intel-parallel-studio
-rw-r--r--lib/spack/spack/build_systems/intel.py7
-rw-r--r--var/spack/repos/builtin/packages/intel-mkl/package.py14
-rw-r--r--var/spack/repos/builtin/packages/intel-parallel-studio/package.py14
3 files changed, 32 insertions, 3 deletions
diff --git a/lib/spack/spack/build_systems/intel.py b/lib/spack/spack/build_systems/intel.py
index 21d69ab4d4..7bc32d61e2 100644
--- a/lib/spack/spack/build_systems/intel.py
+++ b/lib/spack/spack/build_systems/intel.py
@@ -10,7 +10,7 @@ import glob
import tempfile
import re
import inspect
-import xml.etree.ElementTree as ET
+import xml.etree.ElementTree as ElementTree
import llnl.util.tty as tty
from llnl.util.filesystem import \
@@ -227,7 +227,7 @@ class IntelPackage(PackageBase):
#
# https://software.intel.com/en-us/articles/configuration-file-format
#
- xmltree = ET.parse('pset/mediaconfig.xml')
+ xmltree = ElementTree.parse('pset/mediaconfig.xml')
for entry in xmltree.getroot().findall('.//Abbr'): # XPath expression
name_present = entry.text
for name_requested in requested:
@@ -790,7 +790,8 @@ class IntelPackage(PackageBase):
blacs_lib = 'libmkl_blacs'
elif ('^mpich@2:' in spec_root or
'^mvapich2' in spec_root or
- '^intel-mpi' in spec_root):
+ '^intel-mpi' in spec_root or
+ '^intel-parallel-studio' in spec_root):
blacs_lib = 'libmkl_blacs_intelmpi'
elif '^mpt' in spec_root:
blacs_lib = 'libmkl_blacs_sgimpt'
diff --git a/var/spack/repos/builtin/packages/intel-mkl/package.py b/var/spack/repos/builtin/packages/intel-mkl/package.py
index 2ed678df1f..e447d88894 100644
--- a/var/spack/repos/builtin/packages/intel-mkl/package.py
+++ b/var/spack/repos/builtin/packages/intel-mkl/package.py
@@ -6,6 +6,7 @@
import sys
from spack import *
+from spack.build_systems.intel import debug_print
class IntelMkl(IntelPackage):
@@ -64,3 +65,16 @@ class IntelMkl(IntelPackage):
if sys.platform == 'darwin':
# there is no libmkl_gnu_thread on macOS
conflicts('threads=openmp', when='%gcc')
+
+ @property
+ def libs(self):
+ libs = LibraryList([])
+ if self.provides('blas'):
+ libs = self.blas_libs
+ if self.provides('lapack'):
+ libs = self.lapack_libs + libs
+ if self.provides('scalapack'):
+ libs = self.scalapack_libs + libs
+
+ debug_print(libs)
+ return libs
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 8eaef6bf9a..b0793adf5f 100644
--- a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py
+++ b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py
@@ -4,6 +4,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
+from spack.build_systems.intel import debug_print
class IntelParallelStudio(IntelPackage):
@@ -195,3 +196,16 @@ class IntelParallelStudio(IntelPackage):
'F90': spack_fc,
'FC': spack_fc,
})
+
+ @property
+ def libs(self):
+ libs = LibraryList([])
+ if self.provides('blas'):
+ libs = self.blas_libs
+ if self.provides('lapack'):
+ libs = self.lapack_libs + libs
+ if self.provides('scalapack'):
+ libs = self.scalapack_libs + libs
+
+ debug_print(libs)
+ return libs