Skip to content

ALE_Finite_Strain_Plasticity: fix MPI aborts from writing into ghosted vectors - #255

Merged
marcfehling merged 2 commits into
dealii:masterfrom
maieneuro:master
Jul 6, 2026
Merged

ALE_Finite_Strain_Plasticity: fix MPI aborts from writing into ghosted vectors#255
marcfehling merged 2 commits into
dealii:masterfrom
maieneuro:master

Conversation

@maieneuro

Copy link
Copy Markdown
Contributor

Summary

Under MPI, the ALE_Finite_Strain_Plasticity example aborted during time
stepping with the deal.II assertion !has_ghost_elements(). The cause was
several places that wrote arithmetic results directly into
previous_deformation, which is a vector with ghost entries and therefore
read-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_deformation remained:

    • mesh_motion: previous_deformation = current_increment; *= -1;
    • thermal: previous_deformation += current_increment;

    Both are now expressed as named NewtonStepSystem member functions
    (add_current_increment_to_previous_deformation() and
    set_previous_deformation_to_negative_current_increment()) that perform the
    arithmetic 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 2 with no ghost-element assertions.

bangerth and others added 2 commits July 3, 2026 17:16
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.
@bangerth

bangerth commented Jul 4, 2026

Copy link
Copy Markdown
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?

@marcfehling

Copy link
Copy Markdown
Member

Thank you all! The patch runs on my machine in parallel. I will go ahead and merge.

@marcfehling
marcfehling merged commit 220e0f6 into dealii:master Jul 6, 2026
5 checks passed
@marcfehling marcfehling mentioned this pull request Jul 6, 2026
33 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants