The number of connections established in an MPI program is not directly proportional to the number of processes involved. In a typical MPI implementation, the number of connections created does not scale with the total number of processes in the program.
The underlying communication mechanism used by MPI libraries can vary, but they often employ techniques like message routing, collective operations, and point-to-point communication protocols to efficiently transmit data between processes. These mechanisms are designed to minimize the number of connections required for communication.
The exact number of connections established in an MPI program depends on several factors, including the communication pattern, the MPI library implementation, the network architecture, and the communication protocol being used (e.g., TCP/IP, InfiniBand, shared memory, etc.).
In a scenario with 10 processes interconnected using MPI, the number of connections established would typically be significantly lower than the total number of possible connections (10C2 = 45 in this case). The MPI library manages the communication and data transfers efficiently, optimizing the use of connections and employing techniques like message aggregation, buffering, and routing.
The specific details of connection establishment and management are handled internally by the MPI library and the underlying communication layer. The focus of MPI programming is on using the provided communication primitives, such as MPI_Send and MPI_Recv, to express the desired communication patterns, while the library handles the underlying details of data transmission.
Therefore, the actual number of connections established in an MPI program is determined by the MPI library's implementation and the communication infrastructure, and it does not typically scale linearly with the number of processes involved.
라고 얘기하더라.
대충 설명하자면,
10개의 프로세스가 MPI를 하면 커넥션이 어떻게 형성될까 를 이야기한거.
솔직히 직관적으로 생각하면 임의의 두 프로세스마다 한개씩 해서 45개의 커넥션이 MPI열리자마자 생겨야하고
좀 더 생각해서, 그 중에서 안쓰일 통신이 있다면 컴파일타임에 체크해서 MPI코드가 해당 커넥션은 안만들 수 있겠지.
그렇다고 해도, 커넥션 숫자가 참여프로세스가 많아질수록 제곱에 비례해서 증가할거라고 생각하는데, 챗지피티 생각은 다르네...
어떻게 제곱에 비례하지 않을 수가 있지?
딱