When we're checking the arguments, we check for the request array to
not be NULL without looking to the number of requests. I think it
make sense, as I don't see why the user would call these functions
with 0 requests ... But, the other way around make sense too. As I
don't find anything in the MPI standard that stop the user doing that
I add the additional check to all MPI_Wait* and MPI_Test* functions.
Please get the version from trunk after revision 9504.
On Mar 31, 2006, at 2:56 PM, Brunner, Thomas A. wrote:
> I have an algorithm that collects information in a tree like manner
> nonblocking communication. Some nodes do not receive information
> from other
> nodes, so there are no outstanding requests on those nodes. On all
> processors, I check for the incoming messages using MPI_Testsome().
> MPI_Testsome fails with OpenMPI, however if the request length is
> Here is a code that can be run with only one processor that shows
> the same
> #include "mpi.h"
> #include <stdio.h>
> int main( int argc, char *argv)
> int myid, numprocs;
> printf("Hello from processor %i of %i\n", myid, numprocs);
> int size = 0;
> int num_done = 0;
> MPI_Status* stat = 0;
> MPI_Request* req = 0;
> int* done_indices = 0;
> MPI_Testsome( size, req, &num_done, done_indices, stat);
> printf("Finalizing on processor %i of %i\n", myid, numprocs);
> return 0;
> The output using OpenMPI is:
> Hello from processor 0 of 1
> [mymachine:09115] *** An error occurred in MPI_Testsome
> [mymachine:09115] *** on communicator MPI_COMM_WORLD
> [mymachine:09115] *** MPI_ERR_REQUEST: invalid request
> [mymachine:09115] *** MPI_ERRORS_ARE_FATAL (goodbye)
> 1 process killed (possibly by Open MPI)
> Many other MPI implementations support this, and reading the
> standard, it
> seems like it should be OK.
> users mailing list