Skip to content

Commit

Permalink
fix ready
Browse files Browse the repository at this point in the history
  • Loading branch information
TApplencourt committed Aug 20, 2024
1 parent 275e038 commit b726002
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion xprof/sync_daemon_mpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,12 @@ int signal_loop(int parent_pid, MPI_Comm MPI_COMM_WORLD_THAPI, MPI_Comm MPI_COMM
} else if (signum == RT_SIGNAL_GLOBAL_BARRIER) {
// Non local master are not participing to the barrier
if (local_rank != 0)
kill(parent_pid, RT_SIGNAL_READY);
continue;
// Local master who are not the global master, send a message
if (global_rank != 0) {
MPI_Send(&local_size, 1, MPI_INT, 0, 0, MPI_COMM_WORLD_THAPI);
kill(parent_pid, RT_SIGNAL_READY);
continue;
}
// Global Master wait until receiving messages from all local masters.
Expand All @@ -123,10 +125,11 @@ int signal_loop(int parent_pid, MPI_Comm MPI_COMM_WORLD_THAPI, MPI_Comm MPI_COMM
MPI_STATUS_IGNORE);
sum_local_size_recv += local_size_recv;
}
kill(parent_pid, RT_SIGNAL_READY);
} else if (signum == RT_SIGNAL_LOCAL_BARRIER) {
MPI_Barrier(MPI_COMM_NODE);
kill(parent_pid, RT_SIGNAL_READY);
}
kill(parent_pid, RT_SIGNAL_READY);
}
return 0;
}
Expand Down

0 comments on commit b726002

Please sign in to comment.