LLNL-PRES-XXXXXX This work was performed under the auspices of the U.S. Department of Energy by Lawrence Livermore National Laboratory under Contract DE-AC52-07NA27344.

Slides:



Advertisements
Similar presentations
Chapter 8 Technicalities: Functions, etc. Bjarne Stroustrup
Advertisements

Lecture for Lab 3, Exp1 of EE505 (Developing Device Driver) T.A. Chulmin Kim CoreLab. Mar, 11, 2011 [XenSchedulerPaper_Hotcloud-commits] r21 - /
Dynamic Allocation and Linked Lists. Dynamic memory allocation in C C uses the functions malloc() and free() to implement dynamic allocation. malloc is.
Compilation and Debugging 101. Compilation in C/C++ hello.c Preprocessor Compiler stdio.h tmpXQ.i (C code) hello.o (object file)
Senem Kumova Metin Spring2009 STACKS AND QUEUES Chapter 10 in A Book on C.
Lawrence Livermore National Laboratory ROSE Compiler Project Computational Exascale Workshop December 2010 Dan Quinlan Chunhua Liao, Justin Too, Robb Matzke,
The C ++ Language BY Shery khan. The C++ Language Bjarne Stroupstrup, the language’s creator C++ was designed to provide Simula’s facilities for program.
Templated Functions. Overloading vs Templating  Overloaded functions allow multiple functions with the same name.
The Interface Definition Language for Fail-Safe C Kohei Suenaga, Yutaka Oiwa, Eijiro Sumii, Akinori Yonezawa University of Tokyko.
Matt Wolfe LC Development Environment Group Lawrence Livermore National Laboratory Lawrence Livermore National Laboratory, P. O. Box 808, Livermore, CA.
LLNL-PRES This work was performed under the auspices of the U.S. Department of Energy by Lawrence Livermore National Laboratory under contract DE-AC52-07NA27344.
OCT 1 Master of Information System Management Organizational Communications and Distributed Object Technologies Lecture 5: Distributed Objects.
Office of Science U.S. Department of Energy Globus World 2005 PyGridWare Performance Aspects Keith R. Jackson Lawrence Berkeley National Laboratory.
Dynamic Allocation and Linked Lists. Dynamic memory allocation in C C uses the functions malloc() and free() to implement dynamic allocation. malloc is.
Blaise Barney, LLNL ASC Tri-Lab Code Development Tools Workshop Thursday, July 29, 2010 Lawrence Livermore National Laboratory, P. O. Box 808, Livermore,
Lawrence Livermore National Laboratory Manycore Optimizations: A Compiler and Language Independent ManyCore Runtime System ROSE Team Center for Applied.
LLNL-PRES-XXXXXX This work was performed under the auspices of the U.S. Department of Energy by Lawrence Livermore National Laboratory under Contract DE-AC52-07NA27344.
CVM-H v11.1 Release in a Nutshell Distribution of a new version of CVM-H that includes: Vs30-based arbitrary precision GTL Extended Region using 1D background.
LLNL-PRES-XXXXXX This work was performed under the auspices of the U.S. Department of Energy by Lawrence Livermore National Laboratory under contract DE-AC52-07NA27344.
Design of a Masked Array facility for Python _______________________ Paul Dubois Program for Climate Model Diagnosis and Intercomparison Lawrence Livermore.
Introduction to Programming David Goldschmidt, Ph.D. Computer Science The College of Saint Rose Java Fundamentals (Comments, Variables, etc.)
C++ Template Metaprogramming Why, When and How? Zoltán Porkoláb Dept. of Programming Languages and Compilers, Faculty of Informatics Eötvös.
1 Programs Composed of Several Functions Syntax Templates Legal C++ Identifiers Assigning Values to Variables Declaring Named Constants String Concatenation.
Lawrence Livermore National Laboratory This work performed under the auspices of the U.S. Department of Energy by Lawrence Livermore National Laboratory.
Blaise Barney, LLNL ASC Tri-Lab Code Development Tools Workshop Thursday, July 29, 2010 Lawrence Livermore National Laboratory, P. O. Box 808, Livermore,
PS3-Slides typedef struct ProcessTag{ int id; int size; int time; int importance; int priority; } PrintJob; Priority is - say - a function of size, time.
GTK Binding for Alice Robert Grabowski Eine GTK-Schnittstelle für Alice.
Matt Wolfe LC Development Environment Group Lawrence Livermore National Laboratory Lawrence Livermore National Laboratory, P. O. Box 808, Livermore, CA.
Dennis Ritchie 1972 AT & T Bell laboratories (American Telephone and Telegraph) USA 1www.gowreeswar.com.
Lawrence Livermore National Laboratory Pianola: A script-based I/O benchmark Lawrence Livermore National Laboratory, P. O. Box 808, Livermore, CA
Java Dynamic Proxy Bibliography: reflection/proxy.html
ASC Tri-Lab Code Development Tools Workshop Thursday, July 29, 2010 Lawrence Livermore National Laboratory, P. O. Box 808, Livermore, CA This work.
Portable Parallel Performance Tools Shirley Browne, UTK Clay Breshears, CEWES MSRC Jan 27-28, 1998.
LLNL-PRES-?????? This work was performed under the auspices of the U.S. Department of Energy by Lawrence Livermore National Laboratory under Contract DE-AC52-07NA27344.
Scott Kohn with Tammy Dahlgren, Tom Epperly, and Gary Kumfert Center for Applied Scientific Computing Lawrence Livermore National Laboratory October 2,
LLNL-PRES-?????? This work was performed under the auspices of the U.S. Department of Energy by Lawrence Livermore National Laboratory under Contract DE-AC52-07NA27344.
LLNL-PRES-?????? This work was performed under the auspices of the U.S. Department of Energy by Lawrence Livermore National Laboratory under Contract DE-AC52-07NA27344.
UPC Performance Tool Interface Professor Alan D. George, Principal Investigator Mr. Hung-Hsun Su, Sr. Research Assistant Mr. Adam Leko, Sr. Research Assistant.
Martin Schulz Center for Applied Scientific Computing Lawrence Livermore National Laboratory ASC STAT Team: Greg Lee, Dong Ahn (LLNL), Dane Gardner (LANL)
LLNL-PRES DRAFT This work was performed under the auspices of the U.S. Department of Energy by Lawrence Livermore National Laboratory under contract.
Bronis R. de Supinski and John May Center for Applied Scientific Computing March 18, 1999 Benchmarking pthreads.
Generic lists Vassilis Athitsos. Problems With Textbook Interface? Suppose that we fix the first problem, and we can have multiple stacks. Can we have.
LLNL-PRES-xxxxxx This work was performed under the auspices of the U.S. Department of Energy by Lawrence Livermore National Laboratory under Contract DE-AC52-07NA27344.
Server-Side C++ Mapping Copyright © ZeroC, Inc. Ice Programming with C++ 6. Server-Side C++ Mapping.
LLNL-PRES This work was performed under the auspices of the U.S. Department of Energy by Lawrence Livermore National Laboratory under contract DE-AC52-07NA27344.
Lawrence Livermore National Laboratory LLNL-PRES- XXXXXX LLNL-PRES This work was performed under the auspices of the U.S. Department of Energy by.
Code Motion for MPI Performance Optimization The most common optimization in MPI applications is to post MPI communication earlier so that the communication.
LLNL-PRES-XXXXXX This work was performed under the auspices of the U.S. Department of Energy by Lawrence Livermore National Laboratory under contract DE-AC52-07NA27344.
Abstract Data Types and Stacks CSE 2320 – Algorithms and Data Structures Vassilis Athitsos University of Texas at Arlington 1.
LLNL-PRES-XXXXXX This work was performed under the auspices of the U.S. Department of Energy by Lawrence Livermore National Laboratory under contract DE-AC52-07NA27344.
LLNL-PRES This work was performed under the auspices of the U.S. Department of Energy by Lawrence Livermore National Laboratory under Contract DE-AC52-07NA27344.
C is a high level language (HLL)
Kelly Davis Monitoring and Event System Kelly Davis AEI.
This work was performed under the auspices of the U.S. Department of Energy by Lawrence Livermore National Laboratory under contract DE-AC52-07NA27344.
5th MaCS Debrecen On the Turing-Completeness of Generative Metaprograms Zoltán Porkoláb, István Zólyomi Dept. of Programming.
LESSON 3 IO, Variables and Operators
Delegates and Events 14: Delegates and Events
Lawrence Livermore National Laboratory
BY GAWARE S.R. COMPUTER SCI. DEPARTMENT
C Basics.
null, true, and false are also reserved.
Heat Simulations with COMSOL
Putting the I in IoT.
JavaScript Reserved Words
Default Arguments.
C++ Compilation Model C++ is a compiled language
NAG Workshop and Surgery
프로그래밍2 및 실습 Sort Code 전명중.
Abstract Data Types Stacks CSCI 240
Default argument Kei Hasegawa.
Presentation transcript:

LLNL-PRES-XXXXXX This work was performed under the auspices of the U.S. Department of Energy by Lawrence Livermore National Laboratory under Contract DE-AC52-07NA Lawrence Livermore National Security, LLC PIG: a Profile Interface Generator LC Hackathon July 12, 2013

Lawrence Livermore National Laboratory LLNL-PRES-xxxxxx 2  Plots show per-time step measurements from the Miranda multi-physics code  To measure per-time step, we need to know when a time step begins and end Problem: Tool developers want more information about applications! Physics Data Floating point ops Cache misses

Lawrence Livermore National Laboratory LLNL-PRES-xxxxxx 3  Say I’m an application developer  Clearly, I want to instrument this code to use awesome performance tools!  How do I do that? How do I tell tools about my code? for (i=0; i < nsteps; i++) { do_radiation(); do_hydro() } 4-line multi-physics code

Lawrence Livermore National Laboratory LLNL-PRES-xxxxxx 4  MPI_Pcontrol is defined in the MPI library does nothing by default  Designed to be intercepted by profiling tools  Tools use it to start and stop profiling Applications can call Pcontrol without having to link to a new library MPI provides a call that allows applications to talk to tools int MPI_Pcontrol(int ctl, …);

Lawrence Livermore National Laboratory LLNL-PRES-xxxxxx 5 Instrumenting time steps for (i=0; i < nsteps; i++) { do_radiation(); do_hydro() } for (i=0; i < nsteps; i++) { MPI_Pcontrol(0); // start time step do_rad(); do_hydro() MPI_Pcontrol(1); // end time step }  That’s kind of ugly, but all right.  Now how do I add regions?

Lawrence Livermore National Laboratory LLNL-PRES-xxxxxx 6 Instrumenting regions for (i=0; i < nsteps; i++) { do_radiation(); do_hydro() } for (i=0; i < nsteps; i++) { MPI_Pcontrol(-1); // start time step MPI_Pcontrol(1); // start radiation do_rad(); MPI_Pcontrol(-2); // end radiation MPI_Pcontrol(2); // start hydro do_hydro() MPI_Pcontrol(-2); // end hydro MPI_Pcontrol(-1); // end time step }

Lawrence Livermore National Laboratory LLNL-PRES-xxxxxx 7 Interfaces that are potentially better than MPI_Pcontrol Punch Cards Turing Machine

Lawrence Livermore National Laboratory LLNL-PRES-xxxxxx 8 for (i=0; i < nsteps; i++) { do_radiation(); do_hydro() } PIG can help! #include “phase_interface.h” for (i=0; i < nsteps; i++) { start_step(); start_phase(“radiation”); do_radiation(); end_phase(); start_phase(“hydro”); do_hydro() end_phase(); end_step(); } That’s better!

Lawrence Livermore National Laboratory LLNL-PRES-xxxxxx 9 PIG generates interfaces Unmarshalling code for Tools Tool Interface Decodes arguments from MPI_Pcontrol() Delegates to handler callbacks Publish/subscribe interface C header Fortran header Application headers contain only macros! Macros call MPI_Pcontrol() with encoded arguments No special library to link to! Application Interfaces void start_step(); void end_step(); void start_phase ( const char* name); void end_phase(); C Header phase_interface.h

Lawrence Livermore National Laboratory LLNL-PRES-xxxxxx 10 PIG Output #define PIG_PCONTROL_ID 3974 #define PIG_start_step_ID 0 #define PIG_end_step_ID 1 #define PIG_start_phase_ID 2 #define PIG_end_phase_ID 3 typedef struct { const char *name; } start_phase_args_t; #define start_step() \ do { \ MPI_Pcontrol(PIG_PCONTROL_ID, PIG_start_step_ID, NULL); \ } while (0) #define end_step() \ do { \ MPI_Pcontrol(PIG_PCONTROL_ID, PIG_end_step_ID, NULL); \ } while (0) #define start_phase(name) \ do { \ start_phase_args_t start_phase_args = {name}; \ MPI_Pcontrol(PIG_PCONTROL_ID, PIG_start_phase_ID, &start_phase_args); \ } while (0) #define end_phase() \ do { \ MPI_Pcontrol(PIG_PCONTROL_ID, PIG_end_phase_ID, NULL); \ } while (0) void startStep(); void endStep(); void start_phase(const char* name); void end_phase(); Yay!

Lawrence Livermore National Laboratory LLNL-PRES-xxxxxx 11  Code generation in python Used pycparser  Small tool library to do function dispatch  Allows registration of listener functions PIG Implementation