Sorry for the delay, and sorry again because in last mail i had the wrong taste that it was some kind of homework problem.

At 17:41 04/05/2012, you wrote:
> The logic of send/recv looks ok. Now, in 5 and 7, recvSize(p2) and
> recvSize(p1) function what value returns?
All the sendSizes and RecvSizes are constant between iterations and are
calculated as a setup before all the calculations start.

<snip>

Do you know what could cause the program to hang with the default value
(310) and to work fine with 305? I also tested it with 311 but it hanged
so it seems that it is not enough to activate the SEND flag.

On your code, the only point where it could fail is if one of the precalculated message size values is wrongly calculated and executes the Recieve where it shouldn't.

From previous mails i understand that no if(ok!=MPI... line fires and there's no Sender waiting. The Ssend ends when the Recv starts to receive, not when the Recv ends the receive, so the sender may get an Ok but if there's an error Recv keeps the block. As you are using blocking communications, you can't do anything to prevent this, for example, check the Recv status while receiving.

Try to use Send instead Ssend (it should work but it could hang too) or change design to a non-blocking approach.

HTH


Reply via email to