- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I am coding a little fea solver. I use imsl to solve the stiffness matrix but I get a stack overflow error when I refine my solution (The program works well with a limited number of nodes, when I attempt to solve more exact solution the error appears)
The error I get is this:
Unhandled exception at 0x000000014023e1b7 in Problema1.exe: 0xC00000FD: Stack overflow.
The line that is causing the problem is located in a subroutine called from the main program
Rigidez, Desp and F are variables declared in a module called Globals
DI is a vector declared inside the subroutine and the values are set by another subroutine
Best Regards
I am coding a little fea solver. I use imsl to solve the stiffness matrix but I get a stack overflow error when I refine my solution (The program works well with a limited number of nodes, when I attempt to solve more exact solution the error appears)
The error I get is this:
Unhandled exception at 0x000000014023e1b7 in Problema1.exe: 0xC00000FD: Stack overflow.
The line that is causing the problem is located in a subroutine called from the main program
[fortran]Desp(DI) = Rigidez(DI, DI) .ix. F(DI)[/fortran]
Rigidez, Desp and F are variables declared in a module called Globals
[fortran]real(8), allocatable:: Rigidez(:,:)
real(8), allocatable:: Desp(:)
real(8), allocatable:: F(:)
[/fortran]
DI is a vector declared inside the subroutine and the values are set by another subroutine
[fortran]integer,allocatable:: DI(:)
call DIncognitas(DI, NDI)[/fortran]
Best Regards
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can, if you wish, increase the stack size in the project settings :
Project->Properties->Linker->System-> Stack Reserve Size
You can also force temporary arrays to be allocated on the heap instead of the stack
Project->Properties->Fortran->Optimization->Heap Arrays 0 (zero)
Les
Project->Properties->Linker->System-> Stack Reserve Size
You can also force temporary arrays to be allocated on the heap instead of the stack
Project->Properties->Fortran->Optimization->Heap Arrays 0 (zero)
Les
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank Les for your reply
How large should the stack reserve be?
and also Changing the stack size will not affect performance?
Best Regards
How large should the stack reserve be?
and also Changing the stack size will not affect performance?
Best Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just took a quick look at one of our (smaller) projects and it is set to 4,000,000
(another, mixed language project, sets the stack at 8Gb!)
I doubt you will notice any performance issues unless you profile the code.
Les
(another, mixed language project, sets the stack at 8Gb!)
I doubt you will notice any performance issues unless you profile the code.
Les
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much for your answer
Best Regards
Best Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's me again
I try to keep refining my solution but another error appeared:
Can that restriction be circumvented?
Best Regards
I try to keep refining my solution but another error appeared:
[bash]forrtl: severe (41): insufficient virtual memory[/bash]
Can that restriction be circumvented?
Best Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The stack is limited to 1GB in Windows. You may be bumping into the 2GB addressable limit in 32-bit Windows. How much data are you trying to allocate? Are you building a 64-bit application? The exception address in the first post suggests you are.

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