From: <gor...@ph...> - 2002-08-09 15:53:15
|
On Tue, 16 Jul 2002 08:29:52 -0600 Erik Arjan Hendriks wrote: >It is possible for a machine to be a master and slave for itself at >the same time. It's a pretty confusing arrangement though since >processes will show up several times in the process tree. > > . . . Ideally, all of the processes in a parallel job would be created on the master node and migrated to slave nodes. It also appears to be possible (see perl script at end) for a single bproc process on a slave node to rfork itself off to other slave nodes. The "ghost" processes only end up on the master node, which is fine. In this is the case, what advantage is there to having bpmaster run on every node? #!/usr/bin/perl use Parallel::Bproc; sub printhost { $host=`hostname`; print "I am $host\n"; } printhost; Parallel::Bproc::bproc_rfork(1) ; printhost; Parallel::Bproc::bproc_rfork(10) ; printhost; sleep 1000; It appeared to work: # /tmp/a.pl I am lxsrvr0 I am lxsrva2 I am lxsrva11 |