简体   繁体   English

Microsoft MPI中的-bind-to命令

[英]The -bind-to command in Microsoft MPI

On Ubuntu with Open MPI installed, I can use -bind-to command to bind each of the processes to a physical core like mpiexec -np 4 -bind-to core python mycode.py . 在安装了Open MPI的Ubuntu上,我可以使用-bind-to命令将每个进程绑定到物理核心,例如mpiexec -np 4 -bind-to core python mycode.py Now I have to work on Windows with MS-MPI installed, I don't know if there is a similar function. 现在我必须在装有MS-MPI的Windows上工作,我不知道是否有类似的功能。

I have tried to use -affinity and -affinity_layout according to this page like 我曾尝试根据此页面使用-affinity和-affinity_layout

mpiexec -np 4 -affinity -affinity_layout spread:P python mycode.py

which is supposed to raising error on my 2 physical cores laptop. 这应该引起我的2个物理核心笔记本电脑上的错误。 But it works fine. 但这很好。 Do you have any ideas? 你有什么想法?

Affinity with Microsoft MPI does work; 与Microsoft MPI的关联性确实有效; Microsoft MPI just does not complain when multiple ranks land at a single core (ie when you oversubscribe). 当多个等级落在一个核心上时(即,当您超额预订时),Microsoft MPI不会抱怨。

One can find the affinities of running processes in "Task Manager > Details > (right click on process) > Set affinity". 可以在“任务管理器>详细信息>(右键单击进程)>设置关联性”中找到正在运行的进程的关联性。

So, on my 10-core machine, running 因此,在我的10核计算机上,运行

mpiexec -n 2 -affinity -affinity_layout spread:P notepad.exe

produces affinities 产生亲和力

rank | 0 | 1 |
CPU  | 0 | 5 |

while running 在跑步的时候

mpiexec -n 11 -affinity -affinity_layout spread:P notepad.exe

results in 结果是

rank | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
CPU  | 0 | 5 | 1 | 6 | 2 | 7 | 3 | 8 | 4 | 9 | 0  |

ie, the mapping silently wraps around when all cores are exhausted. 也就是说,当所有核心耗尽时,映射会默默地回绕。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM