On Apr 30 2010, Larry Baker wrote:
I don't know if there is any standard ordering of non-zero exit status codes. If so, another option would be to return the the largest (smallest) value, when that is the most serious exit status.
There isn't, and some systems have used exit codes in other ways (e.g. as a set of flag bits). That is actually the answer to the original question. MPI quite rightly does not specify this, because the matter is very system- dependent, and it is not possible to return the exit code (or display it) in all environments. Sorry, but that is reality. The last paragraph of the specification of MPI_Finalize makes it clear that it is the USER'S responsibility to return an exit code to the system for process 0, and that what happens for other ones is undefined. Or fairly clear - it could be stated in so many words, rather than being implicit in the requirement on implementors. Regards, Nick Maclaren.