Newsgroups: comp.parallel.mpi
From: misha@thunderbird.think.com (Michael Tselman)
Subject: Re: Correction: Beginers question about immediate send
Organization: Thinking Machines Corporation, Cambridge MA, USA
Date: 24 Jun 1996 13:38:56 GMT
Message-ID: <4qm5pg$l1u@bone.think.com>

Anatol Piotrowski (piotrows@scs.carleton.ca) wrote:
: There is no & before data.
: > Would you know if this code looks OK for immediate (async) send ?
: > 
: > short   data[70000];
: > MPI_Request request;
: >         MPI_Isend(data,          /* message buffer */
: >                   60000,          /* one data item */
: >                   MPI_SHORT,      /* data item is an integer */
: >                   rank,           /* destination process rank */
: >                   WORKTAG,        /* user chosen message tag */
: >                   MPI_COMM_WORLD, /* always use this */
: >                   &request);      /* I don't care what is stored */

--
Before the answer to your question can be given, you have to tell us what
do you want to send. If you want to send only one integer which is stored
in the data[60000], then your code is wrong. it should be: 
         MPI_Isend(&data[60000],          /* message buffer */
                   1,          /* one data item */
                   MPI_SHORT,      /* data item is an integer */
                   rank,           /* destination process rank */
                   WORKTAG,        /* user chosen message tag */
                   MPI_COMM_WORLD, /* always use this */
                   &request);      /* I don't care what is stored */
On the other hand if you are trying to send the first 60000 integers from
the array data, than your code is correct.

	--Misha


______________________________________________________________
|Michael Tselman (Misha)                |Imagination is      |
|Thinking Machines Corporation          |  more important    |
|misha@think.com | http://www.think.com |    than knowledge. |
|(617)-276-0400 x4048	                |      (A. Einstein) |
--------------------------------------------------------------



           

