View previous topic :: View next topic |
Author |
Message |
Rune
Joined: 04 Aug 2006 Posts: 2
|
Posted: Fri Aug 04, 2006 2:44 am Post subject: Set stack size |
|
|
I am using Plato 3 to compile a fortran code with large 2D arrays. When I try to run I get the error: "stack overflow". How can I change the dedicated stack size and how large can I set it?
Thanks in advance, I have used a lot of time trying to solve this problem and I would really appreciate your help!
Rune |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Fri Aug 04, 2006 5:31 am Post subject: Set stack size |
|
|
Rune
If you are using a project in Plato or Visual Studio then you can set the stack size in the Project Properties under Linker Options->Linker Options->Set Win32 stack size.
The default is documented as 50MB. See the FTN95 help file under Win32 platform->Using the linker->Reference->Interactive mode. As far as I am aware there is no imposed maximum value.
You will be aware that the stack is not used for all types of memory allocation. It may be that you can solve the problem by avoiding the use of large local arrays for example. Certainly it would be a good idea to local the particular arrays that are causing the problem to see if a change in the program design solves the problem.
|
|
Back to top |
|
|
Rune
Joined: 04 Aug 2006 Posts: 2
|
Posted: Fri Aug 04, 2006 7:09 am Post subject: Set stack size |
|
|
Thank you Paul,
your advice solved my problem!
I knew which arrays were the problem, but I needed them to be large.
Thank you for your quick respond!
Rune |
|
Back to top |
|
|
|