💻 Add a repartition flag to resume using manual h4 files#721
Merged
Conversation
cbgeo
requested changes
Sep 29, 2021
Codecov Report
@@ Coverage Diff @@
## develop #721 +/- ##
===========================================
- Coverage 96.77% 96.75% -0.02%
===========================================
Files 130 130
Lines 25920 25932 +12
===========================================
+ Hits 25083 25090 +7
- Misses 837 842 +5
Continue to review full report at Codecov.
|
cbgeo
approved these changes
Sep 29, 2021
jgiven100
approved these changes
Sep 29, 2021
Collaborator
jgiven100
left a comment
There was a problem hiding this comment.
bool flag seems like a simple (and non-breaking) fix for this
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.
Describe the PR
When using a manually written particles HDF5 files and resuming from step 0, it will typically call
mesh_->resume_domain_cell_ranks()which then assigns the current MPI_RANK to the cell if the cell has particles in it. This works on the assumption that the current cell has particles only on the current rank - which is true when generated using our MPM code, but not for particles generated manually and written to HDF5 file. When particles are distributed across different MPI ranks for the same cell, MPI_Reduce will result in MPI_RANK larger than the MPI_SIZE (bad!) - assigning to a different MPI rank as long as it's within MPI_SIZE is bad for efficiency, which will be resolved in the subsequent step.This PR adds a boolean flag called
repartition: truetoresumeJSON to enable repartitioning when resuming from a HDF5 file. This is an optional flag which is set to false.Additional context
Input file change: