For our blocking receive(std::vector), we first do a MPI_Probe to get
the incoming message size, so that we can resize the data vector to
accomodate.  This is wonderful behavior.

For our nonblocking equivalent, we instead currently force users to
pre-allocate the input data vector.  Is there any way to instead make
the allocation behavior as user-friendly as in the blocking case?

We can't use MPI_Probe, because that would block.

We can't use MPI_Iprobe and then return, because (unless the
non-blocking probe already found the message) then we'd never end up
calling MPI_Irecv.

We could use MPI_Iprobe and then hold off on the recv (and additional
Iprobe calls as necessary) until Parallel::wait() is called, but
that's basically equivalent to (and so redundant with) doing a
blocking receive.

I'm currently rewriting my app code to switch to all blocking
receives, so this isn't critical for me, but it might be a nice
feature to add in the future if we can figure out how to work it.
---
Roy

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Libmesh-devel mailing list
Libmesh-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to