Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: [OMPI users] mpi_sendrecv call example : case for a deadlock ?
From: shankha (shankhabanerjee_at_[hidden])
Date: 2011-11-11 17:44:10


Hi,
I have a example code using sendrecv. Could you please tell me if there is
a chance for a deadlock ?

       right =(myrank + 1) % size;
        left = myrank - 1;
        if (left < 0)
                left = size - 1;

        MPI_Sendrecv(&s, 1, MPI_CHAR, left, 1231, &r, 1, MPI_CHAR, right,
1231, MPI_COMM_WORLD, &status_1[0]);

Node A Node B Node C
                  send to A
                  recv from C

Each node is sending data to the node denoted by left and receiving data
from the node denoted by right. IS this is a case for deadlock.
Thanks for your help.

-- 
Thanks
Shankha Banerjee