- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Intel Fortran 11, Windows7, x64: Simple code that producesan errorafter about 3000 times deleting and creating the same file. Does anyone have an idea what's wrong?
do i=1,10000
print*,i
open(1,file='1.dat',status='new',form='unformatted')
write(1)12345
close(1,status='delete')
enddo
end
forrtl: severe (9): permission to access file denied, unit 1, file E:\\1.dat
Image PC Routine Line Source
tmp.exe 004A0DEA Unknown Unknown Unknown
tmp.exe 004169C0 Unknown Unknown Unknown
tmp.exe 00415B9A Unknown Unknown Unknown
tmp.exe 004081FD Unknown Unknown Unknown
tmp.exe 004010CE _MAIN__ 3 Source1.for
tmp.exe 004A77A3 Unknown Unknown Unknown
tmp.exe 0044C8C7 Unknown Unknown Unknown
tmp.exe 0044C79F Unknown Unknown Unknown
kernel32.dll 773C3677 Unknown Unknown Unknown
ntdll.dll 778E9D42 Unknown Unknown Unknown
ntdll.dll 778E9D15 Unknown Unknown Unknown
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've seen this before - it's a Windows timing issue. Try adding a call to SLEEPQQ(500) after each close and that should help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve, thanks for the quick response!
Just for the record, I found a different workaround in my context by using STATUS='REPLACE'during file openninginstead of deleting and recreating it.
Just for the record, I found a different workaround in my context by using STATUS='REPLACE'during file openninginstead of deleting and recreating it.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page