lecture 12 analysis visualization tools
play

Lecture 12: Analysis/Visualization Tools Abhinav Bhatele, Department - PowerPoint PPT Presentation

High Performance Computing Systems (CMSC714) Lecture 12: Analysis/Visualization Tools Abhinav Bhatele, Department of Computer Science Summary of last lecture Performance analysis Identify performance bottlenecks, anomalies


  1. High Performance Computing Systems (CMSC714) Lecture 12: Analysis/Visualization Tools Abhinav Bhatele, Department of Computer Science

  2. Summary of last lecture • Performance analysis • Identify performance bottlenecks, anomalies • Measurement, analysis, visualization tools • Tracing and profiling • Calling context trees, graphs Abhinav Bhatele, CMSC714 2

  3. MPI trace visualization Jumpshot Vampir Abhinav Bhatele, CMSC714 3

  4. Projections Performance Analysis Tool • For Charm++/Adaptive MPI programs • Instrumentation library • Records data at the granularity of chares (Charm++ objects) Abhinav Bhatele, CMSC714 4

  5. Time Profile https://charm.readthedocs.io/en/latest/projections/manual.html Abhinav Bhatele, CMSC714 5

  6. Usage Profile & Histogram View Abhinav Bhatele, CMSC714 6

  7. Usage Profile & Histogram View Abhinav Bhatele, CMSC714 6

  8. Outlier Analysis Abhinav Bhatele, CMSC714 7

  9. Scripting for multi-run comparisons Abhinav Bhatele, CMSC714 8

  10. Hatchet • Hatchet enables programmatic analysis of parallel profiles • Leverages pandas which supports multi-dimensional tabular datasets • Create a structured index to enable indexing pandas dataframes by nodes in a graph • A set of operators to filter, prune and/or aggregate structured data Abhinav Bhatele, CMSC714 9

  11. Dataframe operation: filter 496 497 498 499 500 501 502 503 504 505 506 1 gf = GraphFrame( ... ) 507 filtered_gf = gf.filter(lambda x: x[ � time � ] > 10.0) 2 508 Abhinav Bhatele, CMSC714 10

  12. Graph operation: squash main physics solvers mpi hypre mpi psm2 psm2 1 gf = GraphFrame( ... ) filtered_gf = gf.filter(lambda x: x[ � time � ] > 10.0) 2 Abhinav Bhatele, CMSC714 11

  13. Graph operation: squash main main filter physics solvers physics solvers mpi hypre mpi mpi hypre mpi psm2 psm2 psm2 psm2 1 gf = GraphFrame( ... ) filtered_gf = gf.filter(lambda x: x[ � time � ] > 10.0) 2 Abhinav Bhatele, CMSC714 11

  14. Graph operation: squash main main main squash filter physics solvers physics solvers physics hypre psm2 mpi hypre mpi mpi hypre mpi psm2 psm2 psm2 psm2 psm2 1 gf = GraphFrame( ... ) filtered_gf = gf.filter(lambda x: x[ � time � ] > 10.0) 1 filtered_gf = gf.filter(lambda x: x[ � time � ] > 10.0) squashed_gf = filtered_gf.squash () 2 2 Abhinav Bhatele, CMSC714 11

  15. Graphframe operation: subtract 612 main 613 main main 614 physics solvers 615 physics solvers physics solvers — = 616 mpi hypre mpi 617 mpi hypre mpi mpi hypre mpi 618 psm2 psm2 psm2 psm2 psm2 psm2 619 620 621 1 gf1 = GraphFrame( ... ) 622 2 gf2 = GraphFrame( ... ) 623 3 4 gf2 -= gf1 624 625 Abhinav Bhatele, CMSC714 12

  16. Visualizing output sum. The es one foo bar qux waldo addition for two quux fred Graphviz corge xyzzy object. bar thud foo printed output the eration bar qux waldo Flamegraph graphs baz grault quux fred garply computes the subtract corge plugh xyzzy one of assignment bar grault garply thud graphframe from baz grault baz garply Terminal output Abhinav Bhatele, CMSC714 13

  17. Generating a flat profile 1 gf = GraphFrame () 2 gf.from_hpctoolkit( � kripke � ) 3 grouped = gf.dataframe.groupby( � name � ).sum() 4 Abhinav Bhatele, CMSC714 14

  18. Generating a flat profile 1 gf = GraphFrame () 1 gf = GraphFrame () 2 gf.from_hpctoolkit( � kripke � ) 2 gf.from_hpctoolkit( � kripke � ) 3 3 grouped = gf.dataframe.groupby( � name � ).sum() grouped = gf.dataframe.groupby( � module � ).sum() 4 4 Abhinav Bhatele, CMSC714 14

  19. Degree of load imbalance 1 gf1 = GraphFrame () 2 gf1.from_caliper( � lulesh -512 cores � ) 3 4 gf2 = gf1.copy() 5 6 gf1.drop_index_levels(function=np.mean) 7 gf2.drop_index_levels(function=np.max) 8 9 gf1.dataframe[ � imbalance � ] = gf2.dataframe[ � time � ].div(gf1.dataframe[ � time � ]) 10 Abhinav Bhatele, CMSC714 15

  20. Degree of load imbalance 1 gf1 = GraphFrame () 2 gf1.from_caliper( � lulesh -512 cores � ) 3 4 gf2 = gf1.copy() 5 6 gf1.drop_index_levels(function=np.mean) 7 gf2.drop_index_levels(function=np.max) 8 9 gf1.dataframe[ � imbalance � ] = gf2.dataframe[ � time � ].div(gf1.dataframe[ � time � ]) 10 Abhinav Bhatele, CMSC714 15

  21. Comparing two profiles 1 gf1 = GraphFrame () 2 gf1.from_caliper( � lulesh -27 cores � ) 3 4 gf2 = GraphFrame () 5 gf2.from_caliper( � lulesh -512 cores � ) 6 filtered_gf1 7 = gf1.filter(lambda x: x[ � name � ]. startswith( � MPI � )) 8 filtered_gf2 9 = gf2.filter(lambda x: x[ � name � ]. startswith( � MPI � )) 10 11 squashed_gf1 = filtered_gf1.squash () 12 squashed_gf2 = filtered_gf2.squash () 13 14 diff_gf = squashed_gf2 - squashed_gf1 15 Abhinav Bhatele, CMSC714 16

  22. Comparing two profiles 1 gf1 = GraphFrame () 2 gf1.from_caliper( � lulesh -27 cores � ) 3 4 gf2 = GraphFrame () 5 gf2.from_caliper( � lulesh -512 cores � ) 6 filtered_gf1 7 = gf1.filter(lambda x: x[ � name � ]. startswith( � MPI � )) 8 filtered_gf2 9 = gf2.filter(lambda x: x[ � name � ]. startswith( � MPI � )) 10 11 squashed_gf1 = filtered_gf1.squash () 12 squashed_gf2 = filtered_gf2.squash () 13 14 diff_gf = squashed_gf2 - squashed_gf1 15 Abhinav Bhatele, CMSC714 16

  23. Comparing several profiles for scaling datasets = glob.glob( � lulesh *.json � ) 1 datasets.sort() 2 3 dataframes = [] 4 5 for dataset in datasets: gf = GraphFrame () 6 gf.from_caliper(dataset) 7 gf.drop_index_levels () 8 9 num_pes = re.match( � (.*) -(\d+)(.*) � , dataset).group (2) 10 gf.dataframe[ � pes � ] = num_pes 11 filtered_gf = gf.filter(lambda x: x[ � time � ] > 1e6) 12 dataframes.append(filtered_gf.dataframe) 13 14 15 result = pd.concat(dataframes) pivot_df = result.pivot(index= � pes � , columns= � name � , values 16 = � time � ) pivot_df.loc[:,:]. plot.bar(stacked=True , figsize =(10 ,7)) 17 Abhinav Bhatele, CMSC714 17

  24. Questions Scaling Applications to Massively Parallel Machines Using Projections … • What is AMPI? • Is there any standardized data format to store performance profiling/analysis results? • Does Projections support heterogeneous systems (like a node with a CPU and multiple GPUs)? • Performance analysis and tuning, in general, seems to incorporate a lot of experience and hand crafting. Are there tools that generate suggestions for possible code modifications based on the profiling result? • Can we go over the load balancing? Why does the balance look a little worse (and the overall load higher) after refinement? The paper talks about quirks in background load leading to underutilization in a range of processors. What sorts of quirks can lead to this type of behavior? • How do parallel simulators work? The paper mentions BigSim. Is this a popular one? Is it common for people to use a simulator before running on a large supercomputer? Abhinav Bhatele, CMSC714 18

  25. Questions Hatchet: Pruning the Overgrowth of Parallel Profiles • What is the definition of reproducibility in performance analysis? • A programmable tool is great to automate analysis, but I guess a dedicated interactive GUI is also very useful for some analysis. Are there plans to incorporate such elements? • Which profiling tool is most recommended to generate profile data for the processing with Hatchet? • Is the library open-sourced, or are there any plans? • How is it that the drop_index_levels performance is able to remain basically constant until getting to about 256 processors? Also, what's with the strange shape of the filter performance graph? And is 512 processors as the max for the performance test for the tool a little on the low end? Would the analysis tool be usable to look at profiling results from a real or simulated run on a supercomputer? • Hatchet is ~2.5k lines of code. What were some of the most complicated parts to implement? Could you go over the design of the code briefly Abhinav Bhatele, CMSC714 19

  26. Questions? Abhinav Bhatele 5218 Brendan Iribe Center (IRB) / College Park, MD 20742 phone: 301.405.4507 / e-mail: bhatele@cs.umd.edu

Recommend


More recommend