# Configuration for the petsc library:
#
-set(FEATURE_PETSC_AFTER MPI)
+set(FEATURE_PETSC_DEPENDS MPI)
macro(feature_petsc_find_external var)
# _NOT_ enabled.
# So we check for this:
#
- if( (PETSC_WITH_MPIUNI AND DEAL_II_WITH_MPI)
- OR
- (NOT PETSC_WITH_MPIUNI AND NOT DEAL_II_WITH_MPI))
+ if(PETSC_WITH_MPIUNI)
message(STATUS "Could not find a sufficient PETSc installation: "
- "PETSc has to be configured with the same MPI configuration as deal.II."
+ "PETSc has to be configured with MPI support."
)
set(PETSC_ADDITIONAL_ERROR_STRING
${PETSC_ADDITIONAL_ERROR_STRING}
"Could not find a sufficient PETSc installation:\n"
- "PETSc has to be configured with the same MPI configuration as deal.II, but found:\n"
- " DEAL_II_WITH_MPI = ${DEAL_II_WITH_MPI}\n"
+ "PETSc has to be configured with the MPI support, but found:\n"
" PETSC_WITH_MPI = (NOT ${PETSC_WITH_MPIUNI})\n"
)
set(${var} FALSE)
const ArrayView<const Number> &src,
const ArrayView<Number> & dst) const
{
-# ifdef DEAL_II_WITH_MPI
auto datatype = Utilities::MPI::mpi_type_id_for_type<Number>;
-# if DEAL_II_PETSC_VERSION_LT(3, 15, 0)
+# if DEAL_II_PETSC_VERSION_LT(3, 15, 0)
AssertPETSc(PetscSFBcastBegin(sf, datatype, src.data(), dst.data()));
-# else
+# else
AssertPETSc(
PetscSFBcastBegin(sf, datatype, src.data(), dst.data(), MPI_REPLACE));
-# endif
-
-# else
-
- (void)src;
- (void)dst;
- Assert(false,
- ExcMessage("This program is running without MPI. There should "
- "not be anything to import or export!"));
# endif
}
const ArrayView<const Number> &src,
const ArrayView<Number> & dst) const
{
-# ifdef DEAL_II_WITH_MPI
auto datatype = Utilities::MPI::mpi_type_id_for_type<Number>;
-# if DEAL_II_PETSC_VERSION_LT(3, 15, 0)
+# if DEAL_II_PETSC_VERSION_LT(3, 15, 0)
AssertPETSc(PetscSFBcastEnd(sf, datatype, src.data(), dst.data()));
-# else
+# else
AssertPETSc(
PetscSFBcastEnd(sf, datatype, src.data(), dst.data(), MPI_REPLACE));
-# endif
-
-# else
-
- (void)src;
- (void)dst;
- Assert(false,
- ExcMessage("This program is running without MPI. There should "
- "not be anything to import or export!"));
# endif
}
const ArrayView<const Number> &src,
const ArrayView<Number> & dst) const
{
-# ifdef DEAL_II_WITH_MPI
MPI_Op mpiop = (op == VectorOperation::insert) ? MPI_REPLACE : MPI_SUM;
auto datatype = Utilities::MPI::mpi_type_id_for_type<Number>;
AssertPETSc(
PetscSFReduceBegin(sf, datatype, src.data(), dst.data(), mpiop));
-
-# else
-
- (void)op;
- (void)src;
- (void)dst;
- Assert(false,
- ExcMessage("This program is running without MPI. There should "
- "not be anything to import or export!"));
-# endif
}
const ArrayView<const Number> &src,
const ArrayView<Number> & dst) const
{
-# ifdef DEAL_II_WITH_MPI
MPI_Op mpiop = (op == VectorOperation::insert) ? MPI_REPLACE : MPI_SUM;
auto datatype = Utilities::MPI::mpi_type_id_for_type<Number>;
AssertPETSc(PetscSFReduceEnd(sf, datatype, src.data(), dst.data(), mpiop));
-
-# else
-
- (void)op;
- (void)src;
- (void)dst;
- Assert(false,
- ExcMessage("This program is running without MPI. There should "
- "not be anything to import or export!"));
-# endif
}