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: [OMPI users] Passing data structure
From: Alessandro Palandri (alessandro.palandri_at_[hidden])
Date: 2008-04-11 12:33:53


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