Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bugfix memory leak. Ticket NOAA-EMC#1340
It appears that changing the file extension from .ftn in v6.07 to .F90 in v7 triggered a memory leak in Intel's Fortran compilers. The issue occurs when mapping from a dynamically allocated array to a static array. GCC gfortran on the other hand will make sure that allocated arrays will be freed on exit of a subroutine. The leak is about 250B per grid point and subroutine call. This translates to 5MB per time step on a 2.5M proint grid. Updates ------- [x] Change array type from static to allocatalbe. [x] Explicitely add DEALLOCATE statements. [x] Move arrays with constantes to MODULE level. [x] Add checks for allocation status.
- Loading branch information