-
Notifications
You must be signed in to change notification settings - Fork 0
2016 12 06
- TODO
- We will need to deprecate the old error handler functions
- Add text explaining how to (or not) mix old and new error handlers
- For wait/test, define requests that return an error as freed (unless the error is
MPI_ERR_PENDING
).- Alternative: MPI is responsible for transitioning the requests to free/inactive after the error handler.
- Scan through the other text to find uses of old error handlers
- If we give back a request object inside the error handler, we need to have a copy to avoid double frees
- We decided this was not actually necessary since we already provide the user an alias of the error handler and they are responsible for dealing with that.
- For inheritance, if you: 1) use the new semantic, you inherit your error handler from
MPI_XXX_NULL
or 2) you inherit as before and windows and files inherit from the communicator used to create them-
- is a problem because of global state. Need sessions to clear it up.
-
- Reusing
MPI_Errhandler
is hard because we want to preserve (and deprecate) the old definitions.- We could resolve this for implementations by expanding the existing struct to include the new definition as well.
- Allow MPI to aggregate calls to the error handler by the error code.
- Specify that the error handler function will return one communciator/window/file and zero or more requests.
- Actually, we can create a function to match requests with their objects. We already have to track that information for existing error handlers.
- This means we can return multiple communicators/windows/files per error handler.
It turns out that trying to figure out how to use this API is impossibly difficult. This is the proposed function signature.
int MPI_Errhandler_function(void *handles, int num_handles, int *handle_types, int errcode, void *context, ...);
This would mean that inside the error handler function, we would have to have tons of branches to deal with all the void *
s. There is also a problem with figuring out how to deal with this in Fortran.
We tried to decide what was the real point of this entire effort and decided that the most important thing was to get inheritance right so we would be ready for sessions. Results in the next section.
How else can we solve the inheritance problem?
- We need to cleanly define inheritance for sessions when it arrives.
- This also means defining a new error handler type for sessions.
- We need a way to get a default error handler for windows and files in a non-global way.
- This will also come from sessions.
When sessions comes along, we should allow attaching comm/window/file error handlers to the session to be the default error handler for any object created from the session.
In the meantime, we should clean up the existing error handler inheritance definitions in the way we wanted to for mpi-forum/mpi-issues#1.
- Deprecate
MPI_ERR_PENDING
.-
MPI_WAIT/TESTALL
should specify a "real" return code for each operation. -
MPI_WAIT/TESTSOME/ANY
have their own semantics and don't needMPI_ERR_PENDING
.
-