(composing this in an airport on Saturday; may not actually be sent until Monday or so)

-32766 is Open MPI's value for MPI_UNDEFINED. This is what is returned when there are no active requests in the array that is passed to MPI_TESTSOME (see MPI-1.1:.

Just to verify that this behavior isn't a bug, can you confirm some things:

- is count > 1?

- if more than one request finished in that single call to MPI_TESTSOME where completed was returned with a value of 1 (e.g., multiple requests in your array turned into MPI_REQUEST_NULL), then this is a bug -- i.e., completed should return an accurate value.



On Sep 16, 2005, at 8:45 PM, Greg Watson wrote:

Just for a change, I don't have a build problem!

However, I have a question about the MPI_Testsome() call. I'm using
MPI_Testsome() to check the completion status of a number of
outstanding ISend() requests. I'm doing something like this:

int outstanding;

main()
{
     tids = (int *)malloc(sizeof(int) * count);
     stats = (MPI_Status *)malloc(sizeof(MPI_Status) * count);
     reqs = (MPI_Request *) malloc(sizeof(MPI_Request) * count)

     do_sends();

     outstanding = count;

     while (outstanding > 0)
         check_completed();
}

do_sends()
{
     for (i = 0; i < count; i++)
         MPI_ISend(buf, len, MPI_CHAR, i, 0, MPI_COMM_WORLD, &reqs[i]);
}

check_completed()
{
     int completed;

     if (MPI_Testsome(count, reqs, &completed, tids, stats) !=
MPI_SUCCESS) {
         printf("error in testsome\n");
         exit(1);
     }
     outstanding -= completed;
}

The thing is, MPI_Testsome() returns with completed = 1 the first
time I call it, then completed = -32766 the second time I call it. It
always returns MPI_SUCCESS though.

Does anyone know what's going on? Am I doing something dumb?

Thanks,

Greg
_______________________________________________
devel mailing list
de...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/devel


--
{+} Jeff Squyres
{+} The Open MPI Project
{+} http://www.open-mpi.org/

Reply via email to