Newsgroups: comp.parallel.pvm From: keith@crosslinkinc.com Subject: Re: Getting a machine to add itself to the virtual machine Organization: Deja News - The Leader in Internet Discussion Date: Fri, 14 Aug 1998 17:39:58 GMT Message-ID: <6r1spe$hg$1@nnrp1.dejanews.com> In article <35C0128A.2BE12B75@ironbark.bendigo.latrobe.edu.au>, drts@ironbark.bendigo.latrobe.edu.au wrote: > Hi there, > > I'm currently undertaking a project which involves a Master/Slave type > configuration using PVM. But it also includes a third process which is > a Graphical User Interface which will hopefully communicate with the > master process to issue tasks which the master process then divides and > sends to the slave processes. > > My problem is that I want the Master and Slaves to operate in the > background even if the user is not currently logged in. Thus the > interface will need to be a separate process which will only connect to > the Master when the user is logged in. > > Does anyone have an idea about how to get a machine (ie. the machine > that the interface is being executed on) to add itself to the virtual > machine so that it can then communicate with the other processes. It's > easy to add a machine from a process existing within the virtual > machine, but harder to do it the other way round. hello paul, i am doing something that is very close to this. you can use pvm_config() and pvm_tasks() to get all the machines that are in the virtual machine and all the tasks that are running in the virtual machine. the slave process will have to know who is the master host and process, but then will be able to get the tid for the master process to communicate to. for example, the process is called "foo" and is running on "bar.home.net". first loop through the pvmhostinfo( pvm_config() ) struct until you find the master host name. then with the hi_tid from the pvmhostinfo struct, loop the pvmtaskinfo( pvm_tasks() ) until pvmtaskinfo.ti_host is equal to pvmhostinfo.hi_tid. when those match, then pvmtaskinfo.ti_tid is the tid for the master process. keith > > My guess at the moment is that I'm going to have to use sockets between > the Master and Interface. But it would be much easier just to use pvm > calls. Any ideas? Hope I've explained it well enough. > > Thanx muchly, > > Paul > > PS. Please reply to my private address if you weren't already going to > do so. > > -----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum