JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Studio 12.2: Performance Analyzer MPI Tutorial
search filter icon
search icon

Document Information

Preface

1.  Performance Analyzer MPI Tutorial

About MPI and Performance Analyzer

Setting Up for the Tutorial

Collecting Data on the ring_c Example

Opening the Experiment

Navigating the MPI Timeline

Viewing Message Details

Viewing Function Details and Application Source Code

Filtering Data in the MPI Tabs

Using the Filter Stack

Using the MPI Chart Tab

Using the MPI Chart Controls

Make a Chart to Show Where Messages are Being Sent

Make a Chart to Show Which Ranks Waited Longest to Receive a Message

Look for Slow Message Effects on Time Spent in MPI Functions

Conclusion

A.  MPI Chart Control Settings

Setting Up for the Tutorial

The Performance Analyzer works with several implementations of the Message Passing Interface (MPI) standard, including the Oracle Message Passing Toolkit, a highly optimized implementation of MPI for Sun x86 and SPARC-based systems. The Oracle Message Passing Toolkit, formerly Sun HPC ClusterTools, must be at least version 7.

This tutorial explains how to use the Performance Analyzer on an example MPI application called ring_c, which is included with the Oracle Message Passing Toolkit. You must already have a cluster configured and functioning for this tutorial.

Follow the steps below to get started.

  1. Download the Oracle Message Passing Toolkit 8.1.2c from http://www.oracle.com/us/products/tools/message-passing-toolkit-070499.html.

  2. Install the toolkit software as described in the Sun HPC ClusterTools 8.2.1c Software Installation Guide, which is available as a PDF download at http://dlc.sun.com/pdf/821-1318-10/821-1318-10.pdf.

  3. Add the /Studio-installation-directory/bin directory and the OracleMessagePassingToolkit-installation-directory/bin directory to your path.

    On Solaris systems, the default paths are /opt/solstudio12.2/bin and /opt/SUNWhpc/HPC8.2.1c/sun/bin.

    On Linux systems, the default paths are /opt/oracle/solstudio12.2/bin and /opt/SUNWhpc/HPC8.2.1c/sun/bin.

  4. Copy the /OracleMessagePassingToolkit-installation-directory/examples directory into a directory to which you have write access. The newly copied examples directory must be visible from all the cluster nodes.

  5. Change directory to your new examples directory.

  6. Build the ring_c example.

    % make ring_c
    mpicc -g -o ring_c ring_c.c

    The program is compiled with the -g option, which allows the Performance Analyzer data collector to map MPI events to source code.

  7. Run the ring_c example with mpirun to make sure it works correctly. The ring_c program simply passes a message from process to process in a ring, then terminates.

    This example shows how to run the program on a two-node cluster. The node names are specified in a host file, along with the number of slots that are to be used on each node. The tutorial uses 25 processes, and specifies one slot on each host. You should specify a number of processes and slots that is appropriate for your system. See the mpirun(1) man page for more information about specifying hosts and slots. You can also run this command on a standalone host that isn't part of a cluster, but the results might be less educational.

    The host file for this example is called clusterhosts and contains the following content:

    hostA slots=1
    hostB slots=1

    You must have permission to use a remote shell (ssh/rsh) to each host without logging into the hosts. By default, mpirun uses ssh.

    % mpirun -np 25 --hostfile clusterhosts ring_c
    Process 0 sending 10 to 1, tag 201 (25 processes in ring)
    Process 0 sent to 1
    Process 0 decremented value: 9
    Process 0 decremented value: 8
    Process 0 decremented value: 7
    
    Process 0 decremented value: 6
    Process 0 decremented value: 5
    Process 0 decremented value: 4
    Process 0 decremented value: 3
    Process 0 decremented value: 2
    Process 0 decremented value: 1
    
    Process 0 decremented value: 0
    Process 0 exiting
    Process 1 exiting
    Process 2 exiting
    .
    .
    .
    Process 24 exiting

    Run this command and if you get similar output, you are ready to collect data on an example application as shown in the next section.

If you have problems with mpirun using ssh, try using the option --mca plm_rsh_agent rsh with the mpirun command to connect using the rsh command:

% mpirun -np 25 --hostfile clusterhosts --mca plm_rsh_agent rsh -- ring_c