Newsgroups: comp.parallel.pvm
From: weisz@edvz.tuwien.ac.at (Willy Weisz)
Subject: Re: My Host?
Organization: EDZ-Zentrum der TU Wien
Date: 18 Oct 1994 12:13:36 GMT
Message-ID: <380e5g$5te@news.tuwien.ac.at>

In article <37ur9q$omr@falcon.ccs.uwo.ca>, crispin@csd.uwo.ca (Crispin Cowan) writes:
|> How do I discover PVM's idea of the name my current task is running on?
|> 
|>        < text deleted >
|> 
|> So, somewhere in the guts of the libpvm is a representation of the
|> local host's name.  What is it?  How do I get at it?
|> 
Dear Crispin,

the following way to get the hostname of the running task through PVM works
with PVM 3.3:

- with pvm_mytid you get the tid of your task,
- then pvm_tidtohost returns the tid of the pvm daemon on the task's host
- if you then look up the hostp array of hostinfo structures that contains
  the values returned by pvm_config, for the tid of the pvm daemon returned
  in the previous step,
- the name character string in the corresponding structure contains 
  the name of your host as seen by PVM.

I hope this solves your problem.

Willy
 

------------------------------------------------------------------------
Willy Weisz                                      weisz@edvz.tuwien.ac.at

EDV-Zentrum der TU Wien, Abteilung fuer Hochleistungsrechnen
Wiedner Hauptstrasse 8-10                     Tel: (+43 1) 588 01 - 5818
A-1040 Wien, Austria (Europe)                 Fax: (+43 1) 587 42 11

