Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

coll: Get an MPI comm only if needed #126

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/internal/coll_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,10 @@ OSHMPI_STATIC_INLINE_PREFIX void OSHMPI_broadcast(void *dest, const void *source
MPI_Datatype mpi_type, int PE_root, int PE_start,
int logPE_stride, int PE_size)
{
MPI_Comm comm = MPI_COMM_NULL;

coll_acquire_comm(PE_start, logPE_stride, PE_size, &comm);

/* Special path: directly use MPI_Bcast if root is included in active set */
if (coll_check_root_in_active_set(PE_root, PE_start, logPE_stride, PE_size)) {
MPI_Comm comm = MPI_COMM_NULL;
coll_acquire_comm(PE_start, logPE_stride, PE_size, &comm);
OSHMPI_am_progress_mpi_bcast(PE_root ==
OSHMPI_global.team_world_my_pe ? (void *) source : dest,
nelems, mpi_type, PE_root, comm);
Expand Down