next up previous contents
Next: The COLL command Up: Wire Protocols Previous: The AUTH command

The IMPI command

IMPI commands contain the following payload:

        typedef union {
                IMPI_Int4 rank;       // rank of this client in IMPI job
                IMPI_Int4 size;       // total # of clients in IMPI job
        } IMPI_Impi;

The IMPI command informs the server that this client wishes to join an IMPI job. For the client-to-server packet, the payload consists of the rank of the client. After every client in the job has connected to the server and sent its own rank, the server will send back to each client the size, that is, the total number of clients in the job.

Example: Consider an IMPI job built from three clients:

client 0 : 3 hosts, each with 2 processes per host
client 1 : 2 hosts, each with 3 processes per host
client 2 : 2 hosts, each with 4 processes per host


  
Figure 2.1: IMPI command exchange.
\begin{figure}
\begin{center}
\begin{picture}
(2.5,3.7)
\put(0,0){\usebox{\impiw...
...
\tiny {\shortstack[l]{
'IMPI', 4, 3
}}}}
\end{picture}\end{center}
\end{figure}

The exchange of messages for the IMPI command is shown in Figure 2.1. Each client will first send a single IMPI_Cmd containing the fields {IMPI_CMD_IMPI, 4}. The clients will then each send a single IMPI_Impi, with the following fields:

client 0 : { rank = 0 }
client 1 : { rank = 1 }
client 2 : { rank = 2 }

After collecting all of the above, the server will send the following IMPI_Impi struct back to each client:

        IMPI_Int4 cmd   = IMPI_CMD_IMPI
        IMPI_Int4 len   = 4
        IMPI_Int4 size  = 3

Discussion. Another option is to use a struct instead of a union for the IMPI_Impi, which would leave the door open to letting the clients specify the size of the job directly. In this case, in addition to its requested rank, each client would also specify the size.(End of discussion.)


next up previous contents
Next: The COLL command Up: Wire Protocols Previous: The AUTH command
IMPI Protocol ver 0.0
DRAFT March 22, 1999