-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MPI_ERRORS_RETURN #13
Comments
MPL is nothing but a light-weight wrapper around MPI. This means, you can actually use the MPI function (MPL has currently no wrapper for error handling. Because |
|
@VictorEijkhout The MPI standard provides rather week guaranties when it comes to error handling. Therefore, I did not pay much attention on this topic when creating the MPL library on top of MPI. There is certainly room for improvements. I thought about how MPI's error handling concepts can be incorporated into a nice C++ library. I tried to wrap Currently, I plan to implement therefore the following:
|
Your plan re: error handling sound good to me. My only comment: there is a bunch of other stuff (attribute, name, parent, info) that is attached to a communicator. I'd still appreciate a routine that gives me direct access to the communicator. |
In principle, one could in include information about the communicator into the exception that is thrown when an error occurs, e.g., via a reference or a pointer to the respective communicator. This approach, however, becomes problematic if the communicator is created within a try-catch block and an error occurs for this communicator. Due to stack unwinding the communicator is destroyed before the exception is caught. This means, the programmer must place its try-catch-blocks with care with such an approach. Furthermore, the MPI standard states After an error is detected, the state of MPI is undefined. That is, using a user-defined error handler, or MPI_ERRORS_RETURN, does not necessarily allow the user to continue to use MPI after an error is detected. The purpose of these error handlers is to allow a user to issue user-defined error messages and to take actions unrelated to MPI (such as flushing I/O buffers) before a program exits. An MPI implementation is free to allow MPI to continue after an error but is not required to do so. This means there is no guarantee that one can actually access any of the data (attribute, name, parent, info) that is attached to a communicator after an error has occured. May be I have to think about this more carefully. |
Your last reply is solely in the context of error handling. There are many other attributes that can be attached to communicators (and files, windows, probably more) that have nothing to do with error handling and that I think ought to be supported. At some point. |
@VictorEijkhout: There is an |
There is I'm not sure that they are very urgent. For instance, I mostly use |
My program bombs with
Undoubtedly a programming error by me. But I can not query that status because the code has exited.
What is the MPL equivalent of
MPI_Comm_set_errhandler(comm,MPI_ERRORS_RETURN)
?The text was updated successfully, but these errors were encountered: