HP-MPI User's Guide (11th Edition)

Understanding HP-MPI
Running applications on HP-UX and Linux
Chapter 3 71
Host assignments are returned for the two symbolic links voyager
and enterprise.
When requesting a host from LSF, you must ensure that the path to
your executable file is accessible by all machines in the resource pool.
More information about appfile runs
This example teaches you to run the hello_world.c application that you
built in Examples of building on HP-UX and Linux (above) using two
hosts to achieve four-way parallelism. For this example, the local host is
named jawbone and a remote host is named wizard. To run
hello_world.c on two hosts, use the following procedure, replacing
jawbone and wizard with the names of your machines:
Step 1. Edit the .rhosts file on jawbone and wizard.
Add an entry for wizard in the .rhosts file on jawbone and an entry for
jawbone in the .rhosts file on wizard. In addition to the entries in the
.rhosts file, ensure that the correct commands and permissions are set up
on all hosts so that you can start your remote processes. Refer to “Setting
shell” on page 20 for details.
Step 2. Ensure that the executable is accessible from each host either by placing
it in a shared directory or by copying it to a local directory on each host.
Step 3. Create an appfile.
An appfile is a text file that contains process counts and a list of
programs. In this example, create an appfile named my_appfile
containing the following two lines:
-h jawbone -np 2 /path/to/hello_world
-h wizard -np 2 /path/to/hello_world
The appfile file should contain a separate line for each host. Each line
specifies the name of the executable file and the number of processes to
run on the host. The -h option is followed by the name of the host where
the specified processes must be run. Instead of using the host name, you
may use its IP address.
Step 4. Run the hello_world executable file:
% $MPI_ROOT/bin/mpirun -f my_appfile