Newsgroups: comp.parallel.pvm
From: crispin@csd.uwo.ca (Crispin Cowan)
Subject: Re: problems getting stdout from spawned tasks
Organization: Department of Computer Science, University of Western Ontario, London, Ontario, Canada
Date: 26 Oct 1994 02:15:55 GMT
Message-ID: <38ke4r$raf@falcon.ccs.uwo.ca>

In article <38j5uv$fcj@cpca3.uea.ac.uk>,
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 often find that buffered output will die with the process if the
process dies abruptly.  It also seems to sometimes hang out without
being written to /tmp/pvml for an arbitrarily long time before finally
showing up.

Throwing around appropriate fflush() calls for stdout and/or stderr
seems to help a lot.

Caveat:  this will change the order in which output appears in
/tmp/pvml.  Not a huge deal, since the order in pvml is not guaranteed
in any case, but it can be mildly surprising to see output in the
opposite order from it's causality.

Crispin
-----
Crispin Cowan, CS PhD student, searching for a research position
University of Western Ontario
Phyz-mail:  Middlesex College, MC28-C, London, Ontario, N6A 5B7
E-mail:     crispin@csd.uwo.ca          Voice:  519-661-3342
	Thou shalt not make an odd-numbered Star Trek movie

