From 3a1955f5625cab108ead5a8f8e3540bd823e5e26 Mon Sep 17 00:00:00 2001 From: "Adam J. Ellery" Date: Tue, 19 Sep 2023 14:10:05 +1000 Subject: [PATCH] Added some MPI barriers for safety --- oxley/src/Brick.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/oxley/src/Brick.cpp b/oxley/src/Brick.cpp index 700285ba92..6aba8029da 100644 --- a/oxley/src/Brick.cpp +++ b/oxley/src/Brick.cpp @@ -1321,17 +1321,41 @@ void Brick::updateMesh() oxleytimer.toc("Brick::updateMesh ..."); oxleytimer.toc("\t balancing..."); p8est_balance_ext(p8est, P8EST_CONNECT_FULL, init_brick_data, refine_copy_parent_octant); + #ifdef ESYS_MPI + MPI_Barrier(m_mpiInfo->comm); + #endif + oxleytimer.toc("\t partitioning..."); bool partition_for_coarsening = true; p8est_partition_ext(p8est, partition_for_coarsening, NULL); + #ifdef ESYS_MPI + MPI_Barrier(m_mpiInfo->comm); + #endif + oxleytimer.toc("\t destroying old ghost..."); p8est_ghost_destroy(ghost); + #ifdef ESYS_MPI + MPI_Barrier(m_mpiInfo->comm); + #endif + oxleytimer.toc("\t creating new ghost..."); ghost = p8est_ghost_new(p8est, P8EST_CONNECT_FULL); + #ifdef ESYS_MPI + MPI_Barrier(m_mpiInfo->comm); + #endif + oxleytimer.toc("\t destroying old lnodes..."); p8est_lnodes_destroy(nodes); + #ifdef ESYS_MPI + MPI_Barrier(m_mpiInfo->comm); + #endif + oxleytimer.toc("\t creating new lnodes..."); nodes = p8est_lnodes_new(p8est, ghost, 1); + #ifdef ESYS_MPI + MPI_Barrier(m_mpiInfo->comm); + #endif + // addition information oxleytimer.toc("\t updating node increments");