|
[Sponsors] |
how to deal with the problem'stack overflow'? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 6, 2001, 00:58 |
how to deal with the problem'stack overflow'?
|
#1 |
Guest
Posts: n/a
|
because of too much variabes and need enough nodes to simulation the fluid,when I run my CFD code,the machine tell my 'stack overflow',the Fortran 5.0 is used,how to deal with this problem?
thanks |
|
April 6, 2001, 08:52 |
Re: how to deal with the problem'stack overflow'?
|
#2 |
Guest
Posts: n/a
|
I once heard of such a problem. Maybe it has something to do, if you pass all variables via the parameter list.
I think if one uses common blocks instead of passing the variables via the parameter list, it could cure the problem. That is what I remember someone told me once, who encountered the same problem when running big jobs. This is just a remark (I did not experience or try it by myself) Frank |
|
April 6, 2001, 11:17 |
Re: how to deal with the problem'stack overflow'?
|
#3 |
Guest
Posts: n/a
|
|
|
April 6, 2001, 12:52 |
Re: how to deal with the problem'stack overflow'?
|
#4 |
Guest
Posts: n/a
|
You can use the limit command to see what the default maximum stacksize is. Try this.
Type "limit" on prompt. My machine produces something like this on the screen. cputime unlimited filesize unlimited datasize unlimited stacksize 65536 kbytes coredumpsize unlimited memoryuse 1048576 kbytes descriptors 200 vmemoryuse unlimited threads 1024 So the stacksize is limited to 65536 kbytes. You can increase it all the way upto the memoryuse (1048576 kbytes in this case). When you type "limit stacksize 524288", the stacksize increases to 0.5MEGS. If you need more, set it to a higher number. |
|
April 6, 2001, 14:20 |
Re: how to deal with the problem'stack overflow'?
|
#5 |
Guest
Posts: n/a
|
This of course assumes that you have a unix(based) operating system!
Adrin Gharakhani |
|
April 6, 2001, 14:44 |
Re: how to deal with the problem'stack overflow'?
|
#6 |
Guest
Posts: n/a
|
(1). Type "stack overflow fortran" into a websearch engine, and you should get a lot of answers. (2). Here is one answer. Please learn how to do Internet Search on your own. (3). This is just one example. It might not be your problem. In general, when you run out of local memory space (local variables) you get overflow message.
Stack Overflow Messages Symptom: A message like "forrtl: severe: Program Exception - stack overflow" when trying to run the Numerical Recipes demonstration programs xsort, xselect, and others. Solution: This occurs in some versions of DIGITAL Visual Fortran, the successor compiler to Microsoft Fortran PowerStation. The solution is to add "/link /stack:8000000" AFTER everything else on the compiler command line (after all .obj files, not just options), or make the equivalent stack size change in the IDDE settings. You might not need this big a value, but we know that this one works. -------------------------------------------------------------------------------- |
|
April 7, 2001, 02:40 |
Re: how to deal with the problem'stack overflow'?
|
#7 |
Guest
Posts: n/a
|
I think you use digital visual Fortran. Chien's writing is correct to increase stack size. Another way is just use editbin at DOS command like
dir> editbit /stack:1000000 test.exe The stack size is in byte unit. If 1MB of stack is not enough, increase more until you can run your application. As you can imagine, test.exe is the name of excutable file. |
|
April 12, 2001, 09:02 |
Re: how to deal with the problem'stack overflow'?
|
#8 |
Guest
Posts: n/a
|
I met this kind of question before, I used C in unix. I sloved this problem use linked-list stack. I am not sure about fortran. Sorry :>
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Solution variables goes outside upper limit -how to localize fatal overflow occurance | Dimone | CFX | 2 | January 21, 2011 06:35 |
OVERFLOW and Horizontal Axis Wind Turbine | ntonkin | Main CFD Forum | 1 | November 19, 2009 01:40 |
overflow error on linux cluster | steven | CFX | 1 | March 13, 2007 08:05 |
How to deal with source term when using RKschemes? | leaf | Main CFD Forum | 2 | May 11, 2006 10:34 |
linear solver overflow | peggy | CFX | 1 | February 8, 2001 01:39 |