-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory isn't deallocated in some of the init_interp code #1032
Comments
Copying over some thoughts from #1010 that are relevant here: As @ekluzek mentioned above: where possible, rather than adding explicit deallocate statements, I think it would be better to change pointer variables to allocatables. Then they will automatically be deallocated. If they are pointers because something else is pointing to them, then they can be declared as My initial thought is that, for every pointer in the init_interp code, we need to either: (a) deallocate it (possibly with a The main trickiness is that I think some of the derived types that I added, which use pointers, need |
@ekluzek I'll take this. I'm going to work on it today. I have a hunch that this actually might solve the initial problem, but that there are actually two separate issues and so the second might have masked the first in your testing. More soon.... |
Deallocate memory after running init_interp Many of the pointer arrays in init_interp were not being deallocated when init_interp finished. This was a particular problem because some of these arrays were allocated for the full global source grid on each processor, so the memory use was significant. This tag fixes this issue. This issue is documented in ESCOMP#1010 and ESCOMP#1032. Resolves ESCOMP#1032 (Memory isn't deallocated in some of the init_interp code)
…porting Land use change version 1 The patch-level land use labels are extended from their prior values of only primary or secondary lands to also include pasture, rangeland, and crops. Land use change in FATES is treated as a disturbance rate (in area/time units) from existing patches with a given land use label to new patches with the new land use label. Thus a fourtg distinct type of disturbances is added to the existing treefall, fire, and logging types. The driving data for this run mode is from the Land Use Harmonization 2 state and transition datasets. The workflow tool for processing this input was previously developed with pull request ESCOMP#1032.
This was noticed in looking at #1010. Some of the memory allocated in running init_interp is NOT deallocated afterwards. For example, there are local pointer's that allocate memory that should become allocatable so that memory will be deallocated after it goes out of scope. This is in init_interp.F90.
The text was updated successfully, but these errors were encountered: