Re: How to send dynamic vector?
dopiotr wrote:
> 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
Without further code I can't really tell what your problem is. It may
not be a C problem but an incorrect use of MPI functions. You might do
better to ask in a forum dedicated to your MPI implementation.
<http://en.wikipedia.org/wiki/Message_Passing_Interface>
<http://www.mpi-forum.org/docs/>
<http://www.open-mpi.org/>
<http://www.personal.leeds.ac.uk/~bgy1mm/MPITutorial/MPIHome.html>
|