Using the Intel® MPI Library in a server/client setup

ID 660485
Updated 7/13/2018
Version Latest
Public

author-image

By

Overview

In some instances, it can be advantageous to have an MPI program join a job after it has started. Additional resources can be added to a long job as they become available, or a more traditional server/client program can be created. This can be facilitated with the MPI_Comm_accept and MPI_Comm_connect functions.
 

Key Functions

  • MPI_Open_port - Creates the port that is used for the communications. This port is given a name that is used to reference it later, both by the server and the client. Only the server program calls MPI_Open_port
  • MPI_Comm_accept - Uses the previously opened port to listen for a connecting MPI program. This is called by the server and will create an intercommunicator once it completes.
  • MPI_Comm_connect - Connects to another MPI program at the named port. This is called by the client and will create an intercommunicator once it completes.

Notes

  • The programs must use the same fabric in order to connect, as the port is dependent on the fabric.
  • The programs must be on the same operating system in order to connect. Different versions/distributions of the same operating systems could work, this has not been tested and is not supported.
  • The method of getting the port name from the server to the client can vary.