CCA Common Component Architecture Performance Technology for Component

  • Slides: 32
Download presentation
CCA Common Component Architecture Performance Technology for Component Software - TAU Allen D. Malony

CCA Common Component Architecture Performance Technology for Component Software - TAU Allen D. Malony (U. Oregon) Sameer Shende (U. Oregon) Craig Rasmussen (LANL) Jaideep Ray (SNL, CA) Matt Sottile (LANL)

CCA Performance Technology for Component Software - TAU Common Component Architecture Overview • •

CCA Performance Technology for Component Software - TAU Common Component Architecture Overview • • • Complexity and performance technology TAU performance system Developing performance interfaces for CCA Performance modeling and prediction issues Conclusions 2

CCA Performance Technology for Component Software - TAU Common Component Architecture Focus on Component

CCA Performance Technology for Component Software - TAU Common Component Architecture Focus on Component Technology • Emerging component technology for HPC and Grid • Component: software object embedding functionality • Component architecture (CA): how components connect • Component framework: implements a CA • Common Component Architecture (CCA) – Standard foundation for scientific component architecture – Component descriptions • Scientific Interface Description Language (SIDL) – CCA ports for component interactions – CCA framework services (CCAFEINE) 3

CCA Performance Technology for Component Software - TAU Common Component Architecture Problem Statement How

CCA Performance Technology for Component Software - TAU Common Component Architecture Problem Statement How do we create robust and ubiquitous performance technology for the analysis and tuning of component software in the presence of (evolving) complexity challenges? How do we apply performance technology effectively for the variety and diversity of performance problems that arise in the context of CCA components? 4

CCA Performance Technology for Component Software - TAU Common Component Architecture • Tuning and

CCA Performance Technology for Component Software - TAU Common Component Architecture • Tuning and Analysis Utilities • Performance system framework for scalable parallel and distributed highperformance computing • Targets a general complex system computation model – nodes / contexts / threads – Multi-level: system / software / parallelism – Measurement and analysis abstraction • Integrated toolkit for performance instrumentation, measurement, analysis, and visualization – Portable, configurable performance profiling/tracing facility – Open software approach • University of Oregon, LANL, FZJ Germany • http: //www. cs. uoregon. edu/research/paracomp/tau 5

CCA Performance Technology for Component Software - TAU Common Component Architecture TAU Performance System

CCA Performance Technology for Component Software - TAU Common Component Architecture TAU Performance System Architecture Paraver EPILOG 6

CCA Performance Technology for Component Software - TAU Common Component Architecture TAU Instrumentation •

CCA Performance Technology for Component Software - TAU Common Component Architecture TAU Instrumentation • Flexible instrumentation mechanisms at multiple levels – Source code • Manual (TAU API, CCA Measurement Port API) • automatic using Program Database Toolkit (PDT), OPARI (for Open. MP programs), Babel SIDL compiler (proposed) – Object code • • pre-instrumented libraries (e. g. , MPI using PMPI) statically linked dynamically linked (e. g. , Virtual machine instrumentation) fast breakpoints (compiler generated) – Executable code • dynamic instrumentation (pre-execution) using Dyn. Inst. API 7

CCA Performance Technology for Component Software - TAU Common Component Architecture Program Database Toolkit

CCA Performance Technology for Component Software - TAU Common Component Architecture Program Database Toolkit Application / Library C / C++ parser IL C / C++ IL analyzer Program Database Files Fortran 77/90 parser IL Fortran 77/90 IL analyzer DUCTAPE PDBhtml Program documentation SILOON Application component glue CHASM C++ / F 90 interoperability TAU_instr Automatic source instrumentation 8

CCA Performance Technology for Component Software - TAU Common Component Architecture Program Database Toolkit

CCA Performance Technology for Component Software - TAU Common Component Architecture Program Database Toolkit (PDT) • • • Program code analysis framework for developing source-based tools for C 99, C++ and F 90 [U. Oregon, LANL, FZJ Germany] High-level interface to source code information Widely portable: – IBM, SGI, Compaq, HP, Sun, Linux clusters, Windows, Apple, Hitachi, Cray T 3 E. . . • Integrated toolkit for source code parsing, database creation, and database query – – • • commercial grade front end parsers (EDG for C 99/C++, Mutek for F 90) Intel/KAI C++ headers for std. C++ library distributed with PDT portable IL analyzer, database format, and access API open software approach for tool development Target and integrate multiple source languages Used in CCA for automated generation of SIDL [CHASM] Use in TAU to build automated performance instrumentation tools (tau_instrumentor) Can be used to generate code for performance ports in CCA 9

CCA Performance Technology for Component Software - TAU Common Component Architecture Extended Component Design

CCA Performance Technology for Component Software - TAU Common Component Architecture Extended Component Design generic component • PKC: Performance Knowledge Component • POC: Performance Observability Component 10

CCA Performance Technology for Component Software - TAU Common Component Architecture Performance Observation •

CCA Performance Technology for Component Software - TAU Common Component Architecture Performance Observation • Ability to observe execution performance is important – Empirically-derived performance knowledge • Does not require measurement integration in component – Monitor during execution to make dynamic decisions • Measurement integration is key • Performance observation integration – Component integration: core and variant – Runtime measurement and data collection – On-line and off-line performance analysis 11

CCA Performance Technology for Component Software - TAU Common Component Architecture Performance Observation Component

CCA Performance Technology for Component Software - TAU Common Component Architecture Performance Observation Component (POC) • Performance observation in a performance-engineered component model • Functional extension of original component design ( ) – Include new component methods and ports ( ) for other components to access measured performance data – Allow original component to access performance data • Encapsulate as tightly-couple and co-resident performance observation object • POC “provides” port allow use optmized interfaces ( ) to access ``internal'' performance observations 12

CCA Performance Technology for Component Software - TAU Common Component Architecture Performance Observation Component

CCA Performance Technology for Component Software - TAU Common Component Architecture Performance Observation Component Performance Component Timer Event Control Query Measurement Port • One performance component per context • Performance component provides a Measurement Port – Measurement Port allows a user to create and access: • • Timer (start/stop, set name/type/group) Event (trigger) Control (enable/disable groups) Query (get functions, metrics, counters, dump to disk) 13

CCA Performance Technology for Component Software - TAU Common Component Architecture Performance Component API

CCA Performance Technology for Component Software - TAU Common Component Architecture Performance Component API namespace performance { Port in CCAFEINE namespace Measurement ccaports { class Measurement: public virtual classic: : gov: : cca: : Port { public: virtual ~ Measurement (){} /* Create a Timer */ virtual performance: : Timer* create. Timer(void) = 0; create. Timer(string name) create. Timer(string name, string group) = = 0; string type) = 0; string type, 0; /* Create a Query interface */ virtual performance: : Query* create. Query(void) = 0; /* Create a User Defined Event interface */ virtual performance: : Event* create. Event(void) = 0; virtual performance: : Event* create. Event(string name) = 0; /** * Create a Control interface for selectively enabling and disabling * the instrumentation based on groups */ virtual performance: : Control* create. Control(void) = 0; }; } 14

CCA Performance Technology for Component Software - TAU Common Component Architecture CCA Timer Interface

CCA Performance Technology for Component Software - TAU Common Component Architecture CCA Timer Interface namespace performance { class Timer { public: virtual ~Timer() {} /* Start the Timer. Implement these methods in * a derived class to provide required functionality. */ virtual void start(void) = 0; /* Stop the Timer. */ virtual void stop(void) = 0; virtual void set. Name(string name) = 0; virtual string get. Name(void) = 0; virtual void set. Type(string name) = 0; virtual string get. Type(void) = 0; /**Set the group name associated with the Timer * (e. g. , All MPI calls can be grouped into an "MPI" group)*/ virtual void set. Group. Name(string name) = 0; virtual string get. Group. Name(void) = 0; virtual void set. Group. Id(unsigned long group ) = 0; virtual unsigned long get. Group. Id(void) = 0; }; } 15

CCA Performance Technology for Component Software - TAU Common Component Architecture CCA Instrumentation Control

CCA Performance Technology for Component Software - TAU Common Component Architecture CCA Instrumentation Control Interface namespace performance { Control Class Interface class Control { public: ~Control () { } /* Control instrumentation. Enable group Id. */ virtual void enable. Group. Id(unsigned long id) = 0; /* Control instrumentation. Disable group Id. */ virtual void disable. Group. Id(unsigned long id) = 0; /* Control instrumentation. Enable group name. */ virtual void enable. Group. Name(string name) = 0; /* Control instrumentation. Disable group name. */ virtual void disable. Group. Name(string name) = 0; /* Control instrumentation. Enable all groups. */ virtual void enable. All. Groups(void) = 0; } }; /* Control instrumentation. Disable all groups. */ virtual void disable. All. Groups(void) = 0; 16

CCA Performance Technology for Component Software - TAU Common Component Architecture CCA Performance Query

CCA Performance Technology for Component Software - TAU Common Component Architecture CCA Performance Query Interface namespace performance { Query Class Interface class Query { public: virtual ~Query() {} /* Get the list of Timer names */ virtual void get. Timer. Names(const char **& function. List, int& num. Funcs) = 0; /* Get the list of Counter names */ virtual void get. Counter. Names(const char **& counter. List, int& num. Counters) = 0; /* get. Timer. Data. Returns lists of metrics. */ virtual void get. Timer. Data(const char **& in. Timer. List, int num. Timers, double **& counter. Exclusive, double **& counter. Inclusive, int*& num. Calls, int*& num. Child. Calls, const char **& counter. Names, int& num. Counters) = 0; virtual void dump. Profile. Data(void) = 0; dump. Profile. Data. Incremental(void) = 0; // timestamped dump. Timer. Names(void) = 0; dump. Timer. Data(const char **& in. Timer. List, int num. Timers) = 0; virtual void dump. Timer. Data. Incremental(const char **& in. Timer. List, int num. Timers) = 0; }; } 17

CCA Performance Technology for Component Software - TAU Common Component Architecture CCA User Defined

CCA Performance Technology for Component Software - TAU Common Component Architecture CCA User Defined Event Interface namespace performance { Event Class Interface class Event { public: /** * Destructor */ virtual ~Event() { } /** * Register the name of the event */ virtual void trigger(double data) = 0; allocated */ }; } /* e. g. , size of a message, error in an iteration, memory 18

CCA Performance Technology for Component Software - TAU Common Component Architecture Measurement Port Implementation

CCA Performance Technology for Component Software - TAU Common Component Architecture Measurement Port Implementation • TAU component implements the Measurement. Port – Implements Timer, Control, Query and Control classes – Registers the port with the CCAFEINE framework • Components target the generic Measurement. Port interface – Runtime selection of TAU component during execution – Instrumentation code independent of underlying tool – Instrumentation code independent of measurement choice – Tau. Measurement_CCA port implementation uses a specific TAU measurement library 19

CCA Performance Technology for Component Software - TAU Common Component Architecture Using the Timer

CCA Performance Technology for Component Software - TAU Common Component Architecture Using the Timer Interface: An Example #include "ports/Measurement_CCA. h" Using Measurement. Port … double Monte. Carlo. Integrator: : integrate (double low. Bound, double up. Bound, int count) { classic: : gov: : cca: : Port * port; double sum = 0. 0; // Get Measurement port = framework. Services->get. Port ("Measurement. Port"); if (port) measurement_m = dynamic_cast < performance: : ccaports: : Measurement * >(port); if (measurement_m == 0){ cerr << "Connected to something other than a Measurement port"; return -1; } static performance: : Timer* t = measurement_m->create. Timer( string("Integrate. Timer")); t->start(); for (int i = 0; i < count; i++) { double x = random_m->get. Random. Number (); sum = sum + function_m->evaluate (x); } t->stop(); 20

CCA Performance Technology for Component Software - TAU Common Component Architecture TAU Component in

CCA Performance Technology for Component Software - TAU Common Component Architecture TAU Component in CCAFEINE repository repository create create get get Tau. Measurement Driver Midpoint. Integrator Monte. Carlo. Integrator Random. Generator Linear. Function Nonlinear. Function Pi. Function Linear. Function lin_func Nonlinear. Function nonlin_func Pi. Function pi_func Monte. Carlo. Integrator mc_integrator Random. Generator rand create Tau. Measurement tau connect mc_integrator Random. Generator. Port rand Random. Generator. Port connect mc_integrator Function. Port nonlin_func Function. Port connect mc_integrator Measurement. Port tau Measurement. Port create Driver driver connect driver Integrator. Port mc_integrator Integrator. Port go driver Go quit 21

CCA Performance Technology for Component Software - TAU Common Component Architecture SIDL interface for

CCA Performance Technology for Component Software - TAU Common Component Architecture SIDL interface for Timers // // File: // performance. sidl version performance 1. 0; package performance { class Timer { void start(); void stop(); void set. Name(in string name); string get. Name(); void set. Type(in string name); string get. Type(); void set. Group. Name(in string name); string get. Group. Name(); void set. Group. Id(in long group); long get. Group. Id(); } } 22

CCA Performance Technology for Component Software - TAU Common Component Architecture Using SIDL Interface

CCA Performance Technology for Component Software - TAU Common Component Architecture Using SIDL Interface for Timers // SIDL: #include "performance_Timer. hh" int main(int argc, char* argv[]) { performance: : Timer t = performance: : Timer: : _create(); . . . t. set. Name("Integrate timer"); t. start(); // Computation for (int i = 0; i < count; i++) { double x = random_m->get. Random. Number (); sum = sum + function_m->evaluate (x); }. . . t. stop(); return 0; } 23

CCA Performance Technology for Component Software - TAU Common Component Architecture Performance Knowledge Component

CCA Performance Technology for Component Software - TAU Common Component Architecture Performance Knowledge Component • Describe and store “known” component’s performance – Benchmark characterizations in performance database – Empirical or analytical performance models • Saved information about component performance – Use for performance-guided selection and deployment – Use for runtime adaptation • Representation must be in common forms with standard means for accessing the performance information 24

CCA Performance Technology for Component Software - TAU Common Component Architecture Performance Knowledge Repository

CCA Performance Technology for Component Software - TAU Common Component Architecture Performance Knowledge Repository • Component performance repository – Implement in component architecture framework – Similar to CCA component repository [Alexandria] – Access by component infrastructure • View performance knowledge as component (PKC) – PKC ports give access to performance knowledge – to other components back to original component – Store performance model for performance prediction – Component composition performance knowledge 25

CCA Performance Technology for Component Software - TAU Common Component Architecture Component Performance Model

CCA Performance Technology for Component Software - TAU Common Component Architecture Component Performance Model • User specified • Inferred automatically by performance tool – Prior performance data – Expression – Parametric model • Estimate performance of a single component by – Querying runtime performance data – Passing this to performance model for evaluation • Integration of performance observation and knowledge components key to runtime selection of components 26

CCA Performance Technology for Component Software - TAU Common Component Architecture Applications: Uintah (U.

CCA Performance Technology for Component Software - TAU Common Component Architecture Applications: Uintah (U. Utah) Scalability analysis 27

CCA Performance Technology for Component Software - TAU Common Component Architecture Applications: VTF (ASCI

CCA Performance Technology for Component Software - TAU Common Component Architecture Applications: VTF (ASCI ASAP Caltech) • C++, C, F 90, Python • PDT, MPI 28

CCA Performance Technology for Component Software - TAU Common Component Architecture Applications: SAMRAI (LLNL)

CCA Performance Technology for Component Software - TAU Common Component Architecture Applications: SAMRAI (LLNL) • C++ • PDT, MPI • SAMRAI timers (groups) 29

CCA Performance Technology for Component Software - TAU Common Component Architecture TAU Status •

CCA Performance Technology for Component Software - TAU Common Component Architecture TAU Status • Instrumentation supported: – Source, preprocessor, compiler, MPI, runtime, virtual machine • Languages supported: – C++, C, F 90, Java, Python – HPF, ZPL, HPC++, p. C++. . . • Packages supported: – PAPI [UTK], PCL [FZJ] (hardware performance counter access), – Opari, PDT [UO, LANL, FZJ], Dyninst. API [U. Maryland] (instrumentation), – EXPERT, EPILOG[FZJ], Vampir[Pallas], Paraver [CEPBA] (visualization) • Platforms supported: – IBM SP, SGI Origin, Sun, HP Superdome, HP/Compaq Tru 64 ES, – Linux clusters (IA-32, IA-64, Power. PC, Alpha), Apple, Windows, – Hitachi SR 8000, NEC SX, Cray T 3 E. . . • Compilers suites supported: – GNU, Intel KAI (KCC, KAP/Pro), Intel, SGI, IBM, Compaq, HP, Fujitsu, Hitachi, Sun, Apple, Microsoft, NEC, Cray, PGI, Absoft, … • Thread libraries supported: – Pthreads, SGI sproc, Open. MP, Windows, Java, SMARTS 30

CCA Performance Technology for Component Software - TAU Common Component Architecture Concluding Remarks •

CCA Performance Technology for Component Software - TAU Common Component Architecture Concluding Remarks • Complex component systems pose challenging performance analysis problems that require robust methodologies and tools • New performance problems will arise – Instrumentation and measurement – Data analysis and presentation – Diagnosis and tuning • Performance engineered components – Performance knowledge, observation, query and control • Integration of performance technology 31

CCA Performance Technology for Component Software - TAU Common Component Architecture Support Acknowledgement •

CCA Performance Technology for Component Software - TAU Common Component Architecture Support Acknowledgement • TAU and PDT support: – Department of Energy (DOE) • • DOE 2000 ACTS contract DOE MICS contract DOE ASCI Level 3 (LANL, LLNL) U. of Utah DOE ASCI Level 1 subcontract – DARPA – NSF National Young Investigator (NYI) award 32