Performance Technology for Complex Parallel Systems Part 2 – Complexity Scenarios Sameer Shende.

Slides:



Advertisements
Similar presentations
MPI Message Passing Interface
Advertisements

Dynamic performance measurement control Dynamic event grouping Multiple configurable counters Selective instrumentation Application-Level Performance Access.
1 Lawrence Livermore National Laboratory By Chunhua (Leo) Liao, Stephen Guzik, Dan Quinlan A node-level programming model framework for exascale computing*
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
Chapter 4 Threads, SMP, and Microkernels Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design.
Computer Systems/Operating Systems - Class 8
Robert Bell, Allen D. Malony, Sameer Shende Department of Computer and Information Science Computational Science.
Sameer Shende Department of Computer and Information Science Neuro Informatics Center University of Oregon Tool Interoperability.
Java for High Performance Computing Jordi Garcia Almiñana 14 de Octubre de 1998 de la era post-internet.
TAU Parallel Performance System DOD UGC 2004 Tutorial Allen D. Malony, Sameer Shende, Robert Bell Univesity of Oregon.
3.5 Interprocess Communication Many operating systems provide mechanisms for interprocess communication (IPC) –Processes must communicate with one another.
Scripting Languages For Virtual Worlds. Outline Necessary Features Classes, Prototypes, and Mixins Static vs. Dynamic Typing Concurrency Versioning Distribution.
1 Parallel Computing—Introduction to Message Passing Interface (MPI)
Active Messages: a Mechanism for Integrated Communication and Computation von Eicken et. al. Brian Kazian CS258 Spring 2008.
3.5 Interprocess Communication
Ritu Varma Roshanak Roshandel Manu Prasanna
The TAU Performance System: Advances in Performance Mapping Sameer Shende University of Oregon.
June 2, 2003ICCS Performance Instrumentation and Measurement for Terascale Systems Jack Dongarra, Shirley Moore, Philip Mucci University of Tennessee.
Kai Li, Allen D. Malony, Robert Bell, Sameer Shende Department of Computer and Information Science Computational.
Sameer Shende, Allen D. Malony Computer & Information Science Department Computational Science Institute University of Oregon.
Mapping Techniques for Load Balancing
Session-02. Objective In this session you will learn : What is Class Loader ? What is Byte Code Verifier? JIT & JAVA API Features of Java Java Environment.
Hossein Bastan Isfahan University of Technology 1/23.
Performance Technology for Complex Parallel Systems Part 2 – Complexity Scenarios Sameer Shende.
Lecture 4: Parallel Programming Models. Parallel Programming Models Parallel Programming Models: Data parallelism / Task parallelism Explicit parallelism.
1 Developing Native Device for MPJ Express Advisor: Dr. Aamir Shafi Co-advisor: Ms Samin Khaliq.
Process Management. Processes Process Concept Process Scheduling Operations on Processes Interprocess Communication Examples of IPC Systems Communication.
ICOM 5995: Performance Instrumentation and Visualization for High Performance Computer Systems Lecture 7 October 16, 2002 Nayda G. Santiago.
Parallel Programming Models Jihad El-Sana These slides are based on the book: Introduction to Parallel Computing, Blaise Barney, Lawrence Livermore National.
AN EXTENDED OPENMP TARGETING ON THE HYBRID ARCHITECTURE OF SMP-CLUSTER Author : Y. Zhao 、 C. Hu 、 S. Wang 、 S. Zhang Source : Proceedings of the 2nd IASTED.
Chapter 34 Java Technology for Active Web Documents methods used to provide continuous Web updates to browser – Server push – Active documents.
University of Houston-Clear Lake Proprietary© 1997 Evolution of Programming Languages Basic cycle of improvement –Experience software difficulties –Theory.
Multithreading in Java Project of COCS 513 By Wei Li December, 2000.
Part I MPI from scratch. Part I By: Camilo A. SilvaBIOinformatics Summer 2008 PIRE :: REU :: Cyberbridges.
Introduction and Features of Java. What is java? Developed by Sun Microsystems (James Gosling) A general-purpose object-oriented language Based on C/C++
Performance Technology for Complex Parallel Systems Part 2 – Complexity Scenarios Sameer Shende.
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
Issues Autonomic operation (fault tolerance) Minimize interference to applications Hardware support for new operating systems Resource management (global.
1 Parallel Programming Aaron Bloomfield CS 415 Fall 2005.
Dynamic performance measurement control Dynamic event grouping Multiple configurable counters Selective instrumentation Application-Level Performance Access.
A Multi-platform Co-array Fortran Compiler for High-Performance Computing John Mellor-Crummey, Yuri Dotsenko, Cristian Coarfa {johnmc, dotsenko,
Tool Visualizations, Metrics, and Profiled Entities Overview [Brief Version] Adam Leko HCS Research Laboratory University of Florida.
Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.
Connections to Other Packages The Cactus Team Albert Einstein Institute
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 4: Threads.
Programming distributed memory systems: Message Passing Interface (MPI) Distributed memory systems: multiple processing units working on one task (e.g.
Shangkar Mayanglambam, Allen D. Malony, Matthew J. Sottile Computer and Information Science Department Performance.
Integrated Performance Views in Charm++: Projections meets TAU Scott Biersdorff Allen D. Malony Department Computer and Information Science University.
Performane Analyzer Performance Analysis and Visualization of Large-Scale Uintah Simulations Kai Li, Allen D. Malony, Sameer Shende, Robert Bell Performance.
1 HPJAVA I.K.UJJWAL 07M11A1217 Dept. of Information Technology B.S.I.T.
MPI-Message Passing Interface. What is MPI?  MPI is a specification for the developers and users of message passing libraries. By itself, it is NOT a.
Programming Parallel Hardware using MPJ Express By A. Shafi.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Silberschatz, Galvin and Gagne ©2009Operating System Concepts – 8 th Edition Chapter 4: Threads.
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
Computer System Structures
Object Oriented Programming in
Kai Li, Allen D. Malony, Sameer Shende, Robert Bell
TAU integration with Score-P
University of Technology
Performance Technology for Complex Parallel and Distributed Systems
Chapter 4: Threads.
TAU: A Framework for Parallel Performance Analysis
MPI-Message Passing Interface
Allen D. Malony Computer & Information Science Department
Introduction to parallelism and the Message Passing Interface
MPJ: A Java-based Parallel Computing System
Outline Introduction Motivation for performance mapping SEAA model
Performance Technology for Complex Parallel and Distributed Systems
Parallel Program Analysis Framework for the DOE ACTS Toolkit
Presentation transcript:

Performance Technology for Complex Parallel Systems Part 2 – Complexity Scenarios Sameer Shende

SC’01 Tutorial Nov. 7, 2001 Goals  Explore performance analysis issues in different parallel computing and programming contexts  Demonstrate TAU’s usage in different parallel application case studies  Explore ways to bridge the semantic gap between entities that tools present and the user’s abstractions  Highlight TAU performance mapping API

SC’01 Tutorial Nov. 7, 2001 Complexity Scenarios  Message passing computation  Observe message communication events  Associate messaging events with program events  SPMD applications with multiple procesess  SIMPLE hydrodynamics application (C, MPI)  Multi-threaded computation  (Abstract) thread-based performance measurement  Multi-threaded parallel execution  Asynchronous runtime system scheduling  Multi-threading performance analysis in Java

SC’01 Tutorial Nov. 7, 2001 Complexity Scenarios (continued)  Mixed-mode parallel computation  Portable shared memory and message passing APIs  Integrate messaging events with multi-threading events  OpenMP + MPI, Java + MPI  Object-oriented programming and C++  Object-based performance analysis  Performance measurement of template-derived code  Array classes and expression transformation  Hierarchical parallel software and module composition  Multi-level software framework and work scheduling  Module-specific performance mapping

SC’01 Tutorial Nov. 7, 2001 Strategies for Empirical Performance Evaluation  Empirical performance evaluation as a series of performance experiments  Experiment trials describing instrumentation and measurement requirements  Where/When/How axes of empirical performance space  where are performance measurements made in program  when is performance instrumentation done  how are performance measurement/instrumentation chosen  Strategies for achieving flexibility and portability goals  Limited performance methods restrict evaluation scope  Non-portable methods force use of different techniques  Integration and combination of strategies

SC’01 Tutorial Nov. 7, 2001 Multi-Level Instrumentation in TAU

SC’01 Tutorial Nov. 7, 2001 Multi-Level Instrumentation  Uses multiple instrumentation interfaces  Shares information: cooperation between interfaces  Taps information at multiple levels  Provides selective instrumentation at each level  Targets a common performance model  Presents a unified view of execution

SC’01 Tutorial Nov. 7, 2001 SIMPLE Performance Analysis  SIMPLE hydrodynamics benchmark  C code with MPI message communication  Multiple instrumentation methods  source-to-source translation (PDT)  MPI wrapper library level instrumentation (PMPI)  pre-execution binary instrumentation (DyninstAPI)  Alternative measurement strategies  statistical profiles of software actions  statistical profiles of hardware actions (PCL, PAPI)  program event tracing  choice of time source gettimeofday, high-res physical, CPU, process virtual

SC’01 Tutorial Nov. 7, 2001 SIMPLE Source Instrumentation (Preprocessed) int compute_heat_conduction( double theta_hat[X][Y], double deltat, double new_r[X][Y], double new_z[X][Y], double new_alpha[X][Y], double new_rho[X][Y], double theta_l[X][Y], double Gamma_k[X][Y], double Gamma_l[X][Y]) { TAU_PROFILE("int compute_heat_conduction( double (*)[259], double, double (*)[259], double (*)[259], double (*)[259], double (*)[259], double (*)[259], double (*)[259], double (*)[259])", " ", TAU_USER); … }  Similarly, for all other routines in SIMPLE program

SC’01 Tutorial Nov. 7, 2001 MPI Library Instrumentation (MPI_Send) int MPI_Send(…) … { int returnVal, typesize; TAU_PROFILE_TIMER(tautimer, "MPI_Send()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); if (dest != MPI_PROC_NULL) { PMPI_Type_size( datatype, &typesize ); TAU_TRACE_SENDMSG(tag, dest, typesize*count); } returnVal = PMPI_Send( buf, count, datatype, dest, tag, comm ); TAU_PROFILE_STOP(tautimer); return returnVal; }

SC’01 Tutorial Nov. 7, 2001 MPI Library Instrumentation (MPI_Recv) int MPI_Recv(…) … { int returnVal, size; TAU_PROFILE_TIMER(tautimer, "MPI_Recv()", " ", TAU_MESSAGE); TAU_PROFILE_START(tautimer); returnVal = PMPI_Recv(buf, count, datatype, src, tag, comm, status); if (src != MPI_PROC_NULL && returnVal == MPI_SUCCESS) { PMPI_Get_count( status, MPI_BYTE, &size ); TAU_TRACE_RECVMSG(status->MPI_TAG, status->MPI_SOURCE, size); } TAU_PROFILE_STOP(tautimer); |return returnVal; }

SC’01 Tutorial Nov. 7, 2001 four processes profile per process global routine profile Multi-Level Instrumentation (Profiling) SC’01 Tutorial

Nov. 7, 2001 Multi-Level Instrumentation (Tracing)  No modification of source instrumentation! TAU performance groups

SC’01 Tutorial Nov. 7, 2001 Dynamic Instrumentation of SIMPLE  Uses DynInstAPI for runtime code patching  Mutator loads measurement library, instruments mutatee  one mutator (tau_run) per executable image  mpirun –np tau.shell

SC’01 Tutorial Nov. 7, 2001 Multi-Threading Performance Measurement  General issues  Thread identity and per-thread data storage  Performance measurement support and synchronization  Fine-grained parallelism  different forms and levels of threading  greater need for efficient instrumentation  TAU general threading and measurement model  Common thread layer and measurement support  Interface to system specific libraries (reg, id, sync)  Target different thread systems with core functionality  Pthreads, Windows, Java, SMARTS, Tulip, OpenMP

SC’01 Tutorial Nov. 7, 2001 Java Multi-Threading Performance (Test Case)  Profile and trace Java (JDK 1.2+) applications  Observe user-level and system-level threads  Observe events for different Java packages  /lang, /io, /awt, …  Test application  SciVis, NPAC, Syracuse University %./configure -jdk= % setenv LD_LIBRARY_PATH $LD_LIBRARY_PATH\: / /lib % java -XrunTAU svserver

SC’01 Tutorial Nov. 7, 2001 TAU Profiling of Java Application (SciVis) Profile for each Java thread Captures events for different Java packages 24 threads of execution! global routine profile

SC’01 Tutorial Nov. 7, 2001 TAU Tracing of Java Application (SciVis) Performance groups Timeline display Parallelism view

SC’01 Tutorial Nov. 7, 2001 Vampir Dynamic Call Tree View (SciVis) Per thread call tree Annotated performance Expanded call tree

SC’01 Tutorial Nov. 7, 2001 Virtual Machine Performance Instrumentation  Integrate performance system with VM  Captures robust performance data (e.g., thread events)  Maintain features of environment  portability, concurrency, extensibility, interoperation  Allow use in optimization methods  JVM Profiling Interface (JVMPI)  Generation of JVM events and hooks into JVM  Profiler agent (TAU) loaded as shared object  registers events of interest and address of callback routine  Access to information on dynamically loaded classes  No need to modify Java source, bytecode, or JVM

SC’01 Tutorial Nov. 7, 2001 JVMPI Events  Method transition events  Memory events  Heap arena events  Garbage collection events  Class events  Global reference events  Monitor events  Monitor wait events  Thread events  Dump events  Virtual machine events

SC’01 Tutorial Nov. 7, 2001 TAU Java JVM Instrumentation Architecture JVMPI Thread API Event notification Java program Profile DB JNI TAU  Robust set of events  Portability  Access to thread info  Measurement options  Limitations  Overhead  Many events  Event control  No user-defined events

SC’01 Tutorial Nov. 7, 2001 TAU Java Source Instrumentation Architecture  Any code section can be measured  Portability  Measurement options  Profiling, tracing  Limitations  Source access only  Lack of thread information  Lack of node information Profile database stored in JVM heap TAU as dynamic shared object TAU.Profile class (init, data, output) JNI C bindings Java program TAU package Profile DB JNI TAU

SC’01 Tutorial Nov. 7, 2001 Java Source-Level Instrumentation  TAU Java package  User-defined events  TAU.Profile class for new “timers”  Start/Stop  Performance data output at end

SC’01 Tutorial Nov. 7, 2001 Mixed-mode Parallel Programs (OpenMPI + MPI)  Portable mixed-mode parallel programming  Multi-threaded shared memory programming  Inter-node message passing  Performance measurement  Access to runtime system and communication events  Associate communication and application events  2-Dimensional Stommel model of ocean circulation  OpenMP for shared memory parallel programming  MPI for cross-box message-based parallelism  Jacobi iteration, 5-point stencil  Timothy Kaiser (San Diego Supercomputing Center)

SC’01 Tutorial Nov. 7, 2001 Stommel Instrumentation  Use PMPI for message communication events  OpenMP directive instrumentation (see OPARI in Part 3)

SC’01 Tutorial Nov. 7, 2001 OpenMP + MPI Ocean Modeling (Trace) Integrated OpenMP + MPI events Thread message pairing

SC’01 Tutorial Nov. 7, 2001 OpenMP + MPI Ocean Modeling (HW Profile) % configure -papi=../packages/papi -openmp -c++=pgCC -cc=pgcc -mpiinc=../packages/mpich/include -mpilib=../packages/mpich/lib FP instructions Integrated OpenMP + MPI events

SC’01 Tutorial Nov. 7, 2001 Mixed-mode Parallel Programs (Java + MPI)  Explicit message communication libraries for Java  MPI performance measurement  MPI profiling interface - link-time interposition library  TAU wrappers in native profiling interface library  Send/Receive events and communication statistics  mpiJava (Syracuse, JavaGrande, 1999)  Java wrapper package  JNI C bindings to MPI communication library  Dynamic shared object (libmpijava.so) loaded in JVM  prunjava calls mpirun to distribute program to nodes  Contrast to Java RMI-based schemes (MPJ, CCJ)

SC’01 Tutorial Nov. 7, 2001 Native MPI library TAU Java Instrumentation Architecture Java program mpiJava package JNI Profile DB TAU MPI profiling interface TAU wrapper Native MPI library  No source instrumentation  Portability  Measurement options  Limitations  MPI events only  No mpiJava events  Node info only  No thread info TAU package

SC’01 Tutorial Nov. 7, 2001 Java Multi-threading and Message Passing  Java threads and MPI communications  Shared-memory multi-threading events  Message communications events  Unified performance measurement and views  Integration of performance mechanisms  Integrated association of performance events  thread event and communication events  user-defined (source-level) performance events  JVM events  Requires instrumentation and measurement cooperation

SC’01 Tutorial Nov. 7, 2001 Instrumentation and Measurement Cooperation  Problem  JVMPI doesn’t see MPI events (e.g., rank (node))  MPI profiling interfaces doesn’t see threads  Source instrumentation doesn’t see either!  Need cooperation between interfaces  MPI exposes rank and gets thread information  JVMPI exposes thread information and gets rank  Source instrumentation gets both  Post-mortem matching of sends and receives  Selective instrumentation  java -XrunTAU:exclude=java/io,sun

SC’01 Tutorial Nov. 7, 2001 JVMPI Thread API Event notification TAU Java Instrumentation Architecture Java program TAU package mpiJava package MPI profiling interface TAU wrapper Native MPI library Profile DB JNI TAU

SC’01 Tutorial Nov. 7, 2001 Parallel Java Game of Life (Profile)  mpiJava testcase  4 nodes, 28 threads Node 0 Node 1 Node 2 Thread 4 executes all MPI routines Merged Java and MPI event profiles

SC’01 Tutorial Nov. 7, 2001 Parallel Java Game of Life (Trace)  Integrated event tracing  Merged trace viz  Node process grouping  Thread message pairing  Vampir display  Multi-level event grouping

SC’01 Tutorial Nov. 7, 2001 Integrated Performance View (Callgraph)  Source level  MPI level  Java packages level

SC’01 Tutorial Nov. 7, 2001 Object-Oriented Programming and C++  Object-oriented programming is based on concepts of abstract data types, encapsulation, inheritance, …  Languages (such as C++) provide support implementing domain-specific abstractions in the form of class libraries  Furthermore, generic programming mechanisms allow for efficient coding abstractions and compile-time transformations  Creates a semantic gap between the transformed code and what the user expects (and describes in source code)  Need a mechanism to expose the nature of high-level abstract computation to the performance tools  Map low-level performance data to high-level semantics

SC’01 Tutorial Nov. 7, 2001 C++ Template Instrumentation (Blitz++, PETE)  High-level objects  Array classes  Templates (Blitz++)  Optimizations  Array processing  Expressions ( PETE )  Relate performance data to high-level statement  Complexity of template evaluation Array expressions

SC’01 Tutorial Nov. 7, 2001 Standard Template Instrumentation Difficulties  Instantiated templates result in mangled identifiers  Standard profiling techniques / tools are deficient  Integrated with proprietary compilers  Specific systems platforms and programming models Uninterpretable routine names

SC’01 Tutorial Nov. 7, 2001 Blitz++ Library Instrumentation  Expression templates embed the form of the expression in a template name  In Blitz++, the library describes the structure of the expression template to the profiling toolkit  Allows for pretty printing the expression templates + B D C BinOp<Add, B, <BinOp<Subtract, C, <BinOp<Multiply, Scalar, D>>> Expression: B + C * D

SC’01 Tutorial Nov. 7, 2001 Blitz++ Library Instrumentation (example) 

SC’01 Tutorial Nov. 7, 2001 TAU Instrumentation and Profiling for C++ Performance data presented with respect to high-level array expression types Profile of expression types Graphical pprof Racy

SC’01 Tutorial Nov. 7, 2001 Hierarchical Parallel Software (C-SAFE/Uintah)  Center for Simulation of Accidental Fires & Explosions  ASCI Level 1 center  PSE for multi-model simulation high-energy explosion  Uintah parallel programming framework  Component-based and object-parallel  Multi-model task-graph scheduling and execution  Shared-memory (thread), distributed-memory (MPI), and mixed-model parallelization  Integrated with SCIRun framework  TAU integration in Uintah  Mapping: task object  grid object  patch object

SC’01 Tutorial Nov. 7, 2001 Task Execution in Uintah Parallel Scheduler Task execution time dominates (what task?) MPI communication overheads (where?)

SC’01 Tutorial Nov. 7, 2001 Task Computation and Mapping  Task computations on individual particles generate work packets that are scheduled and executed  Work packets that “interpolate particles to grid”  Assign semantic name to a task abstraction  SerialMPM::interpolateParticleToGrid  Partition execution time among different tasks  Need to relate the performance of each particle computation (work packet) to the associated task  Map TAU timer object to task (abstract) computation  Further partition the performance data along different domain-specific axes (task, patches…)  Helps bridge the semantic-gap!

SC’01 Tutorial Nov. 7, 2001 Mapping Instrumentation (example) 

SC’01 Tutorial Nov. 7, 2001 Work Packet – to – Task Mapping (Profile)

SC’01 Tutorial Nov. 7, 2001 Work Packet – to – Task Mapping (Trace) Distinct phases of computation can be identifed based on task See work packet computation events colored by task type

SC’01 Tutorial Nov. 7, 2001 Statistics for Relative Task Contributions

SC’01 Tutorial Nov. 7, 2001 Comparing Uintah Traces for Scalability Analysis