Re: [OMPI users] Sending vector elements of type T using MPI_Ssend, plz help.

2011-11-02 Thread German Hoecht
Hi, you could try the following (template): MPI_Send( &vec[first_element], num_elements*sizeof(T), MPI_BYTE, ..) MPI_Recv( &vec[first_element], num_elements*sizeof(T), MPI_BYTE, ..) As far as I know STL vectors use contiguous memory for the values of the vector. However, I didn't test this and

Re: [OMPI users] maximum size for read buffer in MPI_File_read/write

2011-09-28 Thread German Hoecht
al Terabytes in the meanwhile. Best regards, German On 09/27/2011 10:01 PM, Rob Latham wrote: > On Thu, Sep 22, 2011 at 11:37:10PM +0200, German Hoecht wrote: >> Hello, >> >> MPI_File_read/write functions uses an integer to specify the size of >> the buffer, for instan

Re: [OMPI users] Segfault on any MPI communication on head node

2011-09-27 Thread German Hoecht
char* name[20]; yields 20 (undefined) pointers to char, guess you mean char name[20]; So Brent's suggestion should work as well(?) To be safe I would also add: gethostname(name,maxlen); name[19] = '\0'; printf("Hello, world. I am %d of %d and host %s \n", rank, ... Cheers On 09/27/2011 07:40 P

[OMPI users] maximum size for read buffer in MPI_File_read/write

2011-09-22 Thread German Hoecht
Hello, MPI_File_read/write functions uses an integer to specify the size of the buffer, for instance: int MPI_File_read(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status) with: count Number of elements in buffer (integer). datatype Data type of each buffer element