Re: [OMPI users] Receiving an unknown number of messages

2009-07-24 Thread Shaun Jackman
Eugene Loh wrote: Shaun Jackman wrote: 2 calls MPI_Test. No message is waiting, so 2 decides to send. 2 sends to 0 and does not block (0 has one MPI_Irecv posted) 3 calls MPI_Test. No message is waiting, so 3 decides to send. 3 sends to 1 and does not block (1 has one MPI_Irecv posted) 0 calls

Re: [OMPI users] Receiving an unknown number of messages

2009-07-24 Thread Shaun Jackman
Hi Prasadcse, At each iteration, each process chooses one other process to send to (based on the line it has just read from a file). If we send the number of packets to expect in advance, we then need to send an `expect zero packets from me' message to all the processes that we don't have a m

Re: [OMPI users] Receiving an unknown number of messages

2009-07-24 Thread Eugene Loh
Shaun Jackman wrote: 2 calls MPI_Test. No message is waiting, so 2 decides to send. 2 sends to 0 and does not block (0 has one MPI_Irecv posted) 3 calls MPI_Test. No message is waiting, so 3 decides to send. 3 sends to 1 and does not block (1 has one MPI_Irecv posted) 0 calls MPI_Test. No messag

Re: [OMPI users] Receiving an unknown number of messages

2009-07-24 Thread Shaun Jackman
Eugene Loh wrote: Shaun Jackman wrote: Eugene Loh wrote: Shaun Jackman wrote: For my MPI application, each process reads a file and for each line sends a message (MPI_Send) to one of the other processes determined by the contents of that line. Each process posts a single MPI_Irecv and uses

Re: [OMPI users] Receiving an unknown number of messages

2009-07-23 Thread Eugene Loh
Shaun Jackman wrote: Eugene Loh wrote: Shaun Jackman wrote: For my MPI application, each process reads a file and for each line sends a message (MPI_Send) to one of the other processes determined by the contents of that line. Each process posts a single MPI_Irecv and uses MPI_Request_get_s

Re: [OMPI users] Receiving an unknown number of messages

2009-07-23 Thread Shaun Jackman
Eugene Loh wrote: Shaun Jackman wrote: For my MPI application, each process reads a file and for each line sends a message (MPI_Send) to one of the other processes determined by the contents of that line. Each process posts a single MPI_Irecv and uses MPI_Request_get_status to test for a rece

Re: [OMPI users] Receiving an unknown number of messages

2009-07-14 Thread Prasadcse Perera
I think its a real good way to use MPI_Irecv/MPI_Test on the receiver side to avoid any blocks which sender might run in to. But I'm a bit curious on the fact, Can't we use a special message beforehand between the sender/receivers to let the receivers know how many messages to expect ? This way the

Re: [OMPI users] Receiving an unknown number of messages

2009-07-14 Thread Eugene Loh
Shaun Jackman wrote: For my MPI application, each process reads a file and for each line sends a message (MPI_Send) to one of the other processes determined by the contents of that line. Each process posts a single MPI_Irecv and uses MPI_Request_get_status to test for a received message. If a

[OMPI users] Receiving an unknown number of messages

2009-07-14 Thread Shaun Jackman
Hi, For my MPI application, each process reads a file and for each line sends a message (MPI_Send) to one of the other processes determined by the contents of that line. Each process posts a single MPI_Irecv and uses MPI_Request_get_status to test for a received message. If a message has been