Closed JohnEdChristensen closed 6 years ago
Did this actually fix it? Fortran has automatic garbage collection. Often a deallocate is unnecessary---objects are automatically taken care of when the function/subroutine is exited.
This completely fixed my problem. The program went from using multiple Gib of memory, to only using 200 Kib.
The
KpList
,pgOps
, andtrans
variables are not deallocated in this function. After calling this function thousands of times my program ended up using over 5 gigs of memory.This is fixed by simply adding
deallocate(KpList,pgOps,trans)
to the end of this function. That is all that my pull request changes.