Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] Passing data structure
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2008-04-12 08:35:51

Since you are using C++, you might also want to investigate the Boost C
++ MPI bindings.

On Apr 11, 2008, at 12:33 PM, Alessandro Palandri wrote:
> Hello,
> I am a new user of MPI and I would like to have your opinion on the
> following issue.
> With 1 processor I keep the data in
> std::vector<std::vector<double> > X
> Then I call a function that takes various arguments, among which
> X[ i ] and X[ j ], i.e. two sub-vectors of X.
> With MPI I would have the same function execute on different
> processors for different values of i and j in X[ i ] and X[ j ].
> From my understanding since std::vector is not an MPI type it cannot
> be passed neither as a message nor an element of an MPI structure. I
> thought of using
> double X[200][4000]
> which MPI would pass but I don't see how to isolate a single row,
> i.e. X[99] would not make sense in this context.
> Any suggestion for an efficient and possibly simple solution?
> Thank you for your help,
> Alessandro
> _______________________________________________
> users mailing list
> users_at_[hidden]

Jeff Squyres
Cisco Systems