LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Llfrg_at_[hidden]
Date: 2004-03-31 12:45:09


Hi,

I need to dynamically allocate a MPI_Request array. I declare the pointer as folows:

   MPI_Request *request;

next, I malloc memory:

   request = (MPI_Request *)malloc((size-1)*sizeof(MPI_Request));

but when I call:

      MPI_Isend(&sbuf[i],1,MPI_INT,i,124,MPI_COMM_WORLD,request+j);

wth j=0, I get a segmentation fault. Does anyone know what's wrong?

Thanks,
Leonardo.