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

comex msg collectives should not do comex_barrier #326

Open
jeffhammond opened this issue May 31, 2024 · 0 comments
Open

comex msg collectives should not do comex_barrier #326

jeffhammond opened this issue May 31, 2024 · 0 comments
Assignees

Comments

@jeffhammond
Copy link
Member

In the original ARMCI source code, ARMCI msg collectives were equivalent to MPI when MPI was used.

In ARMCI (armci/src/collectives/message.c):

void parmci_msg_barrier()
{
#ifdef BGML
  bgml_barrier (3); /* this is always faster than MPI_Barrier() */
#elif defined(MSG_COMMS_MPI)
     MPI_Barrier(ARMCI_COMM_WORLD);
#  elif defined(PVM)
     pvm_barrier(mp_group_name, armci_nproc);
#  elif defined(LAPI)
#if !defined(NEED_MEM_SYNC)
     if(_armci_barrier_init)
       _armci_msg_barrier();
     else
#endif
     {
       tcg_synch(ARMCI_TAG);
     }
#  else
     {
        tcg_synch(ARMCI_TAG);
     }
#  endif
}

Now, in Comex (comex/src-armci/message.c):

void parmci_msg_barrier()
{
    comex_barrier(ARMCI_Default_Proc_Group);
    MPI_Barrier(get_default_comm());
}

comex_barrier is an expensive O(n) operation. It is a nontrivial overhead to add to parmci_msg_barrier, particularly since the most common use of this operation in GA is immediately after ARMCI_AllFence, which does all of the synchronization that comex_barrier does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant