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
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
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
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