next up previous contents
Next: Security Up: User Steps Previous: Launching Clients

Examples

Given a machine named foo which will be the server, and two machines named bar and baz which will be the clients. The user wishes to run 8 copies of a.out on bar (with ranks 0-7 in MPI_COMM_WORLD) and 4 copies of b.out on baz (with ranks 8-11 in MPI_COMM_WORLD).

 
On foo: impirun -server 2 (typed by user)  
128.162.19.8:5678 (output from impirun)

 
On bar: impirun -client 0 128.162.19.8:5678 -np 8 a.out

 
On baz: impirun -client 1 128.162.19.8:5678 -np 4 b.out

Advice to implementors.We do not mandate support for the `-np' syntax, this is simply common practice which we are using for the purpose of example. In general, anything following the host:port argument is completely implementation dependent (and may be quite complex).(End of advice to implementors.)

Rationale.The above design allows users with rsh support to write a single shell script to launch a job. For example, on most UNIX systems, the above could be rewritten as follows:

        #!/bin/csh

        setenv hostport `impirun -server 2 | head -1`

        rsh bar impirun -client 0 $hostport -np 8 a.out &
        rsh baz impirun -client 1 $hostport -np 4 b.out &

        wait

On some systems, the above script may only work if impirun is restricted to writing only a single line of text, since subsequent lines could potentially cause a SIGPIPE on impirun after the head process terminates.

A slightly different approach might be to incorporate support for a configuration file directly into the impirun command line:

        % impirun -server 2 -file appfile

where appfile contains:

        bar -client 0 $hostport -np 8 a.out
        baz -client 1 $hostport -np 4 b.out

(End of rationale.)


next up previous contents
Next: Security Up: User Steps Previous: Launching Clients
IMPI Protocol ver 0.0
DRAFT March 22, 1999