Newsgroups: comp.parallel.pvm
From: "D. Jain" <D.Jain@ncl.ac.uk>
Subject: Re: Portable start ups
Organization: University of Newcastle upon Tyne, UK
Date: 29 Jun 1995 11:21:39 GMT
Message-ID: <3su2c3$9pc@whitbeck.ncl.ac.uk>


In article <9506271753.AA19213@ee.msc.edu>, saroff@msc.edu (Stephen Saroff Minnesota Supercomputer Center) writes:
|> Is there a recommended best way for writing a PVM code such that it
|> is portable between the T3D and a standard environment.\

Of course there are many 'hacks' you could do like checking for the existence of
a file that would only appear on the Cray as opposed to network situations. We
sometimes do things like that to enable us to switch options without recompiling
and without changing the input data file - for example my code checks to see if a
file called .LB exists in my home directory in which load balancing is switched
on. 

|>       call pvmfparent( iparent )
|> C
|> C     Find parent (master), only the pare/master will not have one.
|> c     Set number of tasks spawned to number of hosts less the master
|> c

Just be careful in situations where the master itself is spawned. I mentioned
this previously in connection with running code under XPVM. With XPVM the about
code will give a positive iparent even for the master/'parent'. My solution for
that is to make each processor join a 'group' - the first one to join will be
given the id 0 in which case I set iparent to -23 otherwise call pvmfparent (for
the 'slaves'.

Cheers
Deepak
-- 
=================== s.i.g.n.a.t.u.r.e =====================
== DEEPAK JAIN = IRC Nick: Toon = d.jain@newcastle.ac.uk ==
= WWW address:http://www.ncl.ac.uk/~n04ck = (0191)2227360 =
== Physics Department, Univ. of Newcastle upon Tyne, UK  ==
===========================================================

