[Mpi3-tools] Bad handle return error code
Kathryn Mohror
kathryn at llnl.gov
Thu Jul 25 16:03:29 CDT 2013
Hi everybody,
I got asked a question from Nathan:
What should (MPI_T_pvar_read, _write, _reset, etc) return if bad handle is given?
He gave this example of erroneous code:
{
MPI_T_pvar_session session1, session2;
MPI_T_pvar_handle handle;
char buffer[256];
int count;
MPI_T_pvar_session_create (&session1);
MPI_T_pvar_session_create (&session2);
MPI_T_pvar_handle_alloc (session1, 0, NULL, &handle, &count);
MPI_T_pvar_start (session1, handle);
/* erroneus statement. should return MPI_T_ERR_INVALID_SESSION or MPI_T_ERR_INVALID_HANDLE */
MPI_T_pvar_read (session2, handle, buffer);
}
I argue it should return MPI_T_ERR_INVALID_HANDLE since the session is good, it's just that the handle doesn’t match.
Do you all agree? If so, we should specify it since it's ambiguous. I believe this is an errata item.
Kathryn
______________________________________________________________
Kathryn Mohror, kathryn at llnl.gov, http://people.llnl.gov/mohror1
CASC @ Lawrence Livermore National Laboratory, Livermore, CA, USA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpi-forum.org/pipermail/mpiwg-tools/attachments/20130725/d98afe17/attachment.html>
More information about the mpiwg-tools
mailing list