From 6ea5d76d431b5a8687a15453dc4758cf14b715c9 Mon Sep 17 00:00:00 2001 From: Brelle Emmanuel Date: Wed, 8 Oct 2025 17:49:00 +0200 Subject: [PATCH] [MPI_Intercomm_create] Peer_comm intercommunicator is now allowed Signed-off-by: Brelle Emmanuel --- ompi/communicator/comm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ompi/communicator/comm.c b/ompi/communicator/comm.c index ffa990854f2..ce51aa7336a 100644 --- a/ompi/communicator/comm.c +++ b/ompi/communicator/comm.c @@ -27,6 +27,7 @@ * Copyright (c) 2018-2025 Triad National Security, LLC. All rights * reserved. * Copyright (c) 2023-2025 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (c) 2025 BULL S.A.S. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -1674,11 +1675,11 @@ int ompi_intercomm_create (ompi_communicator_t *local_comm, int local_leader, om /* remember that the remote_leader and bridge_comm arguments just have to be valid at the local_leader */ if ( local_rank == local_leader ) { - if (ompi_comm_invalid (bridge_comm) || (bridge_comm->c_flags & OMPI_COMM_INTER)) { + if (ompi_comm_invalid (bridge_comm) ) { return MPI_ERR_COMM; } - if ((remote_leader < 0) || (remote_leader >= ompi_comm_size(bridge_comm))) { + if ( ompi_comm_peer_invalid( bridge_comm, remote_leader) ) { return OMPI_ERR_BAD_PARAM; } } /* if ( local_rank == local_leader ) */