- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have a problem with an F90 allocation statement. I am moving code from a Linux syst em to Windows XP-64 - the same compiler (intel visual fortran v11.1) with both systems 64 bit.
My code is stopping at an allocate statement - no error message or traceback - it just exits to the command line without saying anything. The code is pasted below. This works in Linux no problem. The value of nqwc is 8064 so it is not a massive ar ray. My guess would be that I have hit a memory limit but would have expected some kind of error statement to let me kno w?
Any ideas on how to progress with this - I am stumped....
--------------------------------- ----------------
real,save,allocatable :: qwcoord(:,:)
------------------------------------------- ------
subroutine allocate_qwcoord(nqwc)
integer nqwc
integer ierr
print*,' ierr = ',ierr
allocate(qwcoord(1:nqwc,1:6),stat=ierr)
print*,' ierr = ',ierr
qwcoord = 0
end subroutine
-------------------------------------------------
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just a quick update,
I can allocate a 14 * 6 array but not a 15 (or greater) *6
allocate(qwcoord(1:14,1:6),stat=ierr) works
allocate(qwcoord(1:15,1:6),stat=ierr) exits
It seems that there is a limit to how much memory I can allocate - does anyone know how to increase this limit?
I am using a total of about 2 GB with 12 GB RAM free on my workstation so it seems to be a software limit.
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In the absence of more specific information from you, I guess your program may be hitting stack overflow. So, you must experiment with /link /stack: In Visual Studio, in the linker properties section, fill in the stack reserve setting.
I suspect the default is no more than 16MB stack limit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Exceeding the (rather low) default stack limit is a common problem, but it's not obvious why an allocate statement should use more stack as the array size increases. Assuming that the array has been declared as ALLOCATABLE in the caller as well as the callee, I would turn on more of the diagnostic features of the Intel compiler, such /gen-interfaces /warn:interfaces and /check, or the equivalent under the "Diagnostics" and "Run-Time" properties in the IDE.
Even on a 64 bit Windows system, there are upper limits of about 2 GB on executable size and on static data, but dynamically allocated data do not contribute to these.

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