I/O slow (buffered?) ; can I change this?

Rob spamrefuse@yahoo.com
Sat Dec 16 06:00:00 GMT 2006


Brooks wrote:
> Ray Nachlinger wrote:
> 
>   At the risk of being a fool I will say that I have
>   ported code among compliers, and your complaint
>   seems to be a "high class problem". The fact that
>   it works at all should elate you, not be grounds
>   for complaints.
> 
> 
> As someone who works on gfortran, however, I would
> say that bug reports of this nature are crucial to
> turning a "it works at all" compiler into a great
> one, and thus they are very much welcome!
> 
> Rob, are you doing anything interesting with your
> command line, when you invoke gfortran? I believe
> that it should automatically determine when output
> is being ported to the console rather than a file,
> and turn off the buffering, but routing the output
> through tee or something could confuse it.

Ah, yes indeed, I'm doing that. I'd thought this
would not matter, as it doesn't with executables
compiled with other compilers.

The executable is called 'vasp', and this is how
I run the executable in a script called 'runvasp'.

 #!/bin/tcsh
 # this is the runvasp script
 vasp.serial >& log

I then call 'runvasp &', which does everythying in
the background while producing an output log file
'log'.
While the executable is running, I check the
contents of the log file:
  $ tail -f log

The contents of the log file comes in bursts only
for the Gfortran compiled executable.


When I run the executable directly from the command
line:
  $ vasp
then the output is not delayed anymore. So indeed
the output redirection seems to cause the confusion.
But why is this only with Gfortran compiler?

Is there a gfortran compiler flag or something else
that can help me with this problem?

Thanks!
Rob.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the Fortran mailing list