MPI通过slurm结合秩与特定节点
我使用 sbatch 来分配具有(比方说)8 个等级的 MPI 作业。 我使用 4 个节点:node0[01-04]
。 我想将排名 0 绑定到第一个节点 (node001
),将其他排名绑定到其他节点 (node0[02-04]
)。 使用 sbatch 如何完成?
谢谢你!
I use sbatch to allocate an MPI job with (let's say) 8 ranks.
I use 4 nodes: node0[01-04]
.
I would like to bind rank 0 to the first node (node001
) and the other ranks to the other nodes (node0[02-04]
).
How can it be done using sbatch?
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请参阅 https://slurm.schedmd.com/sbatch.html 环境变量
SLURM_NODEID 将为您提供分配中节点的 ID
SLURM_NNODES 将为您提供分配的节点总数。
如果您想具体确保节点的顺序与排名匹配,您还需要进行解析。
SLURM_JOB_NODELIST
See https://slurm.schedmd.com/sbatch.html environment variables
SLURM_NODEID will give you the ID of the node in the allocation
SLURM_NNODES will give you the total amount of nodes allocated.
If you want to specific about ensuring the order of the nodes matches the rank you will also need to parse.
SLURM_JOB_NODELIST