Open large SCRIP grids lazily in every tool, not just subset_bbox - #152
Merged
Merged
Conversation
Only remote_subset_bbox_plot passed chunks=, so inspect_mesh, calculate_area, plot_mesh and grid_facts still opened a 63 GB np4 SCRIP grid eagerly and died on the worker -- inspect_mesh is the call that actually failed. Inline the same size guard and chunks="auto" in all five, since this module cannot share helpers: Globus Compute ships each function body and closures over module-level helpers do not survive serialization. Five hand-copies is what test_worker_payload_drift.py exists for, so add two checks to it: every copy refuses at the same threshold, and any function carrying the guard passes **open_kwargs to open_grid. The second matters because the guard only estimates and refuses; chunks= is what keeps the file in memory, and dropping it while keeping the refusal would OOM on every file under the threshold while looking guarded. Both verified to fail when the copies are made to disagree. The remap paths keep their eager opens: weight generation materializes the grid anyway and that path is not tested here.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follows #149.
Overview
Only
remote_subset_bbox_plotpassedchunks=, soinspect_mesh,calculate_area,plot_meshandgrid_factsstill opened a 63 GB np4 SCRIP grid eagerly and died on the worker —inspect_meshis the call that actually failed. The size guard andchunks="auto"are now inlined in all five; this module cannot share helpers, since Globus Compute ships each function body and closures over module-level helpers do not survive serialization.Five hand-copies is what
test_worker_payload_drift.pyexists for, so it gains two checks: every copy refuses at the same threshold, and any function carrying the guard passes**open_kwargstoopen_grid. The second matters because the guard only estimates and refuses —chunks=is what keeps the file in memory, so dropping it while keeping the refusal would OOM on every file under the threshold while looking guarded. Both were verified to fail when the copies are made to disagree.Needs UXARRAY/uxarray#1775 on the worker to have any effect; the remap paths keep their eager opens deliberately, since weight generation materializes the grid anyway.