MPI_Finalize and assertions?
The MPI spec dictates to call `MPI_Finalize` in each thread before exiting. How does that work with runtime errors like assertions?

If I `assert(cond)` and `cond` evaluates to false, I have no chance to call `MPI_Finalize` because the normal program flow is changed. Am I supposed to catch `SIGABRT`, `SIGSEGV` and god-knows-what-else myself or does the MPI library somehow handle this itself?
MPI_Finalize and assertions?
===

The MPI spec dictates to call `MPI_Finalize` in each thread before exiting. How does that work with runtime errors like assertions?

If I `assert(cond)` and `cond` evaluates to false, I have no chance to call `MPI_Finalize` because the normal program flow is changed. Am I supposed to catch `SIGABRT`, `SIGSEGV` and god-knows-what-else myself or does the MPI library somehow handle this itself?