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]

deallocating too many allocated variables


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"
Maybe I forget to dallocate some public variables in the subroutine or even
in the body of the main program. but I can't find them at all. Because as I
said before, the program has too many allocated variables and I can't check
all of them or just that is a hard work to do.
Now I want to know, if there is any way to deallocate all of the variables
at the end of the loop to prevent error message. or if there are any other
ways to resolve this problem.
Thanks in advance.
--
View this message in context: http://www.nabble.com/deallocating-too-many-allocated-variables-t1842051.html#a5028547
Sent from the gcc - fortran forum at Nabble.com.


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