-1

Can I do something like this to improve performance and avoid buffer problems I am running into for higher iterations. MaxIterations = 6000

While(numberIterations<= MaxIterations)
{
   MPI_Iprobe() -- check for incoming data
    while(flagprobe !=0)
    {
        MPI_Recv() -- receive data
        MPI_Iprobe() -- loop if more data
    }

   updateData() -- update myData

   for(i=0;i<N;i++) MPI_Isend(request[i]) -- send request

   for(i=0;i<N;i++) MPI_Wait(request[i]) --wait till request is complete

   if(numberIterations = MaxIterations) { MPI_Barrier() }

   numberIterations ++

}
Luc Touraille
  • 79,925
  • 15
  • 92
  • 137
Naga
  • 65
  • 1
  • 8
  • possible duplicate of [Can I use MPI_Barrier() to synchronize data in-between iteration steps](http://stackoverflow.com/questions/9960462/can-i-use-mpi-barrier-to-synchronize-data-in-between-iteration-steps) – suszterpatt Apr 01 '12 at 17:38
  • Yes question is on same lines. I am trying to get opinion from MPI community if this is wrong way to do things. – Naga Apr 01 '12 at 17:46
  • What is N in your code? Is it equal to MPI_Comm_size()? Do you need data from all other ranks before proceeding to updateData()? – user1202136 Apr 05 '12 at 07:58
  • Yes N is equal to MPI_Comp_Size. Yes I would get accurate results if I can collect data before other all other ranks – Naga Apr 05 '12 at 18:09
  • Update with that IM doing right now and this seems to be working for larger iterations – Naga Apr 05 '12 at 18:12

0 Answers0