Join us for an insightful half-day tutorial on Open SpeedShop (OSS), the comprehensive open-source performance analysis framework. Learn to combine profiling and tracing, access various instrumentation options, and integrate OSS into your projects seamlessly. This session will cover essential concepts, provide hands-on examples, and discuss advanced techniques in parallel performance analysis, including sampling and tracing methods. Designed for programmers and tool developers, the tutorial includes interactive experiences and feedback opportunities, aimed at enhancing your performance analysis skills.
01 / 154Parallel Performance Analysis with Open SpeedShop - Half Day Tutorial @ SC 2008, Austin, TX
1 / 17
Download Presentation
Parallel Performance Analysis with Open SpeedShop - Half Day Tutorial @ SC 2008, Austin, TX
An Image/Link below is provided (as is) to download presentation
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.Content is provided to you AS IS for your information and personal use only.Download presentation by click this link.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.During download, if you can't get a presentation, the file might be deleted by the publisher.
What is Open|SpeedShop? • Comprehensive Open Source Performance Analysis Framework • Combining Profiling and Tracing • Common workflow for all experiments • Flexible instrumentation • Extensibility through plugins • Partners • DOE/NNSA Tri-Labs (LLNL, LANL, SNLs) • Krell Institute • Universities of Wisconsin and Maryland
Highlights • Open Source Performance Analysis Tool Framework • Most common performance analysis steps all in one tool • Extensible by using plugins for data collection and representation • Several Instrumentation Options • All work on unmodifiedapplicationbinaries • Offline and online data collection / attachto running applications • Flexible and Easy to use • User access through GUI, CommandLine, and PythonScripting • Large Range of Platforms • LinuxClusters with x86, IA-64, Opteron, and EM64T CPUs • Easier portability with offline data collection mechanism • Availability • Used at allthreeASClabs with lab-size applications • Full source available on sourceforge.net
O|SS Target Audience • Programmers/code teams • Use Open|SpeedShop out of the box • Powerful performance analysis • Ability to integrate O|SS into projects • Tool developers • Single, comprehensive infrastructure • Easy deployment of new tools • Project/product specific customizations • Predefined/custom experiments
Tutorial Goals • Introduce Open|SpeedShop • Basic concepts & terminology • Running first examples • Provide Overview of Features • Sampling & Tracing in O|SS • Performance comparisons • Parallel performance analysis • Overview of advanced techniques • Interactive performance analysis • Scripting & Python integration
“Rules” • Let’s keep this interactive • Feel free to ask as we go along • Online demos as we go along • Feel free to play along • Live CDs with O|SS installed (for PCs) • Ask us if you get stuck • Feedback on O|SS • What is good/missing in the tool? • What should be done differently? • Please report bugs/incompatibilities
Presenters • Martin Schulz, LLNL • Jim Galarowicz, Krell • Don Maghrak, Krell • David Montoya, LANL • Scott Cranford, Sandia Larger Team: • William Hachfeld, Krell • Samuel Gutierrez, LANL • Joseph Kenny, Sandia NLs • Chris Chambreau, LLNL
Outline • Introduction & Overview • Running a First Experiment • O|SS Sampling • Simple Comparisons • Break (30 minutes) • I/O Tracing Experiments • Parallel Performance Analysis • Installation Requirements and Process • Advanced Capabilities
Experiment Workflow Application “Experiment” Consists of one or more data “Collectors” Run Process Management Panel Results Results can be displayed using several “Views” Stored in SQL database
High-level Architecture GUI CLI pyO|SS CLI Experiments Code Instrumentation Open SourceSoftware AMD and Intel based clusters/SSI using Linux
Performance Experiments • Concept of an Experiment • What to measure and analyze? • Experiment chosen by user • Any experiment can be applied to any code • Consists of Collectors and Views • Collectors define specific data sources • Hardware counters • Tracing of certain routines • Views specify data aggregation and presentation • Multiple collectors per experiment possible
Experiment Types in O|SS • Sampling Experiments • Periodically interrupt run and record location • Report statistical distribution of these locations • Typically provides good overview • Overhead mostly low and uniform • Tracing Experiments • Gather and store individual application events, e.g., function invocations (MPI, I/O, …) • Provides detailed, low-level information • Higher overhead, potentially bursty
Sampling Experiments * Updated • PC Sampling (pcsamp) • Record PC in user defined time intervals • Low overhead overview of time distribution • User Time (usertime) • PC Sampling + Call stacks for each sample • Provides inclusive & exclusive timing data • Hardware Counters (hwc, hwctime) • Sample HWC overflow events • Access to data like cache and TLB misses
Tracing Experiments * Updated • I/O Tracing (io, iot) • Record invocation of all POSIX I/O events • Provides aggregate and individual timings • MPI Tracing (mpi, mpit, mpiotf) • Record invocation of all MPI routines • Provides aggregate and individual timings • Floating Point Exception Tracing (fpe) • Triggered by any FPE caused by the code • Helps pinpoint numerical problem areas
Parallel Experiments • O|SS supports MPI and threaded codes • Tested with a variety of MPI implementation • Thread support based on POSIX threads • OpenMPI only supported through POSIX threads • Any experiment can be parallel • Automatically applied to all tasks/threads • Default views aggregate across all tasks/threads • Data from individual tasks/threads available • Specific parallel experiments (e.g., MPI)
High-level Architecture GUI CLI pyO|SS CLI Code Instrumentation Open SourceSoftware AMD and Intel based clusters/SSI using Linux
Code Instrumentation in O|SS • Dynamic Instrumentation through DPCL • Data delivered directly to tool online • Ability to attach to running application
Code Instrumentation in O|SS • Dynamic Instrumentation through DPCL • Data delivered directly to tool online • Ability to attach to running application • Offline/External Data Collection • Instrument application at startup • Write data to raw files and convert to O|SS
Code Instrumentation in O|SS • Dynamic Instrumentation through DPCL • Data delivered directly to tool online • Ability to attach to running application • Offline/External Data Collection • Instrument application at startup • Write data to raw files and convert to O|SS • Scalable Data Collection with MRNet • Similar to DPCL, but scalable transport layer • Ability for interactive online analysis
Code Instrumentation in O|SS • Dynamic Instrumentation through DPCL • Data delivered directly to tool online • Ability to attach to running application • Offline/External Data Collection • Instrument application at startup • Write data to raw files and convert to O|SS • Scalable Data Collection with MRNet • Similar to DPCL, but scalable transport layer • Ability for interactive online analysis
High-level Architecture GUI CLI pyO|SS CLI Code Instrumentation Open SourceSoftware AMD and Intel based clusters/SSI using Linux
Summary • Open|SpeedShop provides comprehensive performance analysis options • Important terminology • Experiments: types of performance analysis • Collectors: data sources • Views: data presentation and aggregation • Sampling vs. Tracing • Sampling: overview data at low overhead • Tracing: details, but at higher cost
Running your First Experiment What do we mean by an experiment? Running a very basic experiment What does the command syntax look like? What are the outputs from the experiment? Viewing and Interpreting gathered measurements Introduce additional command syntax
What is an Experiment? The concept of an experiment Identify the application/executable to profile Identify the type of performance data that is to be gathered Together they form what we call an experiment Application/executable Doesn’t need to be recompiled but needs –g type option to associate gathered data with functions and/or statements. Type of performance data (metric) Sampling based (program counter, call stack, # of events) Tracing based (wrap functions and record information)
Basic experiment syntax openss –offline –f “executable” pcsamp openss is the command to invoke Open|SpeedShop -offline indicates the user interface to use (immediate command) There are a number of user interface options -f is the option for specifying the executable name The “executable” can be a sequential or parallel command pcsamp indicates what type of performance data (metric) you will gather Here pcsamp indicates that we will periodically take a sample of the address that the program counter is pointing to. We will associate that address with a function and/or source line. There are several existing performance metric choices
What are the outputs? Outputs from : openss –offline –f “executable” pcsamp Normal program output while executable is running The sorted list of performance information A list of the top time taking functions The corresponding sample derived time for each function A performance information database file The database file contains all the information needed to view the data at anytime in the future without the executable(s). Symbol table information from executable(s) and system libraries Performance data openss gathered Time stamps for when dso(s) were loaded and unloaded
Using the Database file Database file is one of the outputs from running: openss –offline –f “executable” pcsamp Use this file to view the data How to open the database file with openss openss –f <database file name> openss (then use menus or wizard to open) openss –cli exprestore –f <database file name> In this example, we show both: openss–f X.0.openss (GUI) openss –cli –f X.0.openss (CLI) X.0.openss is the file name openss creates by default * Updated
Sampling Experiments • PC Sampling • Approximates CPU Time For Line and Function • No Call Stacks • User Time • Inclusive vs. Exclusive Time • Includes Call stacks • HW Counters • Samples Hardware Counter Overflows
Sampling - Considerations • Sampling: Statistical Subset of All Events • Low Overhead • Low Perturbation • Good to Get Overview / Find Hotspots