Hello,

I have the following problem. There areI two arrays somewere in the program:

double weights [MAX_SIZE];
...
int       values [MAX_SIZE];
...

I need to be able to send a single pair { weights [i], values [i] } with a single MPI_Send call Or receive it directly into both arrays at at given index i. How can I define a datatype that spans this pair over both arrays?

The only additional constraint it the fact that the memory location of both arrays is fixed and cannot be changed and I should avoid extra copies.

Is it possible?

Any help welcome,
Oleg Morajko