Hello Alexandru, On Mon, Aug 9, 2010 at 6:05 PM, Alexandru Blidaru <alexs...@gmail.com> wrote: > I have to send some vectors from node to node, and the vecotrs are built > using a template. The datatypes used in the template will be long, int, > double, and char. How may I send those vectors since I wouldn't know what > MPI datatype i have to specify in MPI_Send and MPI Recv. Is there any way to > do this? >
I'm not sure I understand what your question is about: are you asking what MPI datatypes you should use to send C types "long", "int", etc., or are you trying to send a more complex C type ("vector")? Can you send some code demonstrating the problem you are trying to solve? Besides, your wording suggests that you are trying to send a C++ std::vector<T> over MPI: have you already had a look at Boost.MPI? It has out-of-the-box support for STL containers. Cheers, Riccardo