Skip to content

Commit 4fb6da1

Browse files
author
Alessandro Fanfarillo
committed
Using MPI_Comm_revoke
1 parent f607483 commit 4fb6da1

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/mpi/mpi_caf.c

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -534,8 +534,6 @@ PREFIX (finalize) (void)
534534
MPI_Win_sync(*stat_tok);
535535

536536
completed = 1;
537-
MPIX_Comm_revoke(CAF_COMM_WORLD);
538-
MPI_Barrier(stopped_comm);
539537

540538
while (caf_static_list != NULL)
541539
{
@@ -563,8 +561,16 @@ PREFIX (finalize) (void)
563561
MPI_Info_free (&mpi_info_same_size);
564562
#endif // MPI_VERSION
565563

566-
MPI_Comm_free(&CAF_COMM_WORLD);
564+
//MPI_Comm_free(&CAF_COMM_WORLD);
565+
566+
printf("Before revoke\n");
567567

568+
MPIX_Comm_revoke(CAF_COMM_WORLD);
569+
printf("After revoke\n");
570+
MPI_Test(&stopped_req,&flag,MPI_STATUS_IGNORE);
571+
communicator_shrink(&stopped_comm);
572+
MPI_Barrier(stopped_comm);
573+
printf("After barrier\n");
568574
/* Only call Finalize if CAF runtime Initialized MPI. */
569575
if (caf_owns_mpi) {
570576
MPI_Finalize();
@@ -844,7 +850,7 @@ PREFIX (sync_memory) (int *stat, char *errmsg, int errmsg_len)
844850
void
845851
PREFIX (sync_all) (int *stat, char *errmsg, int errmsg_len)
846852
{
847-
int ierr=0;
853+
int ierr=0,flag=0;
848854

849855
/* if(error_called == 1) */
850856
/* { */

0 commit comments

Comments
 (0)