This would have saved us some trouble recently with a user who compiled SAMRAI with one MPI version and IBAMR with another - this is the only dependency with which we cannot detect multiple MPI versions since SAMRAI is statically linked. We can get 99% of the way there, however, by duplicated PETSc's "check that we have the right MPI version and MPI implementation" logic in the header.
This would have saved us some trouble recently with a user who compiled SAMRAI with one MPI version and IBAMR with another - this is the only dependency with which we cannot detect multiple MPI versions since SAMRAI is statically linked. We can get 99% of the way there, however, by duplicated PETSc's "check that we have the right MPI version and MPI implementation" logic in the header.