- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there a maximum for the number of Fortran units? I am doing an INQUIRE on units 7-99, and the inquire on unit 39 gives:
forrtl: severe (157): Program Exception - access violation
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there a maximum for the number of Fortran units? I am doing an INQUIRE on units 7-99, and the inquire on unit 39 gives:
forrtl: severe (157): Program Exception - access violation
From the help on Unit Specifier [UNIT=]io-unit:
"The integer is in the range 0 through 2,147,483,643"
So there must be something else wrong with your code.
Can you post the code?
Les
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
From the help on Unit Specifier [UNIT=]io-unit:
"The integer is in the range 0 through 2,147,483,643"
So there must be something else wrong with your code.
Can you post the code?
Les
There are operating system limits to the number of simultaneously open files. Unix ulimit -n (?) I think. MS C runtime may have a limit of 512 or 2048...http://msdn.microsoft.com/en-us/library/6e3b887c(VS.71).aspx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In any event I would not expect an access violation. Please post an example that shows this problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In any event I would not expect an access violation. Please post an example that shows this problem.
do i=7,99
inquire(i,opened=is_open, named=has_name, name=fff, iostat=ierr)
if(is_open .and. has_name) then
close(i)
endif
enddo
It is not reproduceable in a small code snippet, so I'm guessing the problem must lie elsewhere in our code, but only gets manifested at the end of the run when the units are closed.
When i is 39, I get this on the inquire call:
forrtl: severe (157): Program Exception - access violation
Image PC Routine Line Source
ntdll.dll 7C9369AA Unknown Unknown Unknown
MSVCRT.dll 77C2C3C9 Unknown Unknown Unknown
MSVCRT.dll 77C2C3E7 Unknown Unknown Unknown
MSVCRT.dll 77C2C42E Unknown Unknown Unknown
libifcoremd.dll 00284C18 Unknown Unknown Unknown
libifcoremd.dll 002863C5 Unknown Unknown Unknown
libifcoremd.dll 002861C8 Unknown Unknown Unknown
libifcoremd.dll 002DCE27 Unknown Unknown Unknown
PNet.dll 103B47D5 _NWINSTOP 234 nstop.f90
PNet.dll 103B2763 _NSTOP 64 nstop.f90
PNet.dll 100736DC _MAINPNET 607 mainpnet.f90
pnetstub_ilmpi.ex 0040105E Unknown Unknown Unknown
pnetstub_ilmpi.ex 00401DA9 Unknown Unknown Unknown
pnetstub_ilmpi.ex 00401408 Unknown Unknown Unknown
pnetstub_ilmpi.ex 0040124F Unknown Unknown Unknown
kernel32.dll 7C817067 Unknown Unknown Unknown
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I see that you have reported this issue to Intel Premier Support. Please work with us there to resolve the problem. My guess is that somewhere else in your program you are corrupting memory used by the run-time library.

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