- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have a very simple question about openning scratch files. I am using IVF 9.0.
I have some scratch files opened during the run. I thought that these files would be deleted automatically
after the runis completed. But theyare not. I then have to use a CLOSE statement with STATUS = '
DELETE' todelete the scratch files.
Something wong with my coding? My open and close statements are attached. Thanks.
DO N=1,M
ENDDO
DO N=1, M
IFILE=IC+NC(N)
CLOSE(IFILE,STATUS='DELETE')
ENDDO
I have a very simple question about openning scratch files. I am using IVF 9.0.
I have some scratch files opened during the run. I thought that these files would be deleted automatically
after the runis completed. But theyare not. I then have to use a CLOSE statement with STATUS = '
DELETE' todelete the scratch files.
Something wong with my coding? My open and close statements are attached. Thanks.
DO N=1,M
IFILE=IC+NC(N)
OPEN (UNIT=IFILE, FORM='UNFORMATTED', STATUS='SCRATCH', ERR=95)ENDDO
DO N=1, M
IFILE=IC+NC(N)
CLOSE(IFILE,STATUS='DELETE')
ENDDO
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have you tried just closing them? According to my reference, if you close them, then they will automatically be deleted, but if you don't issue a CLOSE on them, they may stay around.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The scratch files should be deleted when the program terminates.In both9.0 and the latest version of the compiler, the scratch file is being deleted for the simple program below:
[fortran]program test OPEN (UNIT=5, FORM='UNFORMATTED', STATUS='SCRATCH' ) write(5,IOSTAT=IO_STATUS) "Hello" !close(5) end program test [/fortran]
Can you share an example program where the scratch file is not being deleted?
[fortran]program test OPEN (UNIT=5, FORM='UNFORMATTED', STATUS='SCRATCH' ) write(5,IOSTAT=IO_STATUS) "Hello" !close(5) end program test [/fortran]
Can you share an example program where the scratch file is not being deleted?
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