forked from NOAA-EMC/WW3
-
Notifications
You must be signed in to change notification settings - Fork 0
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 in ST6 source terms. 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
1 parent
4c3973a
commit 631ec0f
Showing
2 changed files
with
199 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.