Re: Stack overflow problem but increasing stack size does not solve the problem
- From: Louis Krupp <lkrupp@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 26 Jan 2008 03:17:25 -0700
nure123@xxxxxxxxx wrote:
On Jan 26, 1:43 am, Ravindra Vidhate <ravividh...@xxxxxxxxx> wrote:As the your code shows that it is a recursive function so there must
exists a condition to break this recursiveness.
Ravindra
Sorry, I pasted the wrong version. Problem exists with the following
code too.
file1:
PROGRAM MAIN
DOUBLE PRECISION a(65,2001)
CALL ROUTINE1(a)
END PROGRAM
file2:
SUBROUTINE ROUTINE1(a)
DOUBLE PRECISION a(65,2001)
RETURN
END SUBROUTINE
You might try adding "SAVE" to the array declaration in your main program:
SAVE DOUBLE PRECISION a(65,2001)
This might get the array off the stack at the expense of making your code file bigger.
Dynamically allocating the array might be even better; see your Fortran manual for details.
(Others here will know more about these options, but depending on what time zone you're in, this might be useful for now.)
Louis
.
- Follow-Ups:
- Re: Stack overflow problem but increasing stack size does not solve the problem
- From: Richard Maine
- Re: Stack overflow problem but increasing stack size does not solve the problem
- References:
- Prev by Date: Re: Using Fortran to predict the stock market
- Next by Date: Re: Error while reading in pointer Location
- Previous by thread: Re: Stack overflow problem but increasing stack size does not solve the problem
- Next by thread: Re: Stack overflow problem but increasing stack size does not solve the problem
- Index(es):
Relevant Pages
|