Menu

#7 Update/Rewrite of pyMPI_request.c

open
nobody
None
5
2004-11-24
2004-11-24
No

I have updated pyMPI_request.c so that the MPI_Request
objects are cleaner and nearly complete infunctionality.

For instance, the directory listing ( dir(
request_object ) ) is now up to date. request.test is
now a function call rather then an attribute that acts
as a function.

Other attributes like request.message and
request.status no longer block, the user must
explicitly call request.test() or request.wait()
depending on the behavior they want.

The intent of these changes is to make the MPI_Request
objects more pythonic and to minimize suprises when
using these objects in comparison with other
non-blocking I/O structures/models.

For instance, in the current MPI_Request
implementation, the command,

>>> print request.message

Will print if the message is received or cause the
interpreter to block until the message arrives. If
this were an interactive session, that message would
never arrive because we would not be given a chance to
type in mpi.send until this statement returns, which,
since it's waiting for us to send it a message, is never.

With the new changes request.message is None when the
message hasn't arrived, so no blocking takes place.
This puts more of a burden on the user to check/poll
for I/O, but I don't believe that's unreasonable, and
it's better then blocking in an accessor.

The only hitch so far appears when I try to call the
mpi.test, mpi.testall, mpi.testany, etc functions
defined in pyMPI_comm_asynchronous.c. They all rely on
an attribute request.test, rather then a function
request.test(), and so they currently fail with a error
about missing attributes.

Please let me know what you think about the attached
changes.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.