diff options
-rw-r--r-- | var/spack/repos/builtin/packages/petsc/package.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py index bced5ee090..ebb775db31 100644 --- a/var/spack/repos/builtin/packages/petsc/package.py +++ b/var/spack/repos/builtin/packages/petsc/package.py @@ -78,6 +78,8 @@ class Petsc(Package): variant('metis', default=True, description='Activates support for metis and parmetis') + variant('ptscotch', default=False, + description='Activates support for PTScotch (only parallel)') variant('hdf5', default=True, description='Activates support for HDF5 (only parallel)') variant('hypre', default=True, @@ -145,6 +147,7 @@ class Petsc(Package): conflicts('+moab', when='~mpi', msg=mpi_msg) conflicts('+mumps', when='~mpi', msg=mpi_msg) conflicts('+p4est', when='~mpi', msg=mpi_msg) + conflicts('+ptscotch', when='~mpi', msg=mpi_msg) conflicts('+superlu-dist', when='~mpi', msg=mpi_msg) conflicts('+trilinos', when='~mpi', msg=mpi_msg) @@ -191,6 +194,11 @@ class Petsc(Package): depends_on('metis@5:~int64', when='@3.8:+metis~int64') depends_on('metis@5:+int64', when='@3.8:+metis+int64') + # PTScotch: Currently disable Parmetis wrapper, this means + # nested disection won't be available thought PTScotch + depends_on('scotch+esmumps~metis+mpi', when='+ptscotch') + depends_on('scotch+int64', when='+ptscotch+int64') + depends_on('hdf5@:1.10.99+mpi', when='@:3.12.99+hdf5+mpi') depends_on('hdf5+mpi', when='@3.13:+hdf5+mpi') depends_on('hdf5+mpi', when='+exodusii+mpi') @@ -409,6 +417,17 @@ class Petsc(Package): else: options.append('--with-suitesparse=0') + # PTScotch: Since we are not using the Parmetis wrapper for now, + # we cannot use '--with-ptscotch-dir=...' + if '+ptscotch' in spec: + options.extend([ + '--with-ptscotch-include=%s' % spec['scotch'].prefix.include, + '--with-ptscotch-lib=%s' % spec['scotch'].libs.joined(), + '--with-ptscotch=1' + ]) + else: + options.append('--with-ptscotch=0') + # hdf5: configure detection is convoluted for pflotran if '+hdf5' in spec: options.extend([ |