Skip to content

Commit

Permalink
Merge pull request #1203 from LLNL/atkins12/remove-petsc-warnings
Browse files Browse the repository at this point in the history
Remove excess perfomance warnings in PETSc solver wrappers
  • Loading branch information
tupek2 authored Aug 9, 2024
2 parents f84f013 + 606a4d6 commit 19476f2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/serac/numerics/petsc_solvers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ PetscErrorCode convertKSPPreSolve(KSP ksp, [[maybe_unused]] Vec rhs, [[maybe_unu
if (!solver->checked_for_convert_ || solver->needs_hypre_wrapping_) {
PetscBool is_hypre;
PetscCall(PetscObjectTypeCompare(reinterpret_cast<PetscObject>(A), MATHYPRE, &is_hypre));
SLIC_WARNING_ROOT_IF(
SLIC_DEBUG_ROOT_IF(
is_hypre && petsc_pc,
"convertKSPPreSolve(...) - MATHYPRE is not supported for most PETSc preconditioners, converting to MATAIJ.");
if (!is_hypre || petsc_pc) {
Expand Down Expand Up @@ -703,9 +703,7 @@ void PetscKSPSolver::SetOperator(const mfem::Operator& op)
SLIC_DEBUG_ROOT("PetscKSPSolver::SetOperator(...) - Wrapping existing HYPRE matrix");
pA = new mfem::PetscParMatrix(hA, wrap_ ? PETSC_MATSHELL : PETSC_MATHYPRE);
} else {
SLIC_WARNING_ROOT(
"PetscKSPSolver::SetOperator(...) - Converting operator, consider using PetscParMatrix to avoid "
"conversion costs");
SLIC_DEBUG_ROOT("PetscKSPSolver::SetOperator(...) - Converting operator from HYPRE to MATAIJ");
pA = new mfem::PetscParMatrix(hA, wrap_ ? PETSC_MATSHELL : PETSC_MATAIJ);
}
} else if (oA) {
Expand Down

0 comments on commit 19476f2

Please sign in to comment.