petsc: add 64bit variant (#2655)
* petsc: add 64bit variant * hypre: add int64 variant * superlu-dist: add int64 variant * petsc: add int64 variant * metis: rename idx64 to int64 to make it consistent with other packages * mumps: rename idx64 to int64 to make it consistent with other packages * dealii: rename 64bit to int64 to make it consistent with other packages
This commit is contained in:

committed by
Todd Gamblin

parent
e2697e4a37
commit
8365dbd959
@@ -67,14 +67,19 @@ class Petsc(Package):
|
||||
variant('hypre', default=True,
|
||||
description='Activates support for Hypre (only parallel)')
|
||||
variant('mumps', default=True,
|
||||
description='Activates support for MUMPS (only parallel)')
|
||||
description='Activates support for MUMPS (only parallel'
|
||||
' and 32bit indices)')
|
||||
variant('superlu-dist', default=True,
|
||||
description='Activates support for SuperluDist (only parallel)')
|
||||
variant('int64', default=False,
|
||||
description='Compile with 64bit indices')
|
||||
|
||||
# Virtual dependencies
|
||||
# Git repository needs sowing to build Fortran interface
|
||||
depends_on('sowing', when='@develop')
|
||||
|
||||
# PETSc, hypre, superlu_dist when built with int64 use 32 bit integers
|
||||
# with BLAS/LAPACK
|
||||
depends_on('blas')
|
||||
depends_on('lapack')
|
||||
depends_on('mpi', when='+mpi')
|
||||
@@ -84,7 +89,8 @@ class Petsc(Package):
|
||||
|
||||
# Other dependencies
|
||||
depends_on('boost', when='@:3.5+boost')
|
||||
depends_on('metis@5:', when='+metis')
|
||||
depends_on('metis@5:~int64', when='+metis~int64')
|
||||
depends_on('metis@5:+int64', when='+metis+int64')
|
||||
|
||||
depends_on('hdf5+mpi', when='+hdf5+mpi')
|
||||
depends_on('parmetis', when='+metis+mpi')
|
||||
@@ -92,12 +98,16 @@ class Petsc(Package):
|
||||
# Also PETSc prefer to build it without internal superlu, likely due to
|
||||
# conflict in headers see
|
||||
# https://bitbucket.org/petsc/petsc/src/90564b43f6b05485163c147b464b5d6d28cde3ef/config/BuildSystem/config/packages/hypre.py
|
||||
depends_on('hypre~internal-superlu', when='+hypre+mpi~complex')
|
||||
depends_on('superlu-dist@:4.3', when='@3.4.4:3.6.4+superlu-dist+mpi')
|
||||
depends_on('superlu-dist@5.0.0:', when='@3.7:+superlu-dist+mpi')
|
||||
depends_on('superlu-dist@5.0.0:', when='@for-pflotran-0.1.0+superlu-dist+mpi')
|
||||
depends_on('mumps+mpi', when='+mumps+mpi')
|
||||
depends_on('scalapack', when='+mumps+mpi')
|
||||
depends_on('hypre~internal-superlu~int64', when='+hypre+mpi~complex~int64')
|
||||
depends_on('hypre~internal-superlu+int64', when='+hypre+mpi~complex+int64')
|
||||
depends_on('superlu-dist@:4.3~int64', when='@3.4.4:3.6.4+superlu-dist+mpi~int64')
|
||||
depends_on('superlu-dist@:4.3+int64', when='@3.4.4:3.6.4+superlu-dist+mpi+int64')
|
||||
depends_on('superlu-dist@5.0.0:~int64', when='@3.7:+superlu-dist+mpi~int64')
|
||||
depends_on('superlu-dist@5.0.0:+int64', when='@3.7:+superlu-dist+mpi+int64')
|
||||
depends_on('superlu-dist@5.0.0:~int64', when='@for-pflotran-0.1.0+superlu-dist+mpi~int64')
|
||||
depends_on('superlu-dist@5.0.0:+int64', when='@for-pflotran-0.1.0+superlu-dist+mpi+int64')
|
||||
depends_on('mumps+mpi', when='+mumps+mpi~int64')
|
||||
depends_on('scalapack', when='+mumps+mpi~int64')
|
||||
|
||||
def mpi_dependent_options(self):
|
||||
if '~mpi' in self.spec:
|
||||
@@ -146,7 +156,8 @@ def install(self, spec, prefix):
|
||||
'--with-scalar-type=%s' % (
|
||||
'complex' if '+complex' in spec else 'real'),
|
||||
'--with-shared-libraries=%s' % ('1' if '+shared' in spec else '0'),
|
||||
'--with-debugging=%s' % ('1' if '+debug' in spec else '0')
|
||||
'--with-debugging=%s' % ('1' if '+debug' in spec else '0'),
|
||||
'--with-64-bit-indices=%s' % ('1' if '+int64' in spec else '0')
|
||||
])
|
||||
# Make sure we use exactly the same Blas/Lapack libraries
|
||||
# across the DAG. To that end list them explicitly
|
||||
|
Reference in New Issue
Block a user