- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We are getting an end-of-file during read error when attempting to read any namelist. We have used different namelists, cut them down to just 1 entry for testing, verified file is in correct directory and can be opened, but the end-of file read issue remains.
forrtl: severe (24): end-of-file during read, unit 5, file C:\Users\whoever\ProjectName\sampleNameList.dat, line 4, position 1
Image PC Routine Line Source
libifcoremd.dll 17FAEB4A Unknown Unknown UnknownStack trace terminated abnormally.
Press any key to continue . . .
We created a small sample project to test namelist reads, and that works in its own project, but when the same code is inserted into the larger project it still returns "end-of-file during read". So it would seem to be something specific to the larger project, or the fact that the small project works in debug testing, but the larger project is tested by compiling the DLL and inserting it into the main application.
Here is the small sample code that works in its own project:
program mesh character(len=20) :: Model namelist /NAMELISTTEST/Model open(unit=3,file='namelist.test',status='unknown') read(3, NAMELISTTEST, ERR=100) write(*,*) Model goto 101 100 write(*,*) 'FILE READ ERROR' 101 continue end program mesh
Sample namelist file:
&NAMELISTTEST
Model='Unit 7'
/
Another version of the larger project is in a working state on a different computer (Win 7), so maybe someone has knowledge of hiccups with other systems (file permissions, etc)? Currently experiencing this issue on Windows Server 2012 Essentials.
Thanks
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you can manage to attach a ZIP of a complete project or VS solution that reproduces the problem, we can probably help. The only thing I can think of is that your failing program possibly has already read one line of the file so that the starting token is not seen.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No setting. Please try to come up with a test case we can build and run.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page