Newsgroups: comp.parallel.mpi
From: jwilson@cs.colorado.edu (John Wilson)
Subject: Probing for MPI_bcast message, is it possible?
Summary: Detecting MPI broadcast messages, sender and size
Organization: University of Colorado, Boulder
Date: 14 Sep 1994 21:28:51 GMT
Message-ID: <357puj$56@csnews.cs.Colorado.EDU>


I would like to know whether it is possible to probe for broadcasts in
mpi.  In addition, I would like to know whether it is possible to
probe for message size, and either probe for the "root" or sender, or to
use a wildcard ie MPI_ANY_SOURCE for root.  

I am porting a communication library that closely follows intel hypercube
structure to MPI.  Currently there is only a blocking receive in the
library.  This is used for receiving broadcasts and point to point messages.
Generally the receivers do not know the sender or the actual size of
the message till they receive the message.

The ideal scenario would be to be able to create a receive routine using MPI
that did the following:

probe for message type
if point to point message then
   code to handle point to point messages
else if bcast message then code to handle bcast messages.

I am aware of MPI_Probe, however my interpetation based on the structure
of the MPI standard is that MPI_probe only applies to point to point 
communications.  If MPI_probe can probe for broadcast messages, the issue
of finding who the sender and size of message to use in the bcast call
are solved.  However, there is still the problem of determining whether
the message is a broadcast or point to point message in order to use
the appropiate receive.

John Wilson



