通常当我使用mpirun时,我可以"超载"它,使用的处理器比我的计算机上的处理器多.例如,在我的四核mac上,我可以运行mpirun -np 29 python -c "print 'hey'"没问题.我现在在另一台机器上,这会引发以下错误:
$ mpirun -np 25 python -c "print 'hey'"
--------------------------------------------------------------------------
There are not enough slots available in the system to satisfy the 25 slots
that were requested by the application:
python
Either request fewer slots for your application, or make more slots available
for use.
--------------------------------------------------------------------------
Run Code Online (Sandbox Code Playgroud)
为什么不"超频"mpirun在这里工作?有没有办法可以克服此错误消息并使用比可用处理器更多的处理器成功运行?
小智 33
显然可以通过mpirun使用"--oversubscribe"选项获得超额订阅 - 使用扭矩/毛伊为我做了诀窍
Har*_*ald 15
根据https://www.open-mpi.org/faq/?category=running#oversubscribing,您可以使用主机文件超额订阅您的节点.在继续之前,请注意这样会严重降低节点的性能.此外,如果用于运行应用程序的系统使用队列系统,则可能无效.
首先创建一个包含的宿主文件(名为hostfile)
localhost slots=25
Run Code Online (Sandbox Code Playgroud)
简单地运行您的应用程序
mpirun --hostfile hostfile -np 25 python -c "print 'hey'"
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
21602 次 |
| 最近记录: |