OpenMPI运行问题:enough slots available in the system

版本: Open MPI 3.0.1

编译好可执行的C语言程序后,使用 mpirun -np 3 Test 命令,发现没有正常运行,而是报错:

There are not enough slots available in the system to satisfy the 3 slots
that were requested by the application:
/home/~/xxx

Either request fewer slots for your application, or make more slots available
for use.

在我之前运行的机器上开10个进程也没问题啊,安装步骤也一致,后来一想不对,如果CPU配置的不同,可能能支持的性能也不同。

果然发现机器1有24个processors,出问题的机器有 2 个processors, - - !!

采用“把好的玩成坏的”的方式,把机器一多次改变进程数运行,发现改到25就会报这个错。

也就是说,Open MPI 会估算我们的CPU承载能力,用一定算法计算出进程的上限。

当然,也可以使用 --oversubscribe 参数去超出上限个数运行,不过参考文档上说明了,不建议这样做,会有未定义行为 - - !!

posted @ 2018-04-10 17:25  HelloWooo  阅读(5537)  评论(0编辑  收藏  举报