【问题标题】:MPI - Partition processors so that one program runs on N processors and the other on M processorsMPI - 对处理器进行分区,以便一个程序在 N 个处理器上运行,另一个在 M 个处理器上运行
【发布时间】:2021-11-16 02:58:45
【问题描述】:

如何使用 MPI 配置程序,以便将处理器总数分成 M 个组。

例如使用如下命令:

mpirun -np 4 ./a.out

在如下所示的文件树中,所有 *.out 文件都配置为使用 MPI 运行

a.out
b.out
c.out

在程序内:

Processors 0 and 1 -> ./b.out
Processors 2 and 3 -> ./c.out

【问题讨论】:

  • 您有两个进程在运行b.out 和两个c.out。那么a.out 会在哪里?你想启动那个程序,但没有人在运行它?
  • 尝试 MPMD 语法:mpirun -np 2 ./b.out : -np 2 ./c.out。另一种选择是构建单个二进制文件(可以说是 b.outc.out 子例程)和 MPI_Comm_split() 并调用适当的子例程。
  • @VictorEijkhout 用户调用./a.out - ./b.out./c.out 也可以视为用户不能直接调用的库
  • @GillesGouaillardet 我不熟悉MPI_Comm_split() 你能举个例子吗?

标签: mpi


【解决方案1】:

看看这个。 https://eli.thegreenplace.net/2016/c11-threads-affinity-and-hyperthreading/

线程关联可以帮助您。基本上将某些等级分配给某些核心。

【讨论】:

  • 恐怕没有回答问题。
猜你喜欢
  • 2012-05-06
  • 2010-11-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-09-29
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多