From 272fbdccc0a0b35d5d2eb3aca5b75210a99fc9f3 Mon Sep 17 00:00:00 2001 From: David Wells Date: Tue, 26 Sep 2017 20:34:14 -0400 Subject: [PATCH] Add DEAL_II_WITH_PETSC_WITH_HYPRE. This does not change any functionality but does make it easier to disable (or enable) tests based on the availability of hypre within PETSc. --- cmake/configure/configure_3_petsc.cmake | 1 + cmake/modules/FindPETSC.cmake | 2 ++ include/deal.II/base/config.h.in | 1 + source/lac/petsc_precondition.cc | 14 +++++++------- ...40.with_petsc_with_hypre=true.mpirun=10.output} | 0 ....with_petsc_with_hypre=true.mpirun=10.output.2} | 0 ...-40.with_petsc_with_hypre=true.mpirun=3.output} | 0 ...0.with_petsc_with_hypre=true.mpirun=3.output.2} | 0 ...-40.with_petsc_with_hypre=true.mpirun=4.output} | 0 ...0.with_petsc_with_hypre=true.mpirun=4.output.2} | 0 ..._01.with_petsc_with_hypre=true.mpirun=3.output} | 0 ...1.with_petsc_with_hypre=true.mpirun=3.output.2} | 0 ..._01.with_petsc_with_hypre=true.mpirun=5.output} | 0 ...1.with_petsc_with_hypre=true.mpirun=5.output.2} | 0 ..._01.with_petsc_with_hypre=true.mpirun=7.output} | 0 ...1.with_petsc_with_hypre=true.mpirun=7.output.2} | 0 ...40.with_petsc_with_hypre=true.mpirun=10.output} | 0 ....with_petsc_with_hypre=true.mpirun=10.output.2} | 0 ...-40.with_petsc_with_hypre=true.mpirun=3.output} | 0 ...0.with_petsc_with_hypre=true.mpirun=3.output.2} | 0 ...-40.with_petsc_with_hypre=true.mpirun=4.output} | 0 ...0.with_petsc_with_hypre=true.mpirun=4.output.2} | 0 ...ith_mpi=true.with_petsc_with_hypre=true.output} | 0 ..._01.with_petsc_with_hypre=true.mpirun=3.output} | 0 ...ith_petsc_with_hypre=true.with_mpi=true.output} | 0 ...ith_mpi=true.with_petsc_with_hypre=true.output} | 0 ...ith_mpi=true.with_petsc_with_hypre=true.output} | 0 ...ith_petsc_with_hypre=true.with_mpi=true.output} | 0 ...ith_hypre=true.with_slepc=true.mpirun=3.output} | 0 ...ith_hypre=true.with_slepc=true.mpirun=3.output} | 0 ...ith_hypre=true.with_slepc=true.mpirun=3.output} | 0 31 files changed, 11 insertions(+), 7 deletions(-) rename tests/mpi/{hp_step-40.with_petsc=true.mpirun=10.output => hp_step-40.with_petsc_with_hypre=true.mpirun=10.output} (100%) rename tests/mpi/{hp_step-40.with_petsc=true.mpirun=10.output.2 => hp_step-40.with_petsc_with_hypre=true.mpirun=10.output.2} (100%) rename tests/mpi/{hp_step-40.with_petsc=true.mpirun=3.output => hp_step-40.with_petsc_with_hypre=true.mpirun=3.output} (100%) rename tests/mpi/{hp_step-40.with_petsc=true.mpirun=3.output.2 => hp_step-40.with_petsc_with_hypre=true.mpirun=3.output.2} (100%) rename tests/mpi/{hp_step-40.with_petsc=true.mpirun=4.output => hp_step-40.with_petsc_with_hypre=true.mpirun=4.output} (100%) rename tests/mpi/{hp_step-40.with_petsc=true.mpirun=4.output.2 => hp_step-40.with_petsc_with_hypre=true.mpirun=4.output.2} (100%) rename tests/mpi/{periodicity_01.with_petsc=true.mpirun=3.output => periodicity_01.with_petsc_with_hypre=true.mpirun=3.output} (100%) rename tests/mpi/{periodicity_01.with_petsc=true.mpirun=3.output.2 => periodicity_01.with_petsc_with_hypre=true.mpirun=3.output.2} (100%) rename tests/mpi/{periodicity_01.with_petsc=true.mpirun=5.output => periodicity_01.with_petsc_with_hypre=true.mpirun=5.output} (100%) rename tests/mpi/{periodicity_01.with_petsc=true.mpirun=5.output.2 => periodicity_01.with_petsc_with_hypre=true.mpirun=5.output.2} (100%) rename tests/mpi/{periodicity_01.with_petsc=true.mpirun=7.output => periodicity_01.with_petsc_with_hypre=true.mpirun=7.output} (100%) rename tests/mpi/{periodicity_01.with_petsc=true.mpirun=7.output.2 => periodicity_01.with_petsc_with_hypre=true.mpirun=7.output.2} (100%) rename tests/mpi/{step-40.with_petsc=true.mpirun=10.output => step-40.with_petsc_with_hypre=true.mpirun=10.output} (100%) rename tests/mpi/{step-40.with_petsc=true.mpirun=10.output.2 => step-40.with_petsc_with_hypre=true.mpirun=10.output.2} (100%) rename tests/mpi/{step-40.with_petsc=true.mpirun=3.output => step-40.with_petsc_with_hypre=true.mpirun=3.output} (100%) rename tests/mpi/{step-40.with_petsc=true.mpirun=3.output.2 => step-40.with_petsc_with_hypre=true.mpirun=3.output.2} (100%) rename tests/mpi/{step-40.with_petsc=true.mpirun=4.output => step-40.with_petsc_with_hypre=true.mpirun=4.output} (100%) rename tests/mpi/{step-40.with_petsc=true.mpirun=4.output.2 => step-40.with_petsc_with_hypre=true.mpirun=4.output.2} (100%) rename tests/petsc/{different_matrix_preconditioner.with_mpi=true.output => different_matrix_preconditioner.with_mpi=true.with_petsc_with_hypre=true.output} (100%) rename tests/petsc/{reinit_preconditioner_01.mpirun=3.output => reinit_preconditioner_01.with_petsc_with_hypre=true.mpirun=3.output} (100%) rename tests/petsc/{reinit_preconditioner_02.with_mpi=true.output => reinit_preconditioner_02.with_petsc_with_hypre=true.with_mpi=true.output} (100%) rename tests/petsc/{solver_03_precondition_boomeramg.with_mpi=true.output => solver_03_precondition_boomeramg.with_mpi=true.with_petsc_with_hypre=true.output} (100%) rename tests/petsc/{solver_03_precondition_boomeramg_symmetric.with_mpi=true.output => solver_03_precondition_boomeramg_symmetric.with_mpi=true.with_petsc_with_hypre=true.output} (100%) rename tests/petsc/{solver_03_precondition_parasails.with_64bit_indices=off.with_mpi=true.output => solver_03_precondition_parasails.with_64bit_indices=off.with_petsc_with_hypre=true.with_mpi=true.output} (100%) rename tests/slepc/{step-36_parallel.with_mpi=true.with_petsc=true.with_slepc=true.mpirun=3.output => step-36_parallel.with_mpi=true.with_petsc_with_hypre=true.with_slepc=true.mpirun=3.output} (100%) rename tests/slepc/{step-36_parallel_02.with_mpi=true.with_petsc=true.with_slepc=true.mpirun=3.output => step-36_parallel_02.with_mpi=true.with_petsc_with_hypre=true.with_slepc=true.mpirun=3.output} (100%) rename tests/slepc/{step-36_parallel_03.with_mpi=true.with_petsc=true.with_slepc=true.mpirun=3.output => step-36_parallel_03.with_mpi=true.with_petsc_with_hypre=true.with_slepc=true.mpirun=3.output} (100%) diff --git a/cmake/configure/configure_3_petsc.cmake b/cmake/configure/configure_3_petsc.cmake index 8260927eb5..81315831ea 100644 --- a/cmake/configure/configure_3_petsc.cmake +++ b/cmake/configure/configure_3_petsc.cmake @@ -136,4 +136,5 @@ ENDMACRO() CONFIGURE_FEATURE(PETSC) SET(DEAL_II_PETSC_WITH_COMPLEX ${PETSC_WITH_COMPLEX}) +SET(DEAL_II_PETSC_WITH_HYPRE ${PETSC_WITH_HYPRE}) SET(DEAL_II_PETSC_WITH_MUMPS ${PETSC_WITH_MUMPS}) diff --git a/cmake/modules/FindPETSC.cmake b/cmake/modules/FindPETSC.cmake index 690d82c3c3..90fb01a08d 100644 --- a/cmake/modules/FindPETSC.cmake +++ b/cmake/modules/FindPETSC.cmake @@ -28,6 +28,7 @@ # PETSC_VERSION_PATCH # PETSC_WITH_64BIT_INDICES # PETSC_WITH_COMPLEX +# PETSC_WITH_HYPRE # PETSC_WITH_MPIUNI # PETSC_WITH_MUMPS # @@ -67,6 +68,7 @@ ENDMACRO() IF(EXISTS ${PETSC_PETSCCONF_H}) _petsc_feature_check(64BIT_INDICES "#define.*PETSC_USE_64BIT_INDICES 1") _petsc_feature_check(COMPLEX "#define.*PETSC_USE_COMPLEX 1") + _petsc_feature_check(HYPRE "#define.*PETSC_HAVE_HYPRE 1") _petsc_feature_check(MPIUNI "#define.*PETSC_HAVE_MPIUNI 1") _petsc_feature_check(MUMPS "#define.*PETSC_HAVE_MUMPS 1") ENDIF() diff --git a/include/deal.II/base/config.h.in b/include/deal.II/base/config.h.in index 57612ab543..65f4239bd5 100644 --- a/include/deal.II/base/config.h.in +++ b/include/deal.II/base/config.h.in @@ -147,6 +147,7 @@ #cmakedefine DEAL_II_ARPACK_WITH_PARPACK /* cmake/modules/FindPETSC.cmake */ +#cmakedefine DEAL_II_PETSC_WITH_HYPRE #cmakedefine DEAL_II_PETSC_WITH_MUMPS /* cmake/configure/configure_1_threads.cmake */ diff --git a/source/lac/petsc_precondition.cc b/source/lac/petsc_precondition.cc index e14cc07c0f..b9f9ee83d5 100644 --- a/source/lac/petsc_precondition.cc +++ b/source/lac/petsc_precondition.cc @@ -455,9 +455,9 @@ namespace PETScWrappers PetscErrorCode ierr = PCCreate(comm, &pc); AssertThrow (ierr == 0, ExcPETScError(ierr)); -#ifdef PETSC_HAVE_HYPRE +#ifdef DEAL_II_PETSC_WITH_HYPRE initialize(); -#else // PETSC_HAVE_HYPRE +#else // DEAL_II_PETSC_WITH_HYPRE (void)pc; Assert (false, ExcMessage ("Your PETSc installation does not include a copy of " @@ -475,7 +475,7 @@ namespace PETScWrappers void PreconditionBoomerAMG::initialize () { -#ifdef PETSC_HAVE_HYPRE +#ifdef DEAL_II_PETSC_WITH_HYPRE PetscErrorCode ierr = PCSetType (pc, const_cast(PCHYPRE)); AssertThrow (ierr == 0, ExcPETScError(ierr)); @@ -524,7 +524,7 @@ namespace PETScWrappers PreconditionBoomerAMG::initialize (const MatrixBase &matrix_, const AdditionalData &additional_data_) { -#ifdef PETSC_HAVE_HYPRE +#ifdef DEAL_II_PETSC_WITH_HYPRE clear (); matrix = static_cast(matrix_); @@ -536,7 +536,7 @@ namespace PETScWrappers PetscErrorCode ierr = PCSetUp (pc); AssertThrow (ierr == 0, ExcPETScError(ierr)); -#else // PETSC_HAVE_HYPRE +#else // DEAL_II_PETSC_WITH_HYPRE (void)matrix_; (void)additional_data_; Assert (false, @@ -580,7 +580,7 @@ namespace PETScWrappers matrix = static_cast(matrix_); additional_data = additional_data_; -#ifdef PETSC_HAVE_HYPRE +#ifdef DEAL_II_PETSC_WITH_HYPRE create_pc(); PetscErrorCode ierr = PCSetType (pc, const_cast(PCHYPRE)); @@ -645,7 +645,7 @@ namespace PETScWrappers ierr = PCSetUp (pc); AssertThrow (ierr == 0, ExcPETScError(ierr)); -#else // PETSC_HAVE_HYPRE +#else // DEAL_II_PETSC_WITH_HYPRE (void)pc; Assert (false, ExcMessage ("Your PETSc installation does not include a copy of " diff --git a/tests/mpi/hp_step-40.with_petsc=true.mpirun=10.output b/tests/mpi/hp_step-40.with_petsc_with_hypre=true.mpirun=10.output similarity index 100% rename from tests/mpi/hp_step-40.with_petsc=true.mpirun=10.output rename to tests/mpi/hp_step-40.with_petsc_with_hypre=true.mpirun=10.output diff --git a/tests/mpi/hp_step-40.with_petsc=true.mpirun=10.output.2 b/tests/mpi/hp_step-40.with_petsc_with_hypre=true.mpirun=10.output.2 similarity index 100% rename from tests/mpi/hp_step-40.with_petsc=true.mpirun=10.output.2 rename to tests/mpi/hp_step-40.with_petsc_with_hypre=true.mpirun=10.output.2 diff --git a/tests/mpi/hp_step-40.with_petsc=true.mpirun=3.output b/tests/mpi/hp_step-40.with_petsc_with_hypre=true.mpirun=3.output similarity index 100% rename from tests/mpi/hp_step-40.with_petsc=true.mpirun=3.output rename to tests/mpi/hp_step-40.with_petsc_with_hypre=true.mpirun=3.output diff --git a/tests/mpi/hp_step-40.with_petsc=true.mpirun=3.output.2 b/tests/mpi/hp_step-40.with_petsc_with_hypre=true.mpirun=3.output.2 similarity index 100% rename from tests/mpi/hp_step-40.with_petsc=true.mpirun=3.output.2 rename to tests/mpi/hp_step-40.with_petsc_with_hypre=true.mpirun=3.output.2 diff --git a/tests/mpi/hp_step-40.with_petsc=true.mpirun=4.output b/tests/mpi/hp_step-40.with_petsc_with_hypre=true.mpirun=4.output similarity index 100% rename from tests/mpi/hp_step-40.with_petsc=true.mpirun=4.output rename to tests/mpi/hp_step-40.with_petsc_with_hypre=true.mpirun=4.output diff --git a/tests/mpi/hp_step-40.with_petsc=true.mpirun=4.output.2 b/tests/mpi/hp_step-40.with_petsc_with_hypre=true.mpirun=4.output.2 similarity index 100% rename from tests/mpi/hp_step-40.with_petsc=true.mpirun=4.output.2 rename to tests/mpi/hp_step-40.with_petsc_with_hypre=true.mpirun=4.output.2 diff --git a/tests/mpi/periodicity_01.with_petsc=true.mpirun=3.output b/tests/mpi/periodicity_01.with_petsc_with_hypre=true.mpirun=3.output similarity index 100% rename from tests/mpi/periodicity_01.with_petsc=true.mpirun=3.output rename to tests/mpi/periodicity_01.with_petsc_with_hypre=true.mpirun=3.output diff --git a/tests/mpi/periodicity_01.with_petsc=true.mpirun=3.output.2 b/tests/mpi/periodicity_01.with_petsc_with_hypre=true.mpirun=3.output.2 similarity index 100% rename from tests/mpi/periodicity_01.with_petsc=true.mpirun=3.output.2 rename to tests/mpi/periodicity_01.with_petsc_with_hypre=true.mpirun=3.output.2 diff --git a/tests/mpi/periodicity_01.with_petsc=true.mpirun=5.output b/tests/mpi/periodicity_01.with_petsc_with_hypre=true.mpirun=5.output similarity index 100% rename from tests/mpi/periodicity_01.with_petsc=true.mpirun=5.output rename to tests/mpi/periodicity_01.with_petsc_with_hypre=true.mpirun=5.output diff --git a/tests/mpi/periodicity_01.with_petsc=true.mpirun=5.output.2 b/tests/mpi/periodicity_01.with_petsc_with_hypre=true.mpirun=5.output.2 similarity index 100% rename from tests/mpi/periodicity_01.with_petsc=true.mpirun=5.output.2 rename to tests/mpi/periodicity_01.with_petsc_with_hypre=true.mpirun=5.output.2 diff --git a/tests/mpi/periodicity_01.with_petsc=true.mpirun=7.output b/tests/mpi/periodicity_01.with_petsc_with_hypre=true.mpirun=7.output similarity index 100% rename from tests/mpi/periodicity_01.with_petsc=true.mpirun=7.output rename to tests/mpi/periodicity_01.with_petsc_with_hypre=true.mpirun=7.output diff --git a/tests/mpi/periodicity_01.with_petsc=true.mpirun=7.output.2 b/tests/mpi/periodicity_01.with_petsc_with_hypre=true.mpirun=7.output.2 similarity index 100% rename from tests/mpi/periodicity_01.with_petsc=true.mpirun=7.output.2 rename to tests/mpi/periodicity_01.with_petsc_with_hypre=true.mpirun=7.output.2 diff --git a/tests/mpi/step-40.with_petsc=true.mpirun=10.output b/tests/mpi/step-40.with_petsc_with_hypre=true.mpirun=10.output similarity index 100% rename from tests/mpi/step-40.with_petsc=true.mpirun=10.output rename to tests/mpi/step-40.with_petsc_with_hypre=true.mpirun=10.output diff --git a/tests/mpi/step-40.with_petsc=true.mpirun=10.output.2 b/tests/mpi/step-40.with_petsc_with_hypre=true.mpirun=10.output.2 similarity index 100% rename from tests/mpi/step-40.with_petsc=true.mpirun=10.output.2 rename to tests/mpi/step-40.with_petsc_with_hypre=true.mpirun=10.output.2 diff --git a/tests/mpi/step-40.with_petsc=true.mpirun=3.output b/tests/mpi/step-40.with_petsc_with_hypre=true.mpirun=3.output similarity index 100% rename from tests/mpi/step-40.with_petsc=true.mpirun=3.output rename to tests/mpi/step-40.with_petsc_with_hypre=true.mpirun=3.output diff --git a/tests/mpi/step-40.with_petsc=true.mpirun=3.output.2 b/tests/mpi/step-40.with_petsc_with_hypre=true.mpirun=3.output.2 similarity index 100% rename from tests/mpi/step-40.with_petsc=true.mpirun=3.output.2 rename to tests/mpi/step-40.with_petsc_with_hypre=true.mpirun=3.output.2 diff --git a/tests/mpi/step-40.with_petsc=true.mpirun=4.output b/tests/mpi/step-40.with_petsc_with_hypre=true.mpirun=4.output similarity index 100% rename from tests/mpi/step-40.with_petsc=true.mpirun=4.output rename to tests/mpi/step-40.with_petsc_with_hypre=true.mpirun=4.output diff --git a/tests/mpi/step-40.with_petsc=true.mpirun=4.output.2 b/tests/mpi/step-40.with_petsc_with_hypre=true.mpirun=4.output.2 similarity index 100% rename from tests/mpi/step-40.with_petsc=true.mpirun=4.output.2 rename to tests/mpi/step-40.with_petsc_with_hypre=true.mpirun=4.output.2 diff --git a/tests/petsc/different_matrix_preconditioner.with_mpi=true.output b/tests/petsc/different_matrix_preconditioner.with_mpi=true.with_petsc_with_hypre=true.output similarity index 100% rename from tests/petsc/different_matrix_preconditioner.with_mpi=true.output rename to tests/petsc/different_matrix_preconditioner.with_mpi=true.with_petsc_with_hypre=true.output diff --git a/tests/petsc/reinit_preconditioner_01.mpirun=3.output b/tests/petsc/reinit_preconditioner_01.with_petsc_with_hypre=true.mpirun=3.output similarity index 100% rename from tests/petsc/reinit_preconditioner_01.mpirun=3.output rename to tests/petsc/reinit_preconditioner_01.with_petsc_with_hypre=true.mpirun=3.output diff --git a/tests/petsc/reinit_preconditioner_02.with_mpi=true.output b/tests/petsc/reinit_preconditioner_02.with_petsc_with_hypre=true.with_mpi=true.output similarity index 100% rename from tests/petsc/reinit_preconditioner_02.with_mpi=true.output rename to tests/petsc/reinit_preconditioner_02.with_petsc_with_hypre=true.with_mpi=true.output diff --git a/tests/petsc/solver_03_precondition_boomeramg.with_mpi=true.output b/tests/petsc/solver_03_precondition_boomeramg.with_mpi=true.with_petsc_with_hypre=true.output similarity index 100% rename from tests/petsc/solver_03_precondition_boomeramg.with_mpi=true.output rename to tests/petsc/solver_03_precondition_boomeramg.with_mpi=true.with_petsc_with_hypre=true.output diff --git a/tests/petsc/solver_03_precondition_boomeramg_symmetric.with_mpi=true.output b/tests/petsc/solver_03_precondition_boomeramg_symmetric.with_mpi=true.with_petsc_with_hypre=true.output similarity index 100% rename from tests/petsc/solver_03_precondition_boomeramg_symmetric.with_mpi=true.output rename to tests/petsc/solver_03_precondition_boomeramg_symmetric.with_mpi=true.with_petsc_with_hypre=true.output diff --git a/tests/petsc/solver_03_precondition_parasails.with_64bit_indices=off.with_mpi=true.output b/tests/petsc/solver_03_precondition_parasails.with_64bit_indices=off.with_petsc_with_hypre=true.with_mpi=true.output similarity index 100% rename from tests/petsc/solver_03_precondition_parasails.with_64bit_indices=off.with_mpi=true.output rename to tests/petsc/solver_03_precondition_parasails.with_64bit_indices=off.with_petsc_with_hypre=true.with_mpi=true.output diff --git a/tests/slepc/step-36_parallel.with_mpi=true.with_petsc=true.with_slepc=true.mpirun=3.output b/tests/slepc/step-36_parallel.with_mpi=true.with_petsc_with_hypre=true.with_slepc=true.mpirun=3.output similarity index 100% rename from tests/slepc/step-36_parallel.with_mpi=true.with_petsc=true.with_slepc=true.mpirun=3.output rename to tests/slepc/step-36_parallel.with_mpi=true.with_petsc_with_hypre=true.with_slepc=true.mpirun=3.output diff --git a/tests/slepc/step-36_parallel_02.with_mpi=true.with_petsc=true.with_slepc=true.mpirun=3.output b/tests/slepc/step-36_parallel_02.with_mpi=true.with_petsc_with_hypre=true.with_slepc=true.mpirun=3.output similarity index 100% rename from tests/slepc/step-36_parallel_02.with_mpi=true.with_petsc=true.with_slepc=true.mpirun=3.output rename to tests/slepc/step-36_parallel_02.with_mpi=true.with_petsc_with_hypre=true.with_slepc=true.mpirun=3.output diff --git a/tests/slepc/step-36_parallel_03.with_mpi=true.with_petsc=true.with_slepc=true.mpirun=3.output b/tests/slepc/step-36_parallel_03.with_mpi=true.with_petsc_with_hypre=true.with_slepc=true.mpirun=3.output similarity index 100% rename from tests/slepc/step-36_parallel_03.with_mpi=true.with_petsc=true.with_slepc=true.mpirun=3.output rename to tests/slepc/step-36_parallel_03.with_mpi=true.with_petsc_with_hypre=true.with_slepc=true.mpirun=3.output -- 2.39.5