Update and Bugfix for pexsi/package.py (#8822)
* Update and Bugfix for pexsi/package.py
1. pexsi@0.10.2 is not compatible with superlu-dist@5.4.0 due to [Change LargeDiag to LargeDiag_MC64; Add LargeDiag_AWPM](d7dce5a348
).
2. In the 'edit' phase, '@MPICXX_LIB' must be substituted before '@MPICXX' is substituted.
* change dict to list of tuples
Use a list of tuples to remember the order of `substitutions`.
* Update package.py
* Update package.py
This commit is contained in:
parent
da959ba220
commit
3a919c6abb
@ -54,7 +54,7 @@ class Pexsi(MakefilePackage):
|
||||
depends_on('parmetis')
|
||||
depends_on('superlu-dist@3.3:3.999', when='@:0.9.0')
|
||||
depends_on('superlu-dist@4.3:4.999', when='@0.9.2')
|
||||
depends_on('superlu-dist@5.1.2:', when='@0.10.2:')
|
||||
depends_on('superlu-dist@5.1.2:5.3.999', when='@0.10.2:')
|
||||
|
||||
variant(
|
||||
'fortran', default=False, description='Builds the Fortran interface'
|
||||
@ -64,27 +64,32 @@ class Pexsi(MakefilePackage):
|
||||
|
||||
def edit(self, spec, prefix):
|
||||
|
||||
substitutions = {
|
||||
'@MPICC': self.spec['mpi'].mpicc,
|
||||
'@MPICXX': self.spec['mpi'].mpicxx,
|
||||
'@MPIFC': self.spec['mpi'].mpifc,
|
||||
'@MPICXX_LIB': self.spec['mpi:cxx'].libs.joined(),
|
||||
'@RANLIB': 'ranlib',
|
||||
'@PEXSI_STAGE': self.stage.source_path,
|
||||
'@SUPERLU_PREFIX': self.spec['superlu-dist'].prefix,
|
||||
'@METIS_PREFIX': self.spec['metis'].prefix,
|
||||
'@PARMETIS_PREFIX': self.spec['parmetis'].prefix,
|
||||
'@LAPACK_PREFIX': self.spec['lapack'].prefix,
|
||||
'@BLAS_PREFIX': self.spec['blas'].prefix,
|
||||
'@LAPACK_LIBS': self.spec['lapack'].libs.joined(),
|
||||
'@BLAS_LIBS': self.spec['blas'].libs.joined(),
|
||||
substitutions = [
|
||||
('@MPICC', self.spec['mpi'].mpicc),
|
||||
('@MPICXX_LIB', self.spec['mpi:cxx'].libs.joined()),
|
||||
('@MPICXX', self.spec['mpi'].mpicxx),
|
||||
('@MPIFC', self.spec['mpi'].mpifc),
|
||||
('@RANLIB', 'ranlib'),
|
||||
('@PEXSI_STAGE', self.stage.source_path),
|
||||
('@SUPERLU_PREFIX', self.spec['superlu-dist'].prefix),
|
||||
('@METIS_PREFIX', self.spec['metis'].prefix),
|
||||
('@PARMETIS_PREFIX', self.spec['parmetis'].prefix),
|
||||
('@LAPACK_PREFIX', self.spec['lapack'].prefix),
|
||||
('@BLAS_PREFIX', self.spec['blas'].prefix),
|
||||
('@LAPACK_LIBS', self.spec['lapack'].libs.joined()),
|
||||
('@BLAS_LIBS', self.spec['blas'].libs.joined()),
|
||||
# FIXME : what to do with compiler provided libraries ?
|
||||
'@STDCXX_LIB': ' '.join(self.compiler.stdcxx_libs),
|
||||
'@FLDFLAGS': ''
|
||||
}
|
||||
('@STDCXX_LIB', ' '.join(self.compiler.stdcxx_libs))
|
||||
]
|
||||
|
||||
if '@0.9.2' in self.spec:
|
||||
substitutions['@FLDFLAGS'] = '-Wl,--allow-multiple-definition'
|
||||
substitutions.append(
|
||||
('@FLDFLAGS', '-Wl,--allow-multiple-definition')
|
||||
)
|
||||
else:
|
||||
substitutions.append(
|
||||
('@FLDFLAGS', '')
|
||||
)
|
||||
|
||||
template = join_path(
|
||||
os.path.dirname(inspect.getmodule(self).__file__),
|
||||
@ -95,7 +100,7 @@ def edit(self, spec, prefix):
|
||||
'make.inc'
|
||||
)
|
||||
shutil.copy(template, makefile)
|
||||
for key, value in substitutions.items():
|
||||
for key, value in substitutions:
|
||||
filter_file(key, value, makefile)
|
||||
|
||||
def build(self, spec, prefix):
|
||||
|
Loading…
Reference in New Issue
Block a user