From 1c94a4ab97e77d7b1ebb8422b4386780f1f4419a Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Wed, 5 May 2021 15:37:20 -0400 Subject: [PATCH] Fix base/aligned_vector_replicate_03.mpirun=3.release --- include/deal.II/base/aligned_vector.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/deal.II/base/aligned_vector.h b/include/deal.II/base/aligned_vector.h index 96c0199537..6f0eddc8b0 100644 --- a/include/deal.II/base/aligned_vector.h +++ b/include/deal.II/base/aligned_vector.h @@ -1553,6 +1553,10 @@ AlignedVector::replicate_across_communicator(const MPI_Comm & communicator, used_elements_end = elements.get() + array_size; allocated_elements_end = used_elements_end; + // Make sure that the shared memory host has copied the data before we try to + // access it. + MPI_Barrier(shmem_group_communicator); + // **** Consistency check **** // At this point, each process should have a copy of the data. // Verify this in some sort of round-about way -- 2.39.5