@@ -307,15 +307,16 @@ void MPMesh::reconstructSlices() {
307307 pumipic::RecordTime (" PolyMPO_Reconstruct" , timer.seconds ());
308308}
309309
310- bool getAnyIsMigrating (bool isMigrating) {
310+ bool getAnyIsMigrating (MaterialPoints* p_MPs, bool isMigrating) {
311311 Kokkos::Timer timer;
312+ MPI_Comm comm = p_MPs->getMPIComm ();
312313 int comm_rank;
313- MPI_Comm_rank (MPI_COMM_WORLD , &comm_rank);
314+ MPI_Comm_rank (comm , &comm_rank);
314315 int comm_size;
315- MPI_Comm_size (MPI_COMM_WORLD , &comm_size);
316+ MPI_Comm_size (comm , &comm_size);
316317
317318 bool anyIsMigrating = false ;
318- MPI_Allreduce (&isMigrating, &anyIsMigrating, 1 , MPI_C_BOOL, MPI_LOR, MPI_COMM_WORLD );
319+ MPI_Allreduce (&isMigrating, &anyIsMigrating, 1 , MPI_C_BOOL, MPI_LOR, comm );
319320 pumipic::RecordTime (" PolyMPO_getAnyIsMigrating" , timer.seconds ());
320321 return anyIsMigrating;
321322}
@@ -333,7 +334,7 @@ void MPMesh::push(){
333334 p_MPs->updateMPSlice <MPF_Cur_Pos_XYZ, MPF_Tgt_Pos_XYZ>(); // Tgt_XYZ becomes Cur_XYZ
334335 p_MPs->updateMPSlice <MPF_Cur_Pos_Rot_Lat_Lon, MPF_Tgt_Pos_Rot_Lat_Lon>(); // Tgt becomes Cur
335336 if (elm2Process.size () > 0 )
336- anyIsMigrating = getAnyIsMigrating (p_MPs->migrate ());
337+ anyIsMigrating = getAnyIsMigrating (p_MPs, p_MPs ->migrate ());
337338 else
338339 p_MPs->rebuild (); // rebuild pumi-pic
339340 p_MPs->updateMPElmID (); // update mpElm IDs slices
0 commit comments