Prev: Integer overflow message
Next: ifort volatile with O3
From: georgios.antonopoulos on 29 Apr 2010 13:48 Hello, when I try to open a certain file for reading it says: PGFIO-F-217/unformatted read/unit=1/attempt to read past end of file I use code which generates the filename automatically according to a certain scheme. The weird thing is: when I print the generated filename (i.e. TV100P100.dat) it matches the name of the file. If I change it from .dat to .DAT it gives different errors. In the first case it is the PGFIO error, in the second case my programm just says FORTRAN STOP. I am completely clueless. Pleas help. Georgios
From: dpb on 29 Apr 2010 14:04 georgios.antonopoulos(a)ilt.fraunhofer.de wrote: > Hello, > > when I try to open a certain file for reading it says: > PGFIO-F-217/unformatted read/unit=1/attempt to read past end of file > > I use code which generates the filename automatically according to a > certain scheme. The weird thing is: when I print the generated filename > (i.e. TV100P100.dat) it matches the name of the file. If I change it > from .dat to .DAT it gives different errors. In the first case it is the > PGFIO error, in the second case my programm just says FORTRAN STOP. > > I am completely clueless. Pleas help. Well, since you provided exactly _no_ code it's crystal ball time... The first error doesn't say it couldn't find or open a file so one must presume that the file was opened. Then, it says it had and EOF condition. The second case would seem like normal termination. OK, now my crystal ball from these symptoms indicates you're operating on an OS for which filenames are case-sensitive and the OPEN statement in the Fortran code did not include the 'OLD' qualifier so the first time you ran the code it created a file of the name w/ the lowercase extension and then tried to read an (empty) file. Needless to say, that would seem to lead to an EOF condition as an expected result. In the other case, apparently the file w/ the uppercase extension exists and contains the proper (or at least sufficient) data in the format expected and therefore, runs to termination w/o error. How am I doing so far???? :) --
From: Dan Nagle on 29 Apr 2010 14:42 Hello, On 2010-04-29 14:04:33 -0400, dpb <none(a)non.net> said: > How am I doing so far???? :) My crystal ball thinks your crystal ball is doing fine. :-) Another possibility is that there are magic filenames, or filename suffixes, in the Fortran rtl and when you happen to hit one exactly, you get some sort of special treatment. The views of my crystal ball are its alone, and do not represent the views of the US government or any church or monarch, living or dead. ;-) -- Cheers! Dan Nagle
|
Pages: 1 Prev: Integer overflow message Next: ifort volatile with O3 |