Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

How to flush output written to *

jespersen
Beginner
1,208 Views
Given an existing code that writes to * a lot. I'm trying to force all those writes to be flushed,
to help tracking down a problem (code is being run under a batch system, so writes to *
do not come to the screen).
I've tried "FLUSH(6)" and "FLUSH(UNIT=6)" but they fail at runtime with the message
"Unit 6 is not connected". Also "FLUSH(*)" and "FLUSH(UNIT=*)" fail at compile time,
while as you might expect "FLUSH('*')" and "FLUSH(UNIT='*')" fail at run time.
This is compiler version 11.1.038.
What's a good way to get standard output (written to *) flushed?
0 Kudos
1 Reply
Steven_L_Intel1
Employee
1,208 Views
Compile with -assume noold_unit_star and then use FLUSH(6).
0 Kudos
Reply