Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

Subject: Re: [OMPI users] MPI::Request::Test not working
From: devendra rai (rai.devendra_at_[hidden])
Date: 2012-01-04 11:21:51

Hi Jeff Thanks a lot. Yeah, I figured that out. Anyway, even in C++ program, I am using C interfaces for the MPI bit. For me, its lot easier to understand the documentation and help this way. Thanks a lot once again. Best, Devendra ________________________________ From: Jeff Squyres <jsquyres_at_[hidden]> To: devendra rai <rai.devendra_at_[hidden]>; Open MPI Users <users_at_[hidden]> Sent: Wednesday, 4 January 2012, 13:21 Subject: Re: [OMPI users] MPI::Request::Test not working It looks like you are using C++ improperly.  I would suggest something like this (typed in email; not verified with a compiler): MPI::Request Isend_request; Isend_request = MPI::COMM_WORLD.Isend(...); MPI::Status status; if (Isend_request.Test(status)) {     // ... } On Dec 30, 2011, at 10:21 PM, devendra rai wrote: > Hello Everyone, > > I wrote a small C++ MPI program to do an ISend: > > /*some declarations here */ > MPI::Request Isend_request_status; > ... > ... > > /* do the transmission */ > Isend_request_status = MPI::COMM_WORLD.Isend(this->transmitbuffer, this->transmissionsize, MPI_BYTE, (this->dbIterator)->first, std::get<0>(this->TransmissionDetails)); > > /* Check if the transmit was successful */ > if (MPI::Request::Test(Isend_request_status)) > { >    /* done :) */ > } > > However, building it gives the error: > > no matching function for call to ‘MPI::Request::Test(MPI::Request&)’ > > I am using gcc-4.6 on Linux, with OpenMPI- 1.4.3. > > I looked up the headers for the calls: > > inline MPI::Request > MPI::Comm::Isend(const void *buf, int count, >          const MPI::Datatype & datatype, int dest, int tag) const > > So, the MPI::COMM_WORLD::ISend(...) should return me variable of type MPI::Request. > > And, > > inline bool > MPI::Request::Test(MPI::Status &status) > > This takes in the variable of type MPI::Status. > > > So, two questions: > > (1). Is there a problem due to incompatible types? If so, how do I fix it? > (2). Why would the MPI::Request::Test take in a different type than what is returned by MPI::COMM_WORLD::ISend(...)? > > It would really help if you could help me fix the example that I have shown. > > I understand it would be easier to do this in C, but there are project requirements that led me to C++. > > Can someone please help? > > Thanks a lot. > > > Devendra > sd > _______________________________________________ > users mailing list > users_at_[hidden] > -- Jeff Squyres jsquyres_at_[hidden] For corporate legal information go to: