集群节点之间如何通信?

How to communicate between nodes of a cluster?

这不是关于特定集群环境的问题,而是关于在集群的多个节点上分发软件的一般情况。

我知道大多数 HPC 集群使用某种工作负载管理器将作业分发到多个节点。从我有限的研究来看,Slurm 似乎是一个受欢迎的选择,但其他人也在使用。

如果您想 运行 n 独立任务,我知道这有什么用。但是如果你想 运行 任务相互通信怎么办?

如果我正在开发一个跨两台或多台机器的应用程序,我可以设计一个简单的协议(或使用现有协议)和 send/receive 消息,例如 TCP/IP。如果事情变得非常复杂,那么设计一个简单的消息总线或消息中心来容纳两台以上的机器就不会太难了。

首先,在 HPC 集群中使用 TCP 是否明智,或者出于性能原因通常不使用它?

其次,在非集群环境中,我事先知道所涉及机器的 IP 地址,但在集群中,我将我的软件部署到哪些物理机器上的决定委托给工作负载管理器,如 Slurm。那么我怎样才能 "wire up" 节点呢? MPI 是如何做到这一点的,还是它没有使用 TCP/IP 来允许节点之间的通信?

抱歉,如果这个问题对于 Whosebug 来说有点开放性,如果有更合适的地方可以提出此类问题,我很乐意将其移到其他地方。

If I were developing an application that was split across two or more machines I could just design a simple protocol (or use an existing one) and send/receive messages over something like TCP/IP

于是就出现了MPI所以不是每个人都会重新发明轮子(轮子是几千小时的工程时间,它不是你的基本战车轮子,它已经走过了一些非常坎坷的道路。 ..).
但最终这就是 MPI 所做的(如果您希望通过 TCP 进行通信,请参阅 OpenMPI TCP

Firstly, in an HPC cluster is it sensible to use TCP, or is this generally not used for performance reasons?

它们是除 TCP 之外的其他通信方式(共享内存、Myrinet、OpenFabrics 通信,...)OpenMPI FAQ). In HPC they are a few solutions on the market concerning Interconnect (look at Top 500

So how can I "wire up" the nodes? How does MPI achieve this, or is it not using TCP/IP to allow communication between nodes?

布线由工作负载管理器管理(您可以查看 slurm configuration or loadleveler). MPI will just "inherit" from that context because in a HPC context you stop using mpirun but more likely srun or runjob (instead of doing something like Specify the machines running program using MPI