caliper pu ng performance data in context
play

Caliper: Pu,ng Performance Data in Context 9 th Scalable - PowerPoint PPT Presentation

Caliper: Pu,ng Performance Data in Context 9 th Scalable Tools Workshop David Boehme Todd Gamblin Mar;n Schulz August 3, 2015 LLNL-PRES-675459 This work was performed


  1. Caliper: ¡ ¡ Pu,ng ¡Performance ¡Data ¡in ¡Context ¡ 9 th ¡Scalable ¡Tools ¡Workshop ¡ David ¡Boehme ¡ Todd ¡Gamblin ¡ Mar;n ¡Schulz ¡ August 3, 2015 LLNL-PRES-675459 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 Security, LLC

  2. Performance ¡Analysis ¡requires ¡ ¡ Data ¡Correla:on ¡ Environment Application domain • Hardware topology • Software • Domain topology configuration (OS, • Physics data runtime versions) Source Code Measurements Context • Time • FLOPS • Call path • Memory access • Phase Performance Insight No ¡interface ¡to ¡collect ¡generic ¡context ¡data! ¡ 2 ¡ LLNL-PRES-675459

  3. Example: ¡Visualiza:on ¡in ¡MemAxes ¡ 3 ¡ LLNL-PRES-675459

  4. Caliper ¡Contribu:ons ¡ Interface ¡for ¡ applica:ons ¡ to ¡provide ¡arbitrary ¡ ¡ 1. context ¡informa;on ¡ Interface ¡for ¡plug-­‑in ¡tools ¡that ¡provide ¡ measurement ¡data ¡ 2. Enable ¡ composi:on ¡of ¡context ¡annota;ons ¡and ¡ ¡ 3. measurement ¡providers ¡ 4 ¡ LLNL-PRES-675459

  5. Composite ¡Data ¡Collec:on ¡ § Generic ¡ a"ribute:value ¡data ¡model ¡ — Allows ¡storage ¡of ¡any ¡type ¡or ¡kind ¡of ¡data: ¡ not ¡limited ¡to ¡pre-­‑defined ¡context ¡categories ¡ § In-­‑memory ¡data ¡store ¡ — Data ¡sources ¡update ¡context ¡/ ¡measurement ¡data ¡ independently ¡ — Combines ¡data ¡across ¡the ¡soTware ¡stack ¡ Application Measurements Libraries Runtime OpenMP Timer Component Component Solver Mesh MPI 1 2 PAPI rank, thread id, phase, coordinate, solver function, construct, ... iteration no. element iteration refin. level wait time wait time Caliper app.c1.phase, app.c1.iteration, app.c2.coordinate, app.c2.element, solver.iteration, mesh.refinementlvl, mpi.rank, mpi.function, mpi.wait, openmp.thread, openmp.construct, openmp.wait, time.duration, time.timestamp, papi.l2miss, papi.fpops, ... Common context space 5 ¡ LLNL-PRES-675459

  6. Caliper ¡Framework ¡ Annotated source code Measurement module Annotation / Measurement Annotation API trigger Service API Context scope In-memory data store manager Service API Context stream Query API External on-line Tool File system / Database 6 ¡ LLNL-PRES-675459

  7. Caliper ¡Workflow ¡(1) ¡ Annotated source code Measurement module Annotation / Measurement Annotation API trigger Service API Context scope In-memory data store manager Service API Context stream Query API External on-line Tool File system / Database • Instrumented modules independently update context information 7 ¡ LLNL-PRES-675459

  8. Caliper ¡Workflow ¡(2) ¡ Annotated source code Measurement module Annotation / Measurement Annotation API trigger Service API Context scope In-memory data store manager Service API Context stream Query API External on-line Tool File system / Database • Trigger creates record with context snapshot and measurement data 8 ¡ LLNL-PRES-675459

  9. Caliper ¡Workflow ¡(3) ¡ Annotated source code Measurement module Annotation / Measurement Annotation API trigger Service API Context scope In-memory data store manager Service API Context stream Query API External on-line Tool File system / Database • Alternatively, external tool pulls context and measurement snapshot on-line 9 ¡ LLNL-PRES-675459

  10. Data ¡Model ¡ § Fully ¡flexible ¡ a"ribute:value ¡format ¡ app.phase=“solve”,mpi.rank=42,time.duration=1234,mesh.level=3 § A[ributes ¡contain ¡ — Unique ¡name ¡ — Data ¡type ¡(integer, ¡floa;ng ¡point, ¡string, ¡binary ¡blob) ¡ • Future ¡extension: ¡JSON ¡descrip;on ¡for ¡complex ¡types ¡ — Scope ¡(process, ¡thread, ¡or ¡task) ¡ § Entries ¡can ¡be ¡hierarchical ¡(e.g., ¡for ¡call ¡paths) ¡ § Automa;c ¡scoping ¡ — Caliper ¡keeps ¡separate ¡entries ¡per ¡thread ¡or ¡tasks ¡ § Efficient ¡tree-­‑based ¡data ¡representa;on ¡ 10 ¡ LLNL-PRES-675459

  11. Efficient ¡Context ¡Representa:on ¡ § Build ¡up ¡ context ¡tree ¡ — Stores ¡values ¡from ¡mul;ple ¡a[ributes ¡ Attributes main — Transparent ¡to ¡the ¡user ¡ phase § Represent ¡context ¡snapshot ¡through ¡ loop init single ¡node ¡ state par. serial iteration § Non-­‑repe;;ve ¡data ¡(measurements) ¡ stored ¡explicitly ¡ 1 2 Phase = main/loop/ work; state=parallel; iteration=1 work 11 ¡ LLNL-PRES-675459

  12. Data ¡Format ¡ § Context ¡streams ¡include ¡performance/context ¡and ¡ ¡ metadata ¡records ¡of ¡a ¡single ¡Caliper ¡instance ¡ § Node ¡records ¡ describe ¡context ¡tree ¡and ¡metadata ¡(a[ributes) ¡ __rec=node,id=24,attr=8,data=iter,parent=23 § Context ¡records ¡combine ¡context ¡and ¡immediate ¡data ¡entries ¡ of ¡a ¡context ¡snapshot ¡ __rec=ctx,ref=25,attr=19=24,data=13=1 12 ¡ LLNL-PRES-675459

  13. Data ¡Processing ¡/ ¡Analysis ¡Stack ¡ Caliper-instrumented Caliper-instrumented Process process In-memory data store In-memory data store Context stream Context stream On-line or off-line parallel Local DB merge / aggregation Global DB Analysis 13 ¡ LLNL-PRES-675459

  14. Annota:on ¡API ¡ #include <Annotation.h> § cali::Annotation int main(int argc, char* argv[]) — Encapsulates ¡a[ribute ¡ { cali::Annotation phase_ann("phase"); § begin() phase_ann.begin("init"); // Perform initialization — Append ¡new ¡value ¡ initialize(); phase_ann.end(); // ends “init” § set() phase_ann.begin("loop"); — Set ¡(overwrite) ¡value ¡ #pragma omp parallel for for (int i; i < MAX; ++i) { cali::Annotation("iteration").set(i); § end() do_work(i); } — Remove ¡last ¡value ¡ phase_ann.end(); // ends “loop” } 14 ¡ LLNL-PRES-675459

  15. Service ¡API ¡ § Instrumenta;on ¡+ ¡context ¡query ¡for ¡measurement ¡services ¡and ¡ third-­‑party ¡tools ¡ — push_context() • Trigger ¡snapshot ¡and ¡write ¡to ¡stream ¡ — pull_context() • Trigger ¡and ¡pull ¡snapshot ¡ — create_attribute() • Creates ¡a[ribute ¡ — begin() / end() / set() • Set ¡values ¡ — ( ¡Query ¡API ¡) ¡(not ¡defined ¡yet) ¡ § Callback ¡func;ons ¡for ¡various ¡events ¡ — E.g. ¡snapshot ¡triggered, ¡a[ribute ¡created, ¡value ¡changed, ¡… ¡ 15 ¡ LLNL-PRES-675459

  16. Measurement ¡Services ¡ Service Timer Timestamps and/or time duration Callpath Performs stack unwinding to retrieve call path MPI Wraps MPI functions and provides MPI rank OMPT OpenMP tools interface, provides thread ID, state, and OpenMP construct wrappers PAPI PAPI hardware counters 16 ¡ LLNL-PRES-675459

  17. Usage ¡(1): ¡Configure, ¡run ¡ § Link ¡caliper ¡library ¡ § Configure ¡ ¡ — Add ¡measurement ¡services, ¡set ¡output ¡flags ¡ $ export CALI_SERVICES_ENABLE=recorder:timestamp § Run ¡ $ ./test/cali-basic == CALIPER: Registered recorder service == CALIPER: Registered timestamp service == CALIPER: Initialized == CALIPER: Wrote 38 records. == CALIPER: Finished $ ls *.cali 150724-073336_479_ytM1by52l3yV.cali 17 ¡ LLNL-PRES-675459

  18. Usage ¡(2): ¡Examine ¡ § cali-­‑query ¡expands ¡records ¡and ¡provides ¡basic ¡aggrega;on, ¡ filter, ¡and ¡merge ¡func;onality ¡ § Export ¡to ¡your ¡favorite ¡data ¡analy;cs ¡/ ¡visualiza;on ¡tool ¡ $ cali-query –e *.cali time.duration=221 phase=main time.duration=140 phase=main/init time.duration=15 phase=main time.duration=12 phase=main/loop time.duration=18 iteration=0 phase=main/loop time.duration=15 iteration=1 phase=main/loop time.duration=7 iteration=2 phase=main/loop time.duration=6 iteration=3 phase=main/loop time.duration=10 phase=main/loop time.duration=13 phase=main time.duration=7 18 ¡ LLNL-PRES-675459

  19. Ongoing ¡Work ¡ § On-­‑line ¡aggrega;on ¡ — Turns ¡Caliper ¡into ¡a ¡“real” ¡profiler ¡ § Complex ¡datatypes ¡ — Describes ¡layout ¡of ¡binary ¡blobs ¡ § Scalable ¡cross-­‑process ¡on-­‑line ¡merge ¡/ ¡aggrega;on ¡ — Use ¡MRNet ¡ 19 ¡ LLNL-PRES-675459

  20. Further ¡Informa:on ¡ § Available ¡on ¡github ¡LLNL ¡LC ¡Stash: ¡ h[ps://lc.llnl.gov/stash/projects/PIPER/repos/caliper/browse ¡ § BSD ¡License ¡ § Release ¡version ¡available ¡soon ¡ § Contact: ¡ ¡ ¡David ¡Boehme ¡ ¡ ¡boehme3@llnl.gov ¡ 20 ¡ LLNL-PRES-675459

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend