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

Extra output file fort.x

haitao
Novice
2,551 Views
There always some addtional output file automatically generated by CVF program. The file name is fort.x, where x is a number. It seems the x is related to the number in the open statement.
For example, in the program, if there are statements
Open (12, file = 'out.txt', err = 999)
Write (12, 12345) a, b, c
Close (12)
Then, I get the output file out.txt. That's fine. But I always get an extra file fort.12. The content of fort.12 is similar with out.txt. My program has many write statements inmany iterations. The size of this extra file fort.12 is very large.
Did anybody have same problem? How to get rid of it?
Thanks for help.
Haitao
2 Replies
Steven_L_Intel1
Employee
2,551 Views
This will happen when you do a WRITE on a unit that was not opened by an OPEN statement. One way it can happen even if you think you have opened the file is if you call a DLL with Fortran code and have not linked both the DLL and the main program to the DLL form of the run-time libraries.
haitao
Novice
2,551 Views
I checked the code. The open statement was not executed since the if conditionofitwas not considered carefully.
Thanks so much.
Haitao
0 Kudos
Reply