Newsgroups: comp.parallel.mpi
From: treumann@windsurf.kgn.ibm.com (Dick Treumann)
Subject: Re: Behavior of MPI_TEST
Organization: IBM Corporation, Poughkeepsie, NY
Date: 2 Dec 1996 23:41:31 GMT
Message-ID: <57vpfb$17pk@poknews.pok.ibm.com>

Victor,

There are two sorts of MPI Requests, persistent and non-persistent. 
When a persistent request handle has been used in an MPI_WAIT but not
yet used in another MPI_START, it is regarded as an inactive request
but the handle itself is still genuine.  When a non-persistent request
handle is returned from MPI_WAIT its value has been changed to 
MPI_REQUEST_NULL.  The MPI 1.1 statement "One is allowed to call
MPI_TEST with a null or inactive request argument. In such a case operation.
returns with flag=true and empty status." has this justification:

Assume you have MPI_Request my_req[4] and call MPI_Wait_any(4,my_req,&n,
&status).  This call completed request my_req[n].  If that request is
a persistent one, my_req[n] is unchanged but the request is now inactive.
If it is a non-persistent request, now my_req[n] == MPI_REQUEST_NULL.  In
either case it must be legitimate to repeat the MPI_Wait_any call reusing
the array my_req even though my_req[n] represents a completed request.

The fact that a persistent request which has NEVER been MPI_STARTed will
also return "flag=true and empty status" is part of keeping the semantic 
uniform but is not central to the intent.

-- 
Dick Treumann                               IBM RS/6000 Division
(Internet) treumann@kgn.ibm.com             Poughkeepsie, NY
(VNET)     TREUMANN at KGNVMC               Tel: (914) 433-7846
(internal) treumann@windsurf.kgn.ibm.com    Fax: (914) 433-8363

