summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorSatish Balay <balay@mcs.anl.gov>2020-04-30 10:40:25 -0500
committerGitHub <noreply@github.com>2020-04-30 10:40:25 -0500
commitb2df39ea3a083486ae6b62d095213da009a0f9e9 (patch)
tree2073f8141d1956378c4aa5bad64b00b47e1773b6 /var
parent3a3f8717185868285ebc1e0226b0d7a320ef404c (diff)
downloadspack-b2df39ea3a083486ae6b62d095213da009a0f9e9.tar.gz
spack-b2df39ea3a083486ae6b62d095213da009a0f9e9.tar.bz2
spack-b2df39ea3a083486ae6b62d095213da009a0f9e9.tar.xz
spack-b2df39ea3a083486ae6b62d095213da009a0f9e9.zip
petsc: switch hdf5 spec from --with-hdf5-dir to --with-hdf5-lib (#16376)
This way - we can detect and use hdf5:hl,fortran - if enabled, but not require it as a dependency
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/petsc/package.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py
index df1b6e1780..a4c151b5e2 100644
--- a/var/spack/repos/builtin/packages/petsc/package.py
+++ b/var/spack/repos/builtin/packages/petsc/package.py
@@ -296,7 +296,7 @@ class Petsc(Package):
])
# Activates library support if needed
- for library in ('cuda', 'metis', 'hdf5', 'hypre', 'parmetis',
+ for library in ('cuda', 'metis', 'hypre', 'parmetis',
'mumps', 'trilinos', 'fftw', 'valgrind'):
options.append(
'--with-{library}={value}'.format(
@@ -339,6 +339,16 @@ class Petsc(Package):
else:
options.append('--with-suitesparse=0')
+ # hdf5: configure detection is convoluted for pflotran
+ if '+hdf5' in spec:
+ options.extend([
+ '--with-hdf5-include=%s' % spec['hdf5'].prefix.include,
+ '--with-hdf5-lib=%s' % spec['hdf5:hl,fortran'].libs.joined(),
+ '--with-hdf5=1'
+ ])
+ else:
+ options.append('--with-hdf5=0')
+
# zlib: configuring using '--with-zlib-dir=...' has some issues with
# SuiteSparse so specify directly the include path and the libraries.
if 'zlib' in spec: