[Mpi-forum] Sending an objects vector via MPI C++

Saygin Arkan saygenius at gmail.com
Wed Jul 7 04:06:26 CDT 2010


Hello,

I'm a newbie on MPI, just playing around with the things.
I've searched through the internet but couldn't find an appropriate code
example for my problem.

I'm making comparisons, correlations on my cluster, and gaining the results
like this:
vector<ComparisonResult> results;

In every node, they calculate and create the results array, in their local
storage.
And then I'd like to collect these vectors in my server node, rank (0).

I had done this with MPI gather but just for double arrays, not with objects
or vectors.

I have some guess about MPI::Create_contiguous, or MPI::Create_vector
functions,
but all these ask for another associated MPI type, such as CHAR or INT or
etc.
And I don't know if I should use packing somehow...

is there a way to collect these vectors in my server node with Gather
function?
or even with send & recv?

Thanks a lot,

-- 
Saygin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpi-forum.org/pipermail/mpi-forum/attachments/20100707/9f78e10a/attachment.html>


More information about the mpi-forum mailing list