CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Main CFD Forum

how to deal with the problem'stack overflow'?

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   April 6, 2001, 00:58
Default how to deal with the problem'stack overflow'?
  #1
Tom
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
  Reply With Quote

Old   April 6, 2001, 08:52
Default Re: how to deal with the problem'stack overflow'?
  #2
Frank
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
  Reply With Quote

Old   April 6, 2001, 11:17
Default Re: how to deal with the problem'stack overflow'?
  #3
mouse
Guest
 
Posts: n/a
  Reply With Quote

Old   April 6, 2001, 12:52
Default Re: how to deal with the problem'stack overflow'?
  #4
kalyan
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.
  Reply With Quote

Old   April 6, 2001, 14:20
Default Re: how to deal with the problem'stack overflow'?
  #5
Adrin Gharakhani
Guest
 
Posts: n/a
This of course assumes that you have a unix(based) operating system!

Adrin Gharakhani
  Reply With Quote

Old   April 6, 2001, 14:44
Default Re: how to deal with the problem'stack overflow'?
  #6
John C. Chien
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.

--------------------------------------------------------------------------------
  Reply With Quote

Old   April 7, 2001, 02:40
Default Re: how to deal with the problem'stack overflow'?
  #7
Jongtae Kim
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.
  Reply With Quote

Old   April 12, 2001, 09:02
Default Re: how to deal with the problem'stack overflow'?
  #8
peter liang
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 :>
  Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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 07:35
OVERFLOW and Horizontal Axis Wind Turbine ntonkin Main CFD Forum 1 November 19, 2009 02:40
overflow error on linux cluster steven CFX 1 March 13, 2007 09: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 02:39


All times are GMT -4. The time now is 15:17.