This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: deallocating too many allocated variables
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Intermon <a_m_intermon at yahoo dot com>
- Cc: fortran at gcc dot gnu dot org
- Date: Sat, 24 Jun 2006 13:51:56 -0700
- Subject: Re: deallocating too many allocated variables
- References: <5028547.post@talk.nabble.com>
On Sat, Jun 24, 2006 at 01:09:48PM -0700, Intermon wrote:
>
> I have written a so large program in Fortran, with too many subroutines and
> hundreds of allocated variables in these subroutines. I tried to deallocate,
> as much as possible, each allocated variable at the end of each subroutine.
> but since it's a large program, maybe I forgot to deallocate some.
> Briefly, this program reads some data from a file and perform some
> operations on the data and then makes an output data file.
> Now the problem is, when I run the program just for one data file (i.e. just
> calling all of the subroutines for once during the running) there is not any
> problem. but when I want to go to the beginning of the program (e.g. by a
> simple Do loop) and calculate the output for another data file, it returns
> an error message:
> "allocatable array is already allocated"
Which version of gfortran? Grepping the trunk source does not
find that error message.
Perhpas, the error message could be more helpful, but proper
memory management should be done by the programmer. Without
access to the source code, I doubt we can help you.
--
Steve