ALE_Finite_Strain_Plasticity: fix MPI aborts from writing into ghosted vectors - #255
Merged
Conversation
Following the fixes in the previous commit, two more places wrote directly into 'previous_deformation', which is a vector with ghost entries and therefore read-only: * mesh_motion: previous_deformation = current_increment; *= -1; * thermal: previous_deformation += current_increment; Under MPI these triggered the deal.II assertion "!has_ghost_elements()" during time stepping. Both operations are now expressed as named member functions on NewtonStepSystem (add_current_increment_to_previous_deformation() and set_previous_deformation_to_negative_current_increment()) that carry out the arithmetic in fully-distributed temporary vectors and only assign the result back into the ghosted vector, which performs the ghost-value communication. advance_time() now reuses the first of these, removing the duplicated update block. Verified: builds cleanly and runs to completion (all 80 time steps) under mpirun -np 2 with no ghost-element assertions.
Member
|
Thanks for making my commit nicer by introducing the helper functions. @marcfehling Since I wrote one of the commits, would you care to look this over and merge? |
Member
|
Thank you all! The patch runs on my machine in parallel. I will go ahead and merge. |
33 tasks
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.
Summary
Under MPI, the ALE_Finite_Strain_Plasticity example aborted during time
stepping with the deal.II assertion
!has_ghost_elements(). The cause wasseveral places that wrote arithmetic results directly into
previous_deformation, which is a vector with ghost entries and thereforeread-only.
This PR fixes all such writes so the example builds cleanly and runs to
completion under MPI.
Changes
Fix two places where we modify a ghosted vector (6c6caa3): initial
fix for the ghosted-vector writes surfaced by the assertion.
Fix remaining ghosted-vector writes (b135642): two further writes into
previous_deformationremained:mesh_motion:previous_deformation = current_increment; *= -1;thermal:previous_deformation += current_increment;Both are now expressed as named
NewtonStepSystemmember functions(
add_current_increment_to_previous_deformation()andset_previous_deformation_to_negative_current_increment()) that perform thearithmetic in fully-distributed temporary vectors and only assign the result
back into the ghosted vector, which triggers the ghost-value communication.
advance_time()reuses the first of these, removing a duplicated update block.Verification
Builds cleanly and runs to completion (all 80 time steps) under
mpirun -np 2with no ghost-element assertions.