]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Disable the PETSc reference counting check for 3.20 and newer. 16310/head
authorDavid Wells <drwells@email.unc.edu>
Wed, 29 Nov 2023 21:40:16 +0000 (16:40 -0500)
committerDavid Wells <drwells@email.unc.edu>
Wed, 29 Nov 2023 21:42:09 +0000 (16:42 -0500)
The 3.20 release completely rewrote the way logging works in PETSc and this old
approach now crashes. I know more-or-less how to fix it (there's a relevant
PETSc example) but I don't have time to do it this week - for now lets just
disable this extra check with the latest PETSc version.

tests/tests.h

index 0fa6bf2eea12fb11164ae7a1e42f059ff808ef91..82472a8e5713f58eff92fa4ed8d162664c42221e 100644 (file)
@@ -461,6 +461,11 @@ namespace
   void
   check_petsc_allocations()
   {
+#  if DEAL_II_PETSC_VERSION_GTE(3, 20, 0)
+    // TODO: the logging code below no longer works with PETSc 3.20 and newer. A
+    // new implementation should use the approach in sys/tutorials/ex7.c to log
+    // object creations and destructions globally.
+#  else
     PetscStageLog  stageLog;
     PetscErrorCode ierr;
 
@@ -494,6 +499,7 @@ namespace
 
     if (errors)
       throw dealii::ExcMessage("PETSc memory leak");
+#  endif
   }
 } // namespace
 #endif

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.