Re: [OMPI users] MPI and C++ - now Send and Receive of Classes and STL containers

2009-07-07 Thread Markus Blatt
Hi, On Mon, Jul 06, 2009 at 03:24:07PM -0400, Luis Vitorio Cargnini wrote: > Thanks, but I really do not want to use Boost. > Is easier ? certainly is, but I want to make it using only MPI > itself > and not been dependent of a Library, or templates like the majority > of > boost a huge set of tem

Re: [OMPI users] MPI and C++ - now Send and Receive of Classes and STL containers

2009-07-06 Thread John Phillips
Luis Vitorio Cargnini wrote: just one additional and if I have: vector< vector > x; How to use the MPI_Send MPI_Send(&x[0][0], x[0].size(),MPI_DOUBLE, 2, 0, MPI_COMM_WORLD); ? Vitorio, The standard provides no information on where the different parts of the data will be, relative to

Re: [OMPI users] MPI and C++ - now Send and Receive of Classes and STL containers

2009-07-06 Thread Luis Vitorio Cargnini
Thanks, but I really do not want to use Boost. Is easier ? certainly is, but I want to make it using only MPI itself and not been dependent of a Library, or templates like the majority of boost a huge set of templates and wrappers for different libraries, implemented in C, supplying a wrappe

Re: [OMPI users] MPI and C++ - now Send and Receive of Classes and STL containers

2009-07-06 Thread Luis Vitorio Cargnini
just one additional and if I have: vector< vector > x; How to use the MPI_Send MPI_Send(&x[0][0], x[0].size(),MPI_DOUBLE, 2, 0, MPI_COMM_WORLD); ? Le 09-07-05 à 22:20, John Phillips a écrit : Luis Vitorio Cargnini wrote: Hi, So, after some explanation I start to use the bindings of C inside

Re: [OMPI users] MPI and C++ - now Send and Receive of Classes and STL containers

2009-07-06 Thread Number Cruncher
I strongly suggest you take a look at boost::mpi, http://www.boost.org/doc/libs/1_39_0/doc/html/mpi.html It handles serialization transparently and has some great natural extensions to the MPI C interface for C++, e.g. bool global = all_reduce(comm, local, logical_and()); This sets "global"

Re: [OMPI users] MPI and C++ - now Send and Receive of Classes and STL containers

2009-07-05 Thread Luis Vitorio Cargnini
Thank you very much John, the explanation of &v[0], was the kind of think that I was looking for, thank you very much. This kind of approach solves my problems. Le 09-07-05 à 22:20, John Phillips a écrit : Luis Vitorio Cargnini wrote: Hi, So, after some explanation I start to use the binding

Re: [OMPI users] MPI and C++ - now Send and Receive of Classes and STL containers

2009-07-05 Thread John Phillips
Luis Vitorio Cargnini wrote: Hi, So, after some explanation I start to use the bindings of C inside my C++ code, then comme my new doubt: How to send a object through Send and Recv of MPI ? Because the types are CHAR, int, double, long double, you got. Someone have any suggestion ? Thanks. V

Re: [OMPI users] MPI and C++ - now Send and Receive of Classes and STL containers

2009-07-05 Thread Robert Kubrick
Regardless of MPI, when sending C++ object over the network you have to serialize their contents. The structures, or classes, have to be coded to a stream of bytes, sent over the network, then recoded into their complex object types by the receiving application. There is no way to send obje

[OMPI users] MPI and C++ - now Send and Receive of Classes and STL containers

2009-07-05 Thread Luis Vitorio Cargnini
Hi, So, after some explanation I start to use the bindings of C inside my C ++ code, then comme my new doubt: How to send a object through Send and Recv of MPI ? Because the types are CHAR, int, double, long double, you got. Someone have any suggestion ? Thanks. Vitorio. smime.p7s Descripti