From 9347754e82313c3c622bb4ebf8e1bfe467ce42c8 Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Fri, 8 Nov 2024 15:13:53 +0000 Subject: [PATCH] Ensure PETSc headers are included after `bout/petsclib.hxx` From that header: > PETSc "helpfully" defines macros for MPI functions that clobber the > real names, and short of `#undef`-ing all of them in every file > that includes any PETSc header, we can define the following macro > which should disable them, which I'm sure will work forever. This > means we _must_ `#include` this header _before_ any PETSc header! A recent commit reordered the PETSc headers in this file --- include/bout/petsc_interface.hxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/bout/petsc_interface.hxx b/include/bout/petsc_interface.hxx index 8f11f4bddf..1378419872 100644 --- a/include/bout/petsc_interface.hxx +++ b/include/bout/petsc_interface.hxx @@ -37,8 +37,6 @@ #include #include #include -#include -#include #include #include @@ -52,6 +50,9 @@ #include #include +#include +#include + /*! * A class which wraps PETSc vector objects, allowing them to be * indexed using the BOUT++ scheme. Note that boundaries are only