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

New poll_barrier as alternative to mpi.barrier #7

Merged
merged 1 commit into from
May 3, 2021

Conversation

the-hampel
Copy link
Member

@the-hampel the-hampel commented Apr 29, 2021

MPI_Barrier produces 100% CPU load on waiting mpi ranks. As an
alternative one can combine a non blocking MPI_IBarrier with MPI_Test
each X milliseconds to only check every so often if all ranks reached
the barrier. Already X=100msec reduces the CPU load below 1% load,
making it possible to use the rank for other tasks in MPI / OpenMP
hybrid settings, or allowing more efficient thermal use of the CPU.

Thanks to A. Pataki for helping!

Changes:

  • implement function barrier(msec) to check only each msec the
    barrier
  • new default barrier function -> 0msec as polling freq. calls normal MPI_Barrier
  • default value for polling is 10msec
  • add test mpi_barrier.cpp

MPI_Barrier produces 100% CPU load on waiting mpi ranks. As an
alternative one can combine a non blocking MPI_IBarrier with MPI_Test
each X milliseconds to only check every so often if all ranks reached
the barrier. Already X=10msec reduces the CPU load below 1% load,
making it possible to use the rank for other tasks in MPI / OpenMP
hybrid settings, or allowing more efficient thermal use of the CPU.

Thanks to A. Pataki for helping!

Changes:

- implement function barrier(msec) to check only each msec the barrier
- is now the new default barrier function with msec=1 as default
- setting 0 msec as polling freq. the function calls normal MPI_Barrier
- add test mpi_barrier.cpp
@Wentzell Wentzell merged commit 78083c8 into TRIQS:unstable May 3, 2021
@Wentzell
Copy link
Member

Wentzell commented May 3, 2021

Thank you @the-hampel for adding this!

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

Successfully merging this pull request may close these issues.

2 participants