Newsgroups: comp.parallel.pvm
From: papadopo@cs.utk.edu (Philip Papadopoulos)
Subject: Re: "How can a slave program to write in screen?
Organization: CS Department, University of Tennessee, Knoxville
Date: 19 Jun 1995 14:46:00 -0400
Message-ID: <3s4gl8INNba4@duncan.cs.utk.edu>

In article <3s2nub$gh7@nuscc.nus.sg> edward@aba.nsrc.nus.sg (Edward Walker) writes:
>Philip Papadopoulos (papadopo@cs.utk.edu) wrote:
>: In article <3rn7qk$kv9@news.etse.urv.es> oriol <oriol@quimica.urv.es> writes:
>: >Hello from Spain,
>: >
>: > I'd like to know a form in which  a slave program could write 
>: >in screen. Currently only is able to do it the master.
>: >
>: >Any help will be welcome.
>: Before you spawn your slave programs call
>:      pvm_catchout(stdout);
>: This will take the output of your slave programs and have them
>: displayed on the masters screen. Alternatively, in the pvm console
>
>Yes.  But how does one do this in a Fortran program?

Simple enough.... really

        before you spawn slave programs :
        
       integer info
       call pvmfcatchout(1,info)     ! catch output of slave programs
       call pvmfspawn('slave', ..... )

BTW, the pvm_catchout argument is a file descriptor of where you want
the output to go. The Fortran version gathers output and always puts it
on the screen, instead of an arbitrary file. 

Check out the man pages $PVM_ROOT/man in the standard distribution or
on-line (HTML) versions at 
     http://www.epm.ornl.gov/pvm/man/manpages.html

-Phil



