Newsgroups: comp.parallel.pvm
From: Vladimir Vlasov <vlad@it.kth.se>
Subject: Help: How many messages to consume?
Organization: The Royal Institute of Technology, Stockholm, Sweden
Date: Mon, 29 Apr 1996 16:12:53 +0200
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <3184CE65.41C67EA6@it.kth.se>

Hi everyone,

I am writing/testing a library for a multiprocessing
comm./synch. model on PVM.
I've got some hidden races in my implemetation...

I would appreciate if anyone could answer me
the following question:

How can I get (from a PVM task) a number of messages
(with any tag, from any task) waiting to be consumed
(received) by the task?

I would like to have something like:

	nm = get_number_of_messages_to_consume(); /* ??? */
	for (i = 0; i < nm; i++) {
		pvm_recv(-1, -1);
		/* unpack and process */
		...
	}

Here: "nm", number of messages, guarantees that this
task is not blocked on pvm_recv. So, the problem is to
"get_number_of_messages_to_consume".

As I know PVM do not have in libpvm3.a (on the application
interface level) a function which could
return this information explicitly, but maybe one can
point out any place (function, global variable, structure, ...)
in pvm lib sources.

Thanks in advance.

Best regards,
-Vlad Vlassov

___________________________________________________________________

Vladimir Vlassov		Phone   +46  8 752 13 55
Royal Institute of Technology	Fax     +46  8 751 17 93
KTH Electrum 204		E-mail  vlad@it.kth.se
S-164 40 Kista, Sweden		WWW	http://www.it.kth.se/~vlad
____________________________________________________________________

