triqs.utility.mpi_mpi4py.barrier
- triqs.utility.mpi_mpi4py.barrier(poll_msec=1)[source]
Synchronisation barrier that yields the CPU while waiting.
Uses a non-blocking
mpi4py.MPI.Comm.Ibarrier()followed by atime.sleep()loop on itsTest(), so that subprocesses invoked by the user (e.g. solvers running outside Python) can use the otherwise idle CPU. Whenpoll_msecis falsy (0orNone), falls back to the standard blockingmpi4py.MPI.Comm.barrier().- Parameters:
- poll_msecfloat, optional
Sleep duration in milliseconds between successive
Test()calls. Default 1.