summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Lacroix <remi.lacroix@idris.fr>2021-01-20 21:11:23 +0100
committerGitHub <noreply@github.com>2021-01-20 14:11:23 -0600
commit23181d24a2db34108d6f6c8f88695cb3ede1daab (patch)
treea664e4f46d8c3fd941dba3249486f093771df4b6
parent2d9e36c4f00c64a6ba061d881826666017cfcee5 (diff)
downloadspack-23181d24a2db34108d6f6c8f88695cb3ede1daab.tar.gz
spack-23181d24a2db34108d6f6c8f88695cb3ede1daab.tar.bz2
spack-23181d24a2db34108d6f6c8f88695cb3ede1daab.tar.xz
spack-23181d24a2db34108d6f6c8f88695cb3ede1daab.zip
PETSc: Add a new ptscotch variant. (#20699)
Currently the Parmetis wrapper is disabled which means nested dissection cannot be used with PTScotch.
-rw-r--r--var/spack/repos/builtin/packages/petsc/package.py19
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([