Newsgroups: comp.parallel.mpi
From: egamess@kanaima.ciens.ucv.ve
Subject: 1 send and 2 receives ?
Organization: Deja News Usenet Posting Service
Date: Thu, 22 May 1997 18:51:11 -0600
Message-ID: <864344698.9937@dejanews.com>

Hello,

I have 2 processes (rank 0 and 1). Process 0 sends 10 integers to
process 1 with 1 call to MPI_Ssend. Process 1 receives the 10
integers from process 0 with 2 calls to MPI_Recv, like that:

Code of process 0:
   int a[10];
   ...
   MPI_Ssend(a, 10, MPI_INT, 1, 0, MPI_COMM_WORLD);


Code of process 1:
   int a[10];
   MPI_Status status;
   ...
   MPI_Recv(a  , 5, MPI_INT, 0, 0, MPI_COMM_WORLD, &status);
   MPI_Recv(a+5, 5, MPI_INT, 0, 0, MPI_COMM_WORLD, &status);

Is that correct ? Or process 1 must do:
   MPI_Recv(a, 10, MPI_INT, 0, 0, MPI_COMM_WORLD, &status);


Thank you very much for your answer.

Eric.

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet

