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

program stops with no run-time error while reading a file

cep1dm
Beginner
772 Views

Hi,

my fortran program stops with no run-time error while reading a file. the read is in a do-loop so I open the txt file-read-close the fileat every iteration while in the do. It does it for approximately 75000 times, and then if certain conditions are true, it starts again. The program stops after the 17000 time with no appartent reason (it should stop after the 75000th time). I have been programming on a daily basis for the past 5 five years, so I promise I have tried a lot of things.

The last thing I can think of is that there might be alimit on the txt file, or on the amount of times that it can be opened and closed?It doesn't make much sense but....Can I track the mistake somehow if I have no run-time error?

PS. there is no lnk warning either.

Thanks in advanced.

Dan

0 Kudos
3 Replies
Steven_L_Intel1
Employee
772 Views
There is no limit on text files, nor on how many opens and closes. It's possible that there is a "file handle" leak in the run-time library, but I'm not aware of one in a current version. What compiler and version are you using?

Why don't you leave the file open and do a REWIND to reread it instead? You'll save a lot of work on behalf of the I/O system.
0 Kudos
cep1dm
Beginner
772 Views

The compiler is Compaq Visual Fortran Version 6.6.

Thanks

Dan

0 Kudos
Steven_L_Intel1
Employee
772 Views
Ah, in that case, I do know of a resource leak. You should not have this problem using Intel Visual Fortran 10.1.
0 Kudos
Reply