Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: [OMPI users] Behaviour of MPI_Cancel when using 'large' messages
From: Gijsbert Wiesenekker (gijsbert.wiesenekker_at_[hidden])
Date: 2010-06-07 01:53:19

The following code tries to send a message, but if it takes too long the message is cancelled:

  #define DEADLOCK_ABORT (30.0)

  MPI_Isend(message, count, MPI_BYTE, comm_id,

  t0 = time(NULL);
  cancelled = FALSE;

    //do some work

    //test if message is delivered or cancelled
    MPI_Test(&request, &flag, &status);
    if (flag) break;
    //test if it takes too long
    t1 = time(NULL);
    wall = difftime(t1, t0);
    if (!cancelled and (wall > DEADLOCK_ABORT))
      cancelled = TRUE;

Now if I use a message size of about 5000 bytes and the message cannot be delivered after DEADLOCK_ABORT seconds the MPI_Cancel is executed, but still MPI_Test never returns TRUE, so it looks like the message cannot be cancelled for some reason.
I am using OpenMPI 1.4.2 on Fedora Core 13.
Any ideas?