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
This commit is contained in:

committed by
Gregory Lee

parent
03d39ed34c
commit
def5b23763
@@ -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
|
||||
|
@@ -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 @@ def setup_dependent_environment(self, *args):
|
||||
'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
|
||||
|
Reference in New Issue
Block a user