Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

From: Brunner, Thomas A. (tabrunn_at_[hidden])
Date: 2006-03-31 14:56:10


I have an algorithm that collects information in a tree like manner using
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 zero.
Here is a code that can be run with only one processor that shows the same
behavior:

///////////////////////////////////////////

#include "mpi.h"
#include <stdio.h>

int main( int argc, char *argv[])
{
    int myid, numprocs;

    MPI_Init(&argc,&argv);
    MPI_Comm_size(MPI_COMM_WORLD,&numprocs);
    MPI_Comm_rank(MPI_COMM_WORLD,&myid);

    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);

    MPI_Finalize();

    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.

Thanks,
Tom