From b2df39ea3a083486ae6b62d095213da009a0f9e9 Mon Sep 17 00:00:00 2001 From: Satish Balay Date: Thu, 30 Apr 2020 10:40:25 -0500 Subject: 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 --- var/spack/repos/builtin/packages/petsc/package.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'var') 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: -- cgit v1.2.3-70-g09d2