MPI通过slurm结合秩与特定节点

发布于 2025-01-17 23:50:34 字数 189 浏览 5 评论 0原文

我使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

溇涏 2025-01-24 23:50:34

请参阅 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文