PETSc redefines MPI functions as macros when logging is enabled. This breaks some C++ code; see e.g. < https://github.com/AMReX-Codes/amrex/pull/3005> for an example. The reason is that macros get confused about commas in template arguments.
It would be convenient if PETSc used a different way to log MPI function calls, but I can't think of a good way. Alternatively, logging could be disabled by default, or MPI logging could be disabled by default, or there could be a simple way to opt out (e.g. use `#define PETSC_LOG_MPI` after `#include <petsc.h>` to enable it for a source file). -erik -- Erik Schnetter <eschnet...@perimeterinstitute.ca> http://www.perimeterinstitute.ca/personal/eschnetter/