Newsgroups: comp.parallel.pvm
From: Mike Gross <gross@physics.ucsc.edu>
Subject: Re: Processes can't spawn inside pvm?
Organization: University of California, Santa Cruz
Date: 10 May 1995 23:07:42 GMT
Message-ID: <3orgvu$pag@darkstar.UCSC.EDU>

fammeter@rif2 (Frank Richard Ammeter) wrote:
>
> I have a problem with pvm3 on a SUN4SOL2 cluster. Processes I start from the
> shell work ok; but inside "pvm" or "xpvm", I only get one process, which doesn't
> seem to do anything but to wait instead of spawning other processes.
> Any hints? Shouldn't processes behave the same independent of whether I start
> them inside or outside the pvm console? 
> Any hints? Thanks.
> 
You didn't say how you spawn your slaves.  If you use the SPMD model
example codes, you will have the problems you describe.  IF you use
the value of pvm_parent() to test if you are the master, your program
will only work when the master is started on the command line.  The
reason is that the parent process is the PVM console or xpvm, and
pvm_parent() returns a TID different from PvmNoParent in that case.

One fix is to have all tasks join a group, and use the size of the
group as to test for the master (using pvm_gsize()).  The drawback
to this approach is that you cannot run more than one invocation of
your master under the same PVMD at the same time.

Another fix is to have separate executables for master and slave
tasks.

Good luck


