This routine associates error handler errhandler with communicator comm . The association is local. MPI will use the specified error handling routine for any exception that takes place during a call on this communicator. Different tasks can attach different error handlers to the same communicator. An error handler that does not end in the MPI job being terminated, creates undefined risks.
Some errors are harmless, while others are catastrophic.
For example, an error detected by one member of a collective operation can result in other members waiting indefinitely for an operation which will never occur. It is also important to note that the MPI standard does not specify the state the MPI library should be in after an error occurs. MPI does not provide a way for users to determine how much, if any, damage has been done to the MPI state by a particular error. These are pre-defined handlers that cause the error code to be returned and MPI to continue to run. If they do not abort, they too will cause MPI to deliver an error return code to the caller and continue to run.