<div dir="ltr"><div>PETSc redefines MPI functions as macros when logging is enabled. This breaks some C++ code; see e.g. <<a href="https://github.com/AMReX-Codes/amrex/pull/3005">https://github.com/AMReX-Codes/amrex/pull/3005</a>> for an example. The reason is that macros get confused about commas in template arguments.</div><div><br></div><div>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).</div><div><br></div><div>-erik</div><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><span style="color:rgb(34,34,34)">Erik Schnetter <</span><a href="mailto:eschnetter@perimeterinstitute.ca" target="_blank">eschnetter@perimeterinstitute.ca</a><span style="color:rgb(34,34,34)">></span><br><span style="color:rgb(34,34,34)"><a href="http://www.perimeterinstitute.ca/personal/eschnetter/" target="_blank">http://www.perimeterinstitute.ca/personal/eschnetter/</a></span><br></div></div></div>