post_process: extract shared Lagrangian-bubble restart-header read (and name the 5x disp offset)#1525
Closed
lvupupui wants to merge 1 commit into
Closed
Conversation
Extract the byte-identical MPI-IO restart-header read block from s_write_lag_bubbles_results_to_text and s_write_lag_bubbles_to_formatted_database_file into a new s_read_lag_restart_header subroutine. Also consolidates the base header-offset expression (5\xc3\x97 copies reduced to 1\xc2\xb9 in the shared helper + 3\xc2\xb9 remaining in divergent code, vs 5\xc2\xb9 before). The new helper opens the restart file on MPI_COMM_SELF, reads file_tot_part / file_time / file_dt / file_num_procs, broadcasts, allocates proc_bubble_counts, then reopens/reads/broadcasts the per-proc counts. Risk is low: input-side code motion of an identical block; downstream output logic is unchanged. 1\xc2\xb9 approximate counts after the patch.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1525 +/- ##
==========================================
- Coverage 60.64% 60.62% -0.02%
==========================================
Files 73 73
Lines 20213 20198 -15
Branches 2936 2933 -3
==========================================
- Hits 12259 12246 -13
- Misses 5966 5967 +1
+ Partials 1988 1985 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Closes #1519
Extracts the byte-identical MPI-IO restart-header read block (lines 750–777 / 909–936 of the original file) shared by
s_write_lag_bubbles_results_to_textands_write_lag_bubbles_to_formatted_database_fileinto a news_read_lag_restart_headersubroutine.Also consolidates the 5× duplicated
dispoffset expression: the base form is now computed once inside the helper, keeping only 3 copies of the extended form in divergent code paths.