- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We have found by trial that passing an array size argument that exceeds 1000 will cause a runtime exception. The added sample f90 file attachment shows the basic issue. Under a debug run, the crash appears to be from within the microsoft chkstk.asm pagesize probing. Our environment is VS2005 SP1 and IF10.1.
Is this a problem or a configuration issue. Thanks.
Pete
Is this a problem or a configuration issue. Thanks.
Pete
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The arrays are being allocated on the stack by default. To allocate on the heap :
Under Project=>Fortran=>Optimizaton set Heap Arrays to 0 (zero)
Les
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The arrays are being allocated on the stack by default. To allocate on the heap :
Under Project=>Fortran=>Optimizaton set Heap Arrays to 0 (zero)
Les
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Les Neilson
The arrays are being allocated on the stack by default. To allocate on the heap :
Under Project=>Fortran=>Optimizaton set Heap Arrays to 0 (zero)
Les
Thanks Les, your suggestion worked a treat - it does take a while to work thru the arrays (around 18 seconds in the coded example) but maybe that is the cost of using the heap. Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - peter.stevens
Thanks Les, your suggestion worked a treat - it does take a while to work thru the arrays (around 18 seconds in the coded example) but maybe that is the cost of using the heap. Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - tim18
If you didn't try increased stack size (e.g. /link /stack:800000000) that might present an alternative to heap-arrays.
Thanks tim18, I had not tried this approach but setting the /stack (and also tested with setting the stack commit) to 800000000, it did allow the test code to complete but took 25 seconds; repeat of the Heap approach yielded a faster outcome with no noticable resource hit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - peter.stevens
Thanks tim18, I had not tried this approach but setting the /stack (and also tested with setting the stack commit) to 800000000, it did allow the test code to complete but took 25 seconds; repeat of the Heap approach yielded a faster outcome with no noticable resource hit.
Doesn't it work to SAVE the array where it's allocated?

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