regarding Boost::MPI, does this library serialize custom objects??
this is the object i need to send:

class Lattice{
            int numNodes;
            int numEdges;
            map<int, Edge> edges;
            map<int, Node> nodes;
            stringstream key;
            list< list<int> > keyLists;
            bool corrupt;
            bool rec;
            int nop;
}

//and Edge, Node are classes too:
class Edge{
        int n1,n2;
        int id;
        bool sp;
        bool dead;
};
class Node{
        bool sp; //special flag
        int id, ext;
        float x, y, z;

    public:
        multimap<int,int> eMap;
};

they have their corresponding methods and constructors, but those are their
data structures.
you recommend use Boost::MPI:Serialize or do manual Serialize?
best regards
Cristobal




On Fri, May 7, 2010 at 4:49 PM, Fernando Lemos <fernando...@gmail.com>wrote:

> On Fri, May 7, 2010 at 5:33 PM, Cristobal Navarro <axisch...@gmail.com>
> wrote:
> > Hello,
> >
> > my question is the following.
> >
> > is it possible to send and receive C++ objects or STL structures (for
> > example, send map<a,b> myMap) through openMPI SEND and RECEIVE functions?
> > at first glance i thought it was possible, but after reading some doc, im
> > not sure.
> > i dont have my source code at that stage for testing yet
>
> Not normally, you have to serialize it before sending and deserialize
> it after sending. You could use Boost.MPI and Boost.Serialize too,
> that would probably be the best way to go.
> _______________________________________________
> users mailing list
> us...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/users
>

Reply via email to