Stack overflow
Hi, everyone, Do you have some experience on handling the 'stack overflow' problems when runing a Fortran program? Please help me! Thanks a lot in advance.
|
Re: Stack overflow
Yes.
Solution depends on the operating system and compiler. If you share that info with us, I'm sure we have the solution for you. -- Jarmo |
Re: Stack overflow
If you are on linux/Unix, type
limit and look at the allowed stacksize. You may be able to increase it by typing limit stack unlimit If that does not increase it, you may have to get your administrator to allow a bigger value. |
Re: Stack overflow
one may use f77 -static ...
|
Re: Stack overflow
If the system is win2000 and the compiler is compaq visual fortran 6? The stack seems always not big enough.
|
Re: Stack overflow
Thank you all! The system I used is win2000 and the Fortran version is Visual Fortran 5.0. I used the Common sentence to transfer the data among main parogram and subroutines. I also tried to use the static sentence, but it seemed no much improvement. The computer in use is DELL precision 450 work station. It has a RAM of 1GB. Hope to get your further helps!!!!!!!!!!!
|
Re: Stack overflow
Put all your big data arrays into named common spaces
COMMON/DATA01/ARRAY1(... COMMON/DATA02/ARRAY2(... |
Re: Stack overflow
thank you, steve, Yes, what i have done is rightly as you advised.
|
Re: Stack overflow
Ming - Did that solve your problem or do you still have the stack overflow problem? Steve
|
Re: Stack overflow
no, this way doesn't work.
|
Re: Stack overflow
Let's try something else:
1. compile and build your code 2. go to the directory when the executable is (use command prompt) 3. type in : editbin /stack:"some very large number" 4. execute I'm not 100% sure of the command in step #3, but if you look up editbin or stack within VF, you should be able to find it. Hope this helps. -- Jarmo |
All times are GMT -4. The time now is 02:38. |