Newsgroups: comp.parallel.pvm
From: Graham E Fagg <fagg@cs.utk.edu>
Subject: Re: Send a message to a task
Organization: Computer Science Dept, University of Tennessee, Knoxville
Date: Wed, 7 Feb 1996 22:02:12 -0500
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Message-ID: <Pine.SUN.3.91.960207215129.21732B-100000@thud.cs.utk.edu>

On Wed, 7 Feb 1996, BScCS4 Chan Suet Mei wrote:
> Hi there,
> 
> I am now using PVM 3.3.9, SUN and C to write some programs.
> 
> My question is : 2 programs are running together ( not using pvm_spawn )
> and they are not in a group
I assume that they are running on a single virtual machine (different hosts?)

> Now, program A wants to send program B a message. However, program A does not 
> know the task id of program B. As pvm_send can only use when the destination
> task id is known. Can anyone tell me who to solve this program? I have tried 
> to use pvmtidtohost() to get the task id. But only id of program A is given and
> id of program B cannot be seen. 
I think you will have to leave the address of B in a 'well know place' 
i.e. in a file (aka $HOME/mytid which is how a process connects to a 
daemon when its not spawned (via /tmp/pvmd*)) or by using the internal naming
service which the group server is built apon (please see pvm_lookup, 
pvm_insert and pvm_delete).

If I was you I'd get process B to join a group as this is safer.. and the 
lookup only needs to be performed once.

> Thanks in advance. :)
> 
> Chan Suet Mei.
                                                                   O__
Graham.                                                            ,>/
==================================================================()=\()======
Graham E. Fagg      | Shared Memory, Message Passing & Groups |  PVM  MPI  VMD
Computer Science Dept |  104 Ayres Hall, Knoxville, TN 37996 | fagg@cs.utk.edu
University of Tennessee | Phone: +(423)974-3735  Fax: +(423)974-8296 \ SoftEng 
==============================================================================


