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

write of unit 6 fails in ivf11 but works in ivf9 when there is no console window

Michel
Beginner
478 Views
We have upgraded to ivf 11.1 and we found that when we write to unit 6 we get a runtime error when there is no console window opened.
Normally a console window is only opened when we are testing our app.

Unit 6is opened with this code:
open(6,file='con',carriagecontrol='list')

WhenI want to print some diagnostic text I use:
write(6,'(a)') 'Error text'

The app crashes and traceback info points to the write statement.
The error is: Error during write, unit 6, file con.

This was no problem with ivf 9.1 Output just went to the bitbucket.

Changing the code to write to a file or other output is no option because we have mixed console and windows apps which share parts of our codebase.

Does someone know how to get around this problem? Or do I have to suibmit my problem to intel support?

Michel.
0 Kudos
1 Reply
Steven_L_Intel1
Employee
478 Views

In my opinion, the new behavior is correct and the old one was a bug. You could just add IOSTAT=IOS to the WRITE and ignore the error.
0 Kudos
Reply