"dopiotr" <nospam@nospam.invalid> wrote in message
> Hello Group,
>
> int Msg[size];
> MPI_Send(Msg, size, MPI_INT, DEST, TAG, MPI_COMM_WORLD);
> this is working fine.
>
> But how to send Msg declared like this:
> int *Msg=(int*)malloc(sizeof(int)*size);
>
> It gives me
> p4_error: interrupt SIGSEGV: 11
> not_send: could not write to fd=4, errno = 32
>
Should be fine. If the call sends a static array it should work exactly the
same way with a dynamic buffer allocated with malloc(). This is a general
feature of C functions, not just MPI.
However you have to know the message length, and allocate another buffer, to
receive the message at the other end.
--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm