LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2004-09-24 13:22:34


That's all fine and good, but it's just not part of MPI. :-)

This would have to be something layered on top of MPI. Hence, your
function will probably eventually resolve down to an MPI_SEND that will
do the actual sending of the correct datatype. With a bit of
cleverness, the function could probably be inlined, and there would be
little performance overhead (although going through the iterators might
take some time... you'd have to evaluate that for your own
requirements/needs).

The OOMPI project took a few steps in the direction of a class library
for MPI several years ago (1996-ish?), but didn't do anything like
this. Both the C++ language itself and the quality of compilers
available have improved significantly since then.

On Sep 24, 2004, at 11:24 AM, hedman_at_[hidden] wrote:

>
> What about doing something for POD data stored in STL
> containers that uses iterators? Something along the lines
> of (a simple p2p example)
>
> std::vector<double> a;
> a.reserve(1024);
> //
> // put stuff into a
> //...
>
> if (sender)
> mpicxx::send_stl_foo(a.begin(), a.end(), /* more args */);
> else
> mpicxx::recv_stl_foo(std::back_inserter(a), /* more args */);
>
> The intention would to enable sending POD data stored in STL
> containers without having to copy them. As a starter what
> is needed is that the MPI calls internally make use of
> operations that are consistent with the relevant iterator
> traits (output and input). Most certainly there would be
> other implications, but I'm sure there would be quite a bit
> of interest for something like this...
>
> --
> Regards,
> Fredrik Hedman
> _______________________________________________
> This list is archived at http://www.lam-mpi.org/MailArchives/lam/
>

-- 
{+} Jeff Squyres
{+} jsquyres_at_[hidden]
{+} http://www.lam-mpi.org/