IBM Books

Installation


Appendix C. Using Additional POE Sample Applications

This appendix explains the POE sample applications for doing the following:


Bandwidth Measurement Test Sample

The purpose of this sample is to measure the point-to-point bandwidth between two tasks. The sample code is in the directory called /usr/lpp/ppe.poe/samples/poetest.bw. This directory contains a test code called bw.f, which does a point-to-point bandwidth measurement test. The code needs only 2 nodes to run.

You should have the following files:

README.bw
README file containing instructions on running application, which is the same information presented here.

bw.f
Sample application Fortran source file.

bw.run
Script for compiling application.

rtc.s
Source for creating rtc.o file needed for building and running sample application makefile to create rtc.o.

makertc
makefile to create rtc.o

makefile
makefile for creating sample application.
Note:The C and Fortran compilers must be available.

Verification Steps

Follow these steps to verify your system:

  1. Create the bw executable. Log in as a non-root user and perform the following steps:

    1. Type cd /usr/lpp/ppe.poe/samples/poetest.bw to switch to the appropriate directory. If this directory is not writable to the user, the user must copy the needed files to a directory that is writable so they can build the executable files.

    2. Use the makertc script to create a copy of the rtc.o object file, necessary for building the bw executable.

    3. Type make to invoke the makefile, which compiles bw.f, includes rtc.o, to create the bw executable.

  2. Create a file named host.list with two entries, one per line, listing the two nodes on which the executable is to be run.

  3. Type ./bw.run [ css_library ] [ SP_name ]

    where the optional parameters are:

    css_library
    is us for User-Space message passing or ip for IP message passing

    SP_name
    is the name of the control workstation for the SP system on which the test is to be run, required if css_library is us. If SP_name is not supplied, the environment variable SP_NAME is used. When running on an SP and submitting from a non-SP node, the ssp.clients fileset must be installed on the submitting node. Refer "When to Install ssp.clients (SP Resource Manager)" for further information.
    Note:The bw.run script runs the bw executable from the current working directory.

  4. Check output on the following screen. The output should finish in about one minute, on the SP system using the User_Space message passing library. The execution time for IP will be five minutes or longer. The actual response time depends on your LAN traffic.

    Input: none
     
    Output to terminal by this program: (Note that the order is
    unpredictable.)
    Hello from node 0
    Hello from node 1
    MEASURED BANDWIDTH = ....... MB/sec
    

    For the IBM RS/6000 SP with the SP Switch, the bandwidth should be around 32 MB/Sec.

    For IP over Ethernet, the bandwidth should be around 1 MB/Sec.


Broadcast Test Sample

The purpose of this sample is to perform a broadcast from task 0 to all of the rest of the nodes in the partition. It is located in the directory called /usr/lpp/ppe.poe/samples/poetest.cast. This sample test code touches all nodes in the partition.

You should have the following files:

README.cast
README file containing instructions on running applications, which is the same information presented here.

bcast.f
Sample application FORTRAN source.

makefile
makefile for compiling application.

bcast.run.
Script for running application.
Note:The FORTRAN compiler must be available.

Verification Steps

Follow these steps to verify your system:

  1. Create the bcast executable. Log in as a non-root user and follow these steps:

    1. Type cd /usr/lpp/ppe.poe/samples/poetest.cast to switch to the appropriate directory. If this directory is not writable to the user, the user must copy the needed files to a directory that is writable so they can build the executable files.

    2. Type make to invoke the makefile, which compiles bcast.f, to create the executable.

  2. Create a file of execution nodes, named host.list with one entry per line.

  3. Make sure that the nodes specified in the host.list file are initialized for the requested type of message passing.

  4. Type /bcast.run ntasks [ css_library ] [ SP_name ]

    where the required parameter is:

    ntasks
    the number of tasks (nodes) in the partition

    Make sure that there are at least ntasks entries in the host.list file.

    and the optional parameters are:

    css_library
    is us for User-Space message passing (default) or ip for IP message passing.

    SP_name
    is the name of the control workstation for the SP system on which the test is to be run, required if css_library is us. If SP_name is not supplied, the environment variable SP_NAME is used. When running on an SP and submitting from a non-SP node, the ssp.clients fileset must be installed on the submitting node. Refer "When to Install ssp.clients (SP Resource Manager)" for further information.
    Note:The bcast.run script runs the bcast executable from the current working directory.

  5. Check the output on the following screen. The output should finish in about one minute if your system does not have more than 64 SP nodes. The actual response time depends on your LAN traffic.

    Input: none
     
    Output to terminal by this program:
    Hello from node 0
    Hello from node 1
    ...
    Hello from node (p-1)
    BROADCAST TEST COMPLETED SUCCESSFULLY
    

    Note:

    The order of these lines is unpredictable.

    If the test failed, you should see the following message on the terminal:

    BROADCAST TEST FAILED on node x (where x is some integer)
    

    For every node that did not pass the test, a line similar to the previous line will appear.


MPI Threads Sample Program

Two sample programs have been provided to illustrate the use of the MPI message passing library with user-created threads. They are located in the /usr/lpp/ppe.poe/samples/threads directory.

The following files are located in this directory:

README.threads
README file containing instructions on running the sample programs.

threaded_ring.c
Source for sample program for testing threaded MPI library with user threads.

interrupt_ring.c
Sample program for testing the threaded MPI library with a user signal handler.

makefile
makefile for compiling the threaded sample programs.

threads.run
script for running user threads sample program, threaded_ring

interrupt.run
script for running threads sample program with a signal handler, interrupt_ring
Note:These sample programs require the C compiler to be available.

Verification Steps

Follow these steps to run the threaded sample applications on your system:

  1. Create the executables. To do so, log in as a non-root user, and do the following:

    1. Type cd /usr/lpp/ppe.poe/samples/threads to switch to the appropriate directory. If you do not have write access to this directory, you will need to copy the needed files to a directory that is writable so that you can build the executable files.

    2. Type make to invoke the makefile, which compiles both source programs to create two executables, threaded_ring and interrupt_ring.

  2. Create a file of execution nodes, named host.list, with one entry per line.
    Note:This file must contain a minimum of two nodes.

  3. Make sure that the nodes specified in the host.list file are initialized for the requested type of message passing.

  4. To test the threaded MPI library with user threads, type:

    threads.run [ {ip,us} [ SP_partition ] ]

    where the optional parameters are as follows:

    {ip,us}
    specifies the library to be used. Type ip to use the UDP/IP library; type us to use the User Space library. These names are case sensitive. User Space is the default.

    SP_partition
    is the name of an SP partition if running User Space and not logged onto a node in the partition.
    Note:These instructions assume that the current directory is mounted (or automounted) on all execution nodes.

    The program should issue only message "TEST COMPLETE" from task 0.

  5. To test the threaded MPI library with user signal handler type:

    interrupt.run [ {ip,us} [ SP_partition ] ]

    where the optional parameters are as follows:

    {ip,us}
    specifies the library to be used. Type ip to use the UDP/IP library; type us to use the User Space library. These names are case sensitive. User Space is the default.

    SP_partition
    is the name of an SP partition if running User Space and not logged onto a node in the partition.
    Note:These instructions assume that the current directory is mounted (or automounted) on all execution nodes.

    The program issues the following output.
    Note:The order of the outputs from task 0 and task 1 may be different from what appears here; you may receive fewer than the number of "Receiver got..." messages than shown here.

      0:MPI Initialization Complete
       0:Receiver got thread condition signal
       1:Receiver got thread condition signal
       1:Receiver got thread condition signal
       0:Receiver got thread condition signal
       1:Receiver got thread condition signal
       0:Receiver got thread condition signal
       1:Receiver got thread condition signal
       1:Receiver got thread condition signal
       1:Receiver got thread condition signal
       1:Receiver got thread condition signal
       1:Receiver got thread condition signal
       1:Receiver got thread condition signal
       1:Receiver got thread condition signal
       0:TEST COMPLETE
    

LAPI Sample Programs

There are a number of sample programs provided to illustrate the use of the Low-level Applications Programming Interface (LAPI). Since LAPI runs only with the User Space communications subsystem, it is installed and runs as part of the Parallel System Support Programs (PSSP).

The LAPI sample programs are provided in the /usr/lpp/ssp/css/samples/lapi directory. In that directory, refer to the file README.LAPI, which contains instructions on how to compile and execute the sample programs.
Note:These sample programs require the C and Fortran compilers.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]