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

I need help with reading a file

t_j_m
Beginner
891 Views
I am trying to read a file, here is the error I am getting.
forrtl: severe (9): permission to access file denied, unit 25, file C:PROGRAM F
ILESMICROSOFT VISUAL STUDIOMYPROJECTSPANAIRfort.25
Image PC Routine Line Source
PANAIR.exe 0040B5D9 Unknown Unknown Unknown
PANAIR.exe 0040B3D3 Unknown Unknown Unknown
PANAIR.exe 0040A564 Unknown Unknown Unknown
PANAIR.exe 0040A7DE Unknown Unknown Unknown
PANAIR.exe 004041A6 Unknown Unknown Unknown
PANAIR.exe 004011E4 PANAIR 24 PANAIR.f90
PANAIR.exe 00431769 Unknown Unknown Unknown
PANAIR.exe 00428984 Unknown Unknown Unknown
kernel32.dll 7C816D4F Unknown Unknown Unknown
Press any key to continue
I have full access to this folder so I don't know why I am getting this error. Please advise.
Thanks

0 Kudos
4 Replies
jimdempseyatthecove
Honored Contributor III
891 Views
This often occures the 2nd time you write to the file when the OPEN statment does not specify you are permitted to overwriteand existingfile.
0 Kudos
t_j_m
Beginner
891 Views
I am trying to read the file not write anything.
0 Kudos
TimP
Honored Contributor III
891 Views
Not that it's any comfort, but sometimes Windows files hang inaccessible or "in use" after access by a Fortran program, sometimes until reboot on 32-bit Windows. If you can't open it or remove it with other tools under Windows, Fortran can't solve this problem.
Sometimes I have wished for a repeatable way to show this problem and find out whether it has any correlation with Fortran run-time library (e.g. Windows falls behind in serving calls from Fortran).
0 Kudos
anthonyrichards
New Contributor III
891 Views
Has your program exited abnormally before this, leaving it loaded and so still attached to the file? If so, you need to examine processes in Task Manager, find it and delete the errant process, then try again.
0 Kudos
Reply