防止MPI忙循环 [英] Prevent MPI from busy looping

查看:156
本文介绍了防止MPI忙循环的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个MPI程序,该程序超额预订/超额使用其处理器.那就是:进程比处理器多得多.

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?"

              b&b ; rel ="noreferrer">

                                      

我同时使用Intel MPI和OpenMPI(用于不同的计算机).我怎么能说服他们两者不要忙于循环?

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

我的快速而又肮脏的解决方案是在带有睡眠命令的循环中使用MPI_Iprobe(请参见此处)

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

推荐答案

已经有人问了,但这已经

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)

除此之外,如果您的MPI进程正在MPI屏障中等待,则可以设置I_MPI_WAIT_MODE = 1来防止INTEL的MPI中的繁忙循环.有关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.

这篇关于防止MPI忙循环的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆