Boost.MPI/Boost.Interprocess - 如何检测进程是否在同一台机器上运行?
所以我使用 boost.mpi 在集群中的 2 台机器上运行我的应用程序,每台机器有 8 个核心。所以我启动了 16 个进程。我想知道我的进程如何找出运行在我的哪些集群上?如何以某种方式为机器命名并保存它们?
So I use boost.mpi to run my app on 2 machine in a cluster, each has 8 cores.so I get 16 processes startedd. I wonder how my processes can find out on which of my clusters thay are ran? How thay somehow make names to machinesand save them?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看Boost.MPI环境的
processor_name
方法:http://www.boost.org/doc/libs/1_48_0/doc/html/boost/mpi/environment.html#id473071-bb。您可以比较这些(取决于您的底层 MPI 实现)以了解每个主机上的排名。Look at the
processor_name
method of the Boost.MPI environment: http://www.boost.org/doc/libs/1_48_0/doc/html/boost/mpi/environment.html#id473071-bb. You can likely compare those (depending on your underlying MPI implementation) to know which ranks are on each host.