summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorTakayuki Kobayashi <27466252+irisTa56@users.noreply.github.com>2018-08-03 01:24:57 +0900
committerAdam J. Stewart <ajstewart426@gmail.com>2018-08-02 11:24:57 -0500
commit3a919c6abb1eb4001421eb52d7e4467a919e4075 (patch)
tree96211204e751b8a7819b7ad81b890356d4e190d3 /var
parentda959ba220b67965c479838c5d80f4c6c92249e1 (diff)
downloadspack-3a919c6abb1eb4001421eb52d7e4467a919e4075.tar.gz
spack-3a919c6abb1eb4001421eb52d7e4467a919e4075.tar.bz2
spack-3a919c6abb1eb4001421eb52d7e4467a919e4075.tar.xz
spack-3a919c6abb1eb4001421eb52d7e4467a919e4075.zip
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](https://github.com/xiaoyeli/superlu_dist/commit/d7dce5a3488f80645023ab8431d82399e5546ebf). 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
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/pexsi/package.py45
1 files changed, 25 insertions, 20 deletions
diff --git a/var/spack/repos/builtin/packages/pexsi/package.py b/var/spack/repos/builtin/packages/pexsi/package.py
index f0882dba06..c730d34756 100644
--- a/var/spack/repos/builtin/packages/pexsi/package.py
+++ b/var/spack/repos/builtin/packages/pexsi/package.py
@@ -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 @@ class Pexsi(MakefilePackage):
'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):