Assert that a particular condition is true
cond - The boolean condition
comm - The communicator on which the check can be collective on
ierr - A nonzero error code, see include/petscerror.h for the complete list
message - Error message in printf format
PetscCheck() for usage and behaviour.
This is needed instead of simply using
assert() because this correctly handles the collective nature of errors under MPI