diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py index c6aa7af2a5..c99a578fc8 100644 --- a/var/spack/repos/builtin/packages/petsc/package.py +++ b/var/spack/repos/builtin/packages/petsc/package.py @@ -113,10 +113,13 @@ class Petsc(Package): # Other dependencies depends_on('boost', when='@:3.5+boost') - depends_on('metis@5:~int64+real64', when='+metis~int64+double') - depends_on('metis@5:+int64', when='+metis+int64~double') - depends_on('metis@5:~int64+real64', when='+metis~int64+double') - depends_on('metis@5:+int64', when='+metis+int64~double') + depends_on('metis@5:~int64+real64', when='@:3.7.99+metis~int64+double') + depends_on('metis@5:~int64', when='@:3.7.99+metis~int64~double') + depends_on('metis@5:+int64+real64', when='@:3.7.99+metis+int64+double') + depends_on('metis@5:+int64', when='@:3.7.99+metis+int64~double') + # petsc-3.8+ uses default (float) metis with any (petsc) precision + depends_on('metis@5:~int64', when='@3.8:+metis~int64') + depends_on('metis@5:+int64', when='@3.8:+metis+int64') depends_on('hdf5+mpi+hl', when='+hdf5+mpi') depends_on('zlib', when='+hdf5')