Review MODE implementation to look for more computational efficiencies #2727
Labels
alert: NEED ACCOUNT KEY
Need to assign an account key to this issue
alert: NEED CYCLE ASSIGNMENT
Need to assign to a release development cycle
component: code optimization
Code optimization issue
MET: Object Verification
Object-based feature Verification
priority: medium
Medium Priority
type: enhancement
Improve something that it is currently doing
Milestone
Describe the Enhancement
Issue #2724 and corresponding PR #2726 enhance MODE in MET-12.0.0-beta2 by improving its convolution algorithm, adding OpenMP, and minimizing avoidable memory allocation. This issue to conduct a careful review of the rest of the MODE application and associated library code to look for additional potential efficiencies.
Some ideas to consider are copied below from this issue comment:
ShapeData::n_objects()
function calls split which loops over the entire grid and can be slow. Could eliminate calls ton_objects()
or remove that function entirely to prevent its use.DataPlane::get(x,y)
which callstwo_to_one()
which performs a bounds check. Can they replaced with direct operation on the vector ofData
? Or can they be replaced with a new accessor function that skips the bounds checking? Running @DanielAdriaansen test case with 75 tiny objects through a profiler, 50% of the ~10 min runtime is spent accessing data.ModeFrontEnd::create_multivar_simple_objects()
andModeFrontend::create_multivar_merge_objects()
. Instead the data should be kept in memory when creating the simple objects and accessed when creating the merge objects.Time Estimate
2 days?
Sub-Issues
Consider breaking the enhancement down into sub-issues.
Relevant Deadlines
List relevant project deadlines here or state NONE.
Funding Source
Define the source of funding and account keys here or state NONE.
Define the Metadata
Assignee
Labels
Milestone and Projects
Define Related Issue(s)
Consider the impact to the other METplus components.
Expect no impacts.
Enhancement Checklist
See the METplus Workflow for details.
Branch name:
feature_<Issue Number>_<Description>
Pull request:
feature <Issue Number> <Description>
Select: Reviewer(s) and Development issue
Select: Milestone as the next official version
Select: MET-X.Y.Z Development project for development toward the next official release
The text was updated successfully, but these errors were encountered: