Prevent MPI from busy looping

人走茶凉 提交于 2019-12-04 00:59:23

问题


I have an MPI program which oversubscribes/overcommits its processors. That is: there are many more processes than processors.

Only a few of these processes are active at a given time, though, so there shouldn't be contention for computational resources.

But, much like the flock of seagulls from Finding Nemo, when those processes are waiting for communication they're all busy-looping, asking "Mine? Mine? Mine?"

                                      

I am using both Intel MPI and OpenMPI (for different machines). How can I convince them both not to busy loop?

My quick and dirty solution has been to use MPI_Iprobe in a loop with a sleep command (see here).


回答1:


Its a been a while since this has been asked but this post may have the answer you're looking for. (tl;dr pass --mca mpi_yield_when_idle 1 as a parameter to mpirun if you're using OpenMPI)

Other than that, if your MPI processes are waiting at MPI Barriers, you can set the I_MPI_WAIT_MODE=1 to prevent the busy loop in INTEL's MPI. for OpenMPI, see linked post.



来源:https://stackoverflow.com/questions/37078753/prevent-mpi-from-busy-looping

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!