Skip to content

Commit

Permalink
Added some MPI barriers for safety
Browse files Browse the repository at this point in the history
  • Loading branch information
adaell committed Sep 19, 2023
1 parent 6c86f7d commit 3a1955f
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions oxley/src/Brick.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 3a1955f

Please sign in to comment.