This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: deallocating too many allocated variables


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]