Newsgroups: comp.parallel.pvm
From: Graham Edward Fagg <sssfagg@reading.ac.uk>
Subject: Re: PVM Broadcast to Empty Group
Organization: University of Reading, U.K.
Date: Tue, 11 Apr 1995 09:46:33 +0100
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Message-ID: <Pine.SUN.3.91.950411093003.20514B-100000@sssscsc1.reading.ac.uk>

On 30 Mar 1995, David White wrote:
> Just one quick question: if I broadcast a message to a group which has
> no members, does the PVM daemon simply ship it to the bit-bucket, or
> does it agonize over it in some way?  Thanks.
> Dave White

It has to talk to the PVM Group Server first to find out that the group 
is empty. In fact, to do almost anything iwith groups it talks to the
group server first, hence its lack of efficiency (sometimes). It would 
then return a PvmNoGroup error (-19).

As for the message its still left in the current send buffer, just as any 
other message would be after it has or has not been sent.
(See code attached.)

Graham.
===============================================================================
Graham Edward Fagg ||| *** Cluster Computing Lab. ***  ||| e-mail me some time
 Computer Science ||  Software Engineering Subject Grp.  ||  G.E.Fagg@rdg.ac.uk
0734-875123 7626 | http://www.cs.reading.ac.uk/people/gef/ | PVM/MPI/LINDA/VMD
===============================================================================

#include <stdio.h>
#include "pvm3.h"
#define gname "nutcracker"

main () {
	int tid,gid;
	char str[20];

	tid=pvm_mytid();

	pvm_initsend(PvmDataDefault);
	pvm_pkstr(gname);

	printf("bcast to group returns %d \n",pvm_bcast(gname,0));
	printf("send to me returns %d \n",pvm_send(tid,0));

	pvm_recv(tid,0); /* recvable ? */
	pvm_upkstr(str);

	printf("string received :%s\n",str);

	pvm_exit();
}



