Skip to content

Commit

Permalink
ompi/communicator: fix typos in CID generation
Browse files Browse the repository at this point in the history
use MPI_MIN instead of MPI_MAX when appropriate, otherwise
a currently used CID can be reused, and bad things will likely happen.

Refs open-mpi#2061
  • Loading branch information
ggouaillardet authored and bosilca committed Sep 15, 2016
1 parent 60cb33b commit cda8a04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ompi/communicator/comm_cid.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ static int ompi_comm_checkcid (ompi_comm_request_t *request)

++context->iter;

ret = context->allreduce_fn (&context->flag, &context->rflag, 1, MPI_MAX, context, &subreq);
ret = context->allreduce_fn (&context->flag, &context->rflag, 1, MPI_MIN, context, &subreq);
if (OMPI_SUCCESS == ret) {
ompi_comm_request_schedule_append (request, ompi_comm_nextcid_check_flag, &subreq, 1);
}
Expand Down Expand Up @@ -478,7 +478,7 @@ int ompi_comm_activate_nb (ompi_communicator_t **newcomm, ompi_communicator_t *c
/* Step 1: the barrier, after which it is allowed to
* send messages over the new communicator
*/
ret = context->allreduce_fn (&context->ok, &context->ok, 1, MPI_MAX, context,
ret = context->allreduce_fn (&context->ok, &context->ok, 1, MPI_MIN, context,
&subreq);
if (OMPI_SUCCESS != ret) {
ompi_comm_request_return (request);
Expand Down

0 comments on commit cda8a04

Please sign in to comment.