Skip to content

Check schemes for unused variables and variables that can be conditionally allocated depending on a flag #1150

@grantfirl

Description

@grantfirl

Description

Recently, a PR came through (#1148) that added new functionality to an existing scheme that needed many more domain-spanning variables to function (i.e. had horizontal and vertical dimension). Since the new functionality is guarded by a logical flag, it would be straightforward to conditionally allocate variables used in this new, optional functionality, both locally in the scheme, and in the host. In order to reduce the memory footprint, it would be beneficial to go through ALL schemes and check for instances like this where memory can be reduced when certain flags are not set.

Solution

Make local variables allocatable as necessary and only allocate if they are actually used, both locally in schemes and in the host.

Related to

#1148

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions