Re: redirecting IDL standard output to a file [message #22786] |
Mon, 11 December 2000 06:16 |
Bernard Puc
Messages: 65 Registered: January 1998
|
Member |
|
|
t.osborn@uea.ac.uk wrote:
>
> We have just upgraded to IDL5. I have some IDL programs that output
> text and results to the screen (non-graphics). In the past, when using
> our Digital/Compaq Alphas running UNIX, if I typed:
>
> idl > outfile.dat
>
> when starting IDL, then all standard output would be redirected to the
> specified file. Because IDL buffers it's output, it could be the case
> that outfile.dat would remain empty until a certain amount of output
> had been produced, or until I exited IDL (when all buffered output
> would be sent to outfile.dat). Under IDL5.4, however, the buffered
> output doesn't seem to be sent to outfile.dat when I exit IDL - and I
> lose all my output. outfile.dat is created but stays empty. If I type
> flush,-1 at the IDL prompt prior to exiting, then the buffer is flushed
> and my file is filled. But I shouldn't have to do this! Can anybody
> else replicate this problem? I've e-mailed IDL support with this
> problem, but was interested to know if anybody else had the same
> problem.
>
> Cheers
>
> Tim
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
I can replicate the problem on:
IDL> help,/str,!version
** Structure !VERSION, 7 tags, length=44:
ARCH STRING 'x86'
OS STRING 'linux'
OS_FAMILY STRING 'unix'
RELEASE STRING '5.4'
BUILD_DATE STRING 'Sep 25 2000'
MEMORY_BITS INT 32
FILE_OFFSET_BITS
INT = 32
--
Bernard Puc AETC, INC.
bpuc@va.aetc.com 1225 Jefferson Davis Highway #800
(703) 413-0500 Arlington, VA 22202
|
|
|
Re: redirecting IDL standard output to a file [message #22788 is a reply to message #22786] |
Mon, 11 December 2000 01:15  |
t.osborn
Messages: 6 Registered: July 1995
|
Junior Member |
|
|
In article <3A32FC64.2BC15F77@indra.com>,
mbennett@indra.com wrote:
> If you turn on journaling, doesn't that capture all output to the
> journal file? It seems to work that way on my machine.
Thanks for that, Med. Unfortunately you get other stuff output
into the journal file too. The response from RSI tech support is that
I'll have to stick with flush,-1 until we get IDL 5.5:
"IDL's I/O subsystem got a major re-write in IDL 5.4, and you
have stumbled over the only known problem resulting from it (so far).
Unfortunately, IDL 5.4 does not flush stdout and stderr before exiting.
This is not a problem with ttys (not bufferred) but does show up
when you do redirection. Unfortunately, no one in our beta program did
that, and so we didn't find the problem until 5.4 shipped. It will
(already has been) be fixed for the next IDL. Until then, you
can add a "FLUSH, -1" at the end of your IDL session in order to
make your redirection work."
Tim
Dr. Timothy J. Osborn
Climatic Research Unit
University of East Anglia
Norwich
UK
t.osborn@uea.ac.uk
Sent via Deja.com http://www.deja.com/
Before you buy.
|
|
|
|