Newsgroups: comp.parallel.pvm
From: jim@cicely.ilo.dec.com (Jim Lawton)
Reply-To: jim@ilo.dec.com
Subject: Re: Is pvmfspawn(.., .., '*', ntask-1, .., ..) for the SPMD model
Organization: Digital Equipment Corporation
Date: 6 Nov 1995 14:09:49 GMT
Message-ID: <47l4vd$qe7@mrnews.mro.dec.com>


In article <476717$mod@gauss.physics.ucla.edu>, TZENG <tzeng@physics.ucla.edu> writes:
>However if I 'pvmfspawn(jb, pvmdefault, '*', 1, tid, ierr)' 
>from host process on alpha by using SPMD model, 
>sometimes I've got the slave process spawned on beta, which is good,
>but sometimes I've got the spawned process on alpha, which means that
>I have 2 processes running on alpha and none on beta!  By no means
>in this situation can we achieve the Load Balancing.

I think this is due to the way PVM attempts to schedule tasks when 
it spawns. By default, it uses a round-robin scheme where it just
keeps a note of who it spawned on last and will spawn somewhere else
the next time. In a two-node configuration, this accounts for the 
toggling effect you see. 

To get PVM to always spawn the slaves on node(s) other than the one
you started the master on, you could try something like:

	pvmfspawn(jb, PvmHostCompl, '.', 1, tid, ierr)

"." is PVM shorthand for the current host, and PvmHostCompl tells
PVM that you want to spawn on the complement of the set specified by 
where (i.e. "."); thus, slaves will be spawned on beta always if the 
master is started on alpha.

-- 
/jim

+---------------------------------------------------------------+
| Jim Lawton                      Digital Equipment Corporation | 
|                    Technical Computing Group, Galway, Ireland |
| Phone: +353-91-754759                     Fax: +353-91-754435 | 
| Email: jim@ilo.dec.com (MIME OK) Not an offical spokesperson! |
+---------------------------------------------------------------+

