The MPID routines general make use of the error_code field to indicate errors. The MPICH implemenation will check these values and call the appropriate error handler. Note that the ADI routines are only required to set the values when there is an error, though they are allowed to set it to MPI_SUCCESS to indicate no error. This saves a potential store into a variable.