Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

From: Greg Watson (gwatson_at_[hidden])
Date: 2005-09-16 19:45:24

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;

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


     outstanding = count;

     while (outstanding > 0)

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

     int completed;

     if (MPI_Testsome(count, reqs, &completed, tids, stats) !=
         printf("error in testsome\n");
     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?