[Mpi3-tools] matching pvar session and handles

Kathryn Mohror kathryn at llnl.gov
Tue Aug 20 17:22:55 CDT 2013


Hi Junchao,

> To get a pvar handle, we pass in a session in MPI_T_PVAR_HANDLE_ALLOC(session, pvar_index, obj_handle, handle, count).
> 
> It seems after allocation, a pvar handle should be bound to a session internally. 
> If so, why do we need the session argument in functions such as MPI_T_pvar_read(session, handle, buf)?  Is it there  to facilitate the implementation to make sure handle is from session? 

Off the top of my head, I can't remember what the rationale behind that design decision was. However, I imagine that passing in both arguments gives flexibility to the implementation in how it supports variables. For example, the handle might be an index into an array of variables valid for a particular session. In that case, the handle value wouldn't necessarily be unique across sessions. 

> If not, what happens if users pass in a mismatched "session, handle" pair?

In this case, you get back a return code indicating that the handle is bad. This clarification will go into the errata: https://svn.mpi-forum.org/trac/mpi-forum-web/ticket/386

Kathryn

> 
> Thanks
> 
> --Junchao Zhang
> _______________________________________________
> Mpi3-tools mailing list
> Mpi3-tools at lists.mpi-forum.org
> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi3-tools

______________________________________________________________
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/20130820/4db57eb8/attachment-0001.html>


More information about the mpiwg-tools mailing list