TRIQS / triqs

a Toolbox for Research on Interacting Quantum Systems
https://triqs.github.io
GNU General Public License v3.0
139 stars 72 forks source link

use poll barrier in python to reduce CPU load per default as done in the C++ mpi layer #845

Closed the-hampel closed 2 years ago

the-hampel commented 2 years ago

same poll barrier implementation as in the C++ layer in triqs. Reduces CPU load on waiting MPI ranks drastically. Default wait time is 1 msec as in the C++ implementation. passing 0.0 or None to the barrier function call will use the default mpi.barier() call of mpi4py. I added a very brief test in one of the few mpi enabled python tests to check the function and cleaned up a few white spaces.

the-hampel commented 2 years ago

thanks! Yes I changed the name of the variable midway to make it more consistent with the C++ part and forgot to change the doc string...