LAM/MPI logo

LAM/MPI General User's Mailing List Archives

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

From: Neil Storer (Neil.Storer_at_[hidden])
Date: 2004-04-01 03:34:55


Leonardo,

I have a program making similar calls to MPI_Isend without problems.

Without seeing more of the source it's difficult to see what is causing your
problem. However, it could be the parameter "&sbuf[i]".

What is the value of "i"?
What is the value of "size"?

and ARE THEY VALID?

Regards
        Neil

Llfrg_at_[hidden] wrote:
> 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.
> _______________________________________________
> This list is archived at http://www.lam-mpi.org/MailArchives/lam/

-- 
+-----------------+---------------------------------+------------------+
| Neil Storer     |    Head: Systems S/W Section    | Operations Dept. |
+-----------------+---------------------------------+------------------+
| ECMWF,          | email: neil.storer_at_[hidden]    |    //=\\  //=\\  |
| Shinfield Park, | Tel:   (+44 118) 9499353        |   //   \\//   \\ |
| Reading,        |        (+44 118) 9499000 x 2353 | ECMWF            |
| Berkshire,      | Fax:   (+44 118) 9869450        | ECMWF            |
| RG2 9AX,        |                                 |   \\   //\\   // |
| UK              | URL:   http://www.ecmwf.int/    |    \\=//  \\=//  |
+--+--------------+---------------------------------+----------------+-+
    | ECMWF is the European Centre for Medium-Range Weather Forecasts |
    +-----------------------------------------------------------------+