Newsgroups: comp.parallel.pvm
From: Stefan Hinker <hinker@informatik.uni-wuerzburg.de>
Subject: Re: Example neededfor Asynchronous Communication
Organization: University of Wuerzburg, Germany
Date: 13 Dec 1995 11:57:54 GMT
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <4amf42$jne@winx03.informatik.uni-wuerzburg.de>

Hi !

Saghir Ahmed Shaikh <shaikh@ece.utexas.edu> wrote:
>Could you please provide me an example of some application using pvm for
>asynchronous comm. i.e. using pvm_nrec(-1, -1). For example my program alg
>would look like as follows:
(stuff deleted)
>I am unaware how one determones what type of message has arrived and if it is 
>arrived or not etc. Please let me know if you know any hints...

The approach you stated in your posting is suitable.  You can retrieve a so
called "message tag" from each message using the pvm-function pvm_bufinfo.
You attach this message tag when sending the messages.  
Another way to distinguish messages could be to use some kind of header in your
messages, i.e. an integer describing the message.  I have used the combination
of these two techniques in my recent application.  I hope this helps.  If you
would want to see my code, mail me...

Greetings,
Stefan

-- 
===============================================================================
Stefan Hinker                         email: hinker@informatik.uni-wuerzburg.de
                Unix? Still working on it  :-))
===============================================================================


