From: Falko Eickel <falko.eickel@mail.uni-oldenburg.de>
Newsgroups: comp.parallel.mpi
Subject: Re: Broadcast and Receive in MPI
Date: Mon, 08 Mar 1999 19:07:41 +0100
Organization: A poorly-installed InterNetNews site
Message-Id: <36E411ED.F5F901B0@mail.uni-oldenburg.de>
References: <7c11ba$i1b$1@news3.tufts.edu>
Reply-To: falko.eickel@informatik.uni-oldenburg.de
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Xref: ukc comp.parallel.mpi:4703


Sanpawat Kantabutra wrote:

> Hello, I am new to MPI and would like to know if I want my process to
> broadcast a message to the other processes, what MPI command should I
> use  I tried to use bcast(...) with the broadcaster and use recieve(...)
> at the broadcastees but it did not work. Is this possibly a mismatch?
> What is the right way to do it ? Any advice is appreciative. -Sanpawat

You must use bcast(...) for sending and receiving the Broadcast! One of
the Parameters is the Rank of the Sender. If this matches the Rand of
the
current Processor, the Data is send, if not, the data is received.

CU/2 Falko

