It is always the last argument. This subroutine registers the user routine function for use as an MPI error handler. You can associate an error handler with a communicator. 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.
Notes The MPI standard specifies a varargs error handler prototype. The MPI standard allows this and urges an MPI implementation that does so to document the additional arguments. These additional arguments will be ignored by fully portable user error handlers. The interpretation of badval is context-dependent, so badval is not likely to be useful to a user error handler function that cannot identify this context.