Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] MPI_Irecv: Confusion with <<int count>> inputy parameter
From: devendra rai (rai.devendra_at_[hidden])
Date: 2012-08-21 04:01:15


Hello Jeff and Hristo, Now I am completely confused: So, let's say, the complete reception requires 8192 bytes. And, I have: MPI_Irecv(                         (void*)this->receivebuffer,/* the receive buffer */                         this->receive_packetsize,  /* 80 */                         MPI_BYTE,                   /* The data type expected */                         this->transmittingnode,    /* The node from which to receive */                         this->uniquetag,           /* Tag */                         MPI_COMM_WORLD,             /* Communicator */                         &Irecv_request              /* request handle */                     ); That means, the the MPI_Test will tell me that the reception is complete when I have received the first 80 bytes. Correct? Next, let[s say that I have a receive buffer with a capacity of 160 bytes, then, will overflow error occur here? Even if I have decided to receive a large payload in chunks of 80 bytes? I am sorry, the manual and the API reference was too vague for me. Thanks a lot Devendra ________________________________ From: "Iliev, Hristo" <iliev_at_[hidden]> To: Open MPI Users <users_at_[hidden]> Cc: devendra rai <rai.devendra_at_[hidden]> Sent: Tuesday, 21 August 2012, 9:48 Subject: Re: [OMPI users] MPI_Irecv: Confusion with <<int count>> inputy parameter Jeff, >> Or is it the number of elements that are expected to be received, and hence MPI_Test will tell me that the receive is not complete untill "count" number of elements have not been received? > > Yes. Answering "Yes" this question might further the confusion there. The "count" argument specifies the *capacity* of the receive buffer and the receive operation (blocking or not) will complete successfully for any matching message with size up to "count", even for an empty message with 0 elements, and will produce an overflow error if the received message was longer and data truncation has to occur. On 20.08.2012, at 16:32, Jeff Squyres <jsquyres_at_[hidden]> wrote: > On Aug 20, 2012, at 5:51 AM, devendra rai wrote: > >> Is it the number of elements that have been received *thus far* in the buffer? > > No. > >> Or is it the number of elements that are expected to be received, and hence MPI_Test will tell me that the receive is not complete untill "count" number of elements have not been received? > > Yes. > >> Here's the reason why I have a problem (and I think I may be completely stupid here, I'd appreciate your patience): > [snip] >> Does anyone see what could be going wrong? > > Double check that the (sender_rank, tag, communicator) tuple that you issued in the MPI_Irecv matches the (rank, tag, communicator) tuple from the sender (tag and communicator are arguments on the sending side, and rank is the rank of the sender in that communicator). > > When receives block like this without completing like this, it usually means a mismatch between the tuples. > > -- > Jeff Squyres > jsquyres_at_[hidden] > For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/ > > > _______________________________________________ > users mailing list > users_at_[hidden] > http://www.open-mpi.org/mailman/listinfo.cgi/users -- Hristo Iliev, Ph.D. -- High Performance Computing, RWTH Aachen University, Center for Computing and Communication Seffenter Weg 23,  D 52074  Aachen (Germany) Tel: +49 241 80 24367 -- Fax/UMS: +49 241 80 624367