Newsgroups: comp.parallel.pvm
From: mmuschol@hermes.informatik.uni-stuttgart.de (Matthias Muscholl)
Subject: Re: problems getting stdout from spawned tasks
Organization: IPVR, University of Stuttgart, Germany
Date: Tue, 1 Nov 1994 17:18:52 GMT
Message-ID: <CyLMrH.22r@news.informatik.uni-stuttgart.de>

In article <38lj5l$pv3@news.uni-c.dk>, schiotz@oersted (Jakob Schiotz) writes:
|> Heng Kek (nsrcchk@leonis.nus.sg) wrote:
|> : Gareth Evans# (gme@cpcw7.uea.ac.uk) wrote:
|> 
|> : : I'm having trouble getting the stdout of a number of slave processes
|> : : spawned by a master.
|> 
|> : : There is nothing in /tmp/pvml.<UID> and I tried a pvm_catchout( stdout ) but
|> : : still nothing.
|> 
|> : I've had the same problems.  i.e. printf() statments in spawned
|> : slave processes produce nothing in /tmp/pvml.xxx.  But when I
|> : switched to 'fprintf(stderr,...)' then the stuff appears in the log
|> : file.  This is for pvm3.2.6.  I don't know if the same situation
|> : persists in pvm3.3
|> 
|> : Would be grateful if an explanation can be posted here.
|> 

I have no problems since I follow these points:

	- the last statement of any pvm-process is pvm_exit();
	- every `printf' or `cout <<' ends up with a line feed!
	  (cerr seems to fflush every time)

	The output of spawned processes appear in the /tmp/pvml.<uid> 
	of the parent process. This is a documented feature! 
	See pvm user guide (May 1994) pp. 144 (pvm_setopt()) and pp. 62
	
	The output seems to be sent over the local pvmd, which may collect
	several lines before it handles it. Pvm_exit() flushes the pvmd.
	(This is my explanation, I haven't read the source code)

,--------------------,-------------------------.-----------------------,
| Matthias Muscholl  |                         | Fax: +49-711-7816 250 |
|                    | Phone: +49-711-7816 442 |                       |-,
`--------------------'-------------------------'-----------------------' |
  |   E-MAIL:    mmuschol@informatik.uni-stuttgart.de                    |-,
  `----------------------------------------------------------------------' |
    |University of Stuttgart, Institute for Parallel and Distributed High- | 
    |Performance-Systems (IPVR), Breitwiesenstr. 20-22, D-70565 Stuttgart  |
    `----------------------------------------------------------------------'

