Residual Files

Residual Files

In my program, I write my output files to Unit 14 and Unit 15. This is a simple program, nothing fancy, so it just runs in a DOS window. (Running NT4) I've noticed that when I break out of the program, just Ctrl-C out of the program, if I haven't written anything to Unit 14 and Unit 15 yet, the program leaves behind 2 files: fort.14, and fort.15

However, if I had started writing to the output files, then only the output files would remain (with the proper file names), and fort.14/fort.15 would not exist at all.

is this just a quirk of how Fortran works? My guess is that the program gets to the section where it reserved unit 14 and 15 for my output files, but haven't gotten to the part where I name the files, so it leaves behind 2 empty slots. Is there a way to make sure this doesn't happen? So that even if I ctrl-C out of the program, it wouldn't leave behind fort.14/fort.15?

it's mainly a convenience issue, but I am curious.


2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

I don't know what you mean by &quotl;it reserved unit 14 and 15" The se files don't get created until you actually do I/O on the respective unit, they are not created in advance and then renamed. I can't think of a scenario that would match the behavior you describe, other than an OPEN of these units with no filename and DISP='DELETE'.

In other words, it's your program creating these files


Steve - Intel Developer Support

Leave a Comment

Please sign in to add a comment. Not a member? Join today