Presentation is loading. Please wait.

Presentation is loading. Please wait.

Advanced TAU Commander

Similar presentations


Presentation on theme: "Advanced TAU Commander"— Presentation transcript:

1 Advanced TAU Commander
ParaTools, Inc. 28 September 2017 Webex from Baltimore, MD

2 Build Systems and Launchers
ParaTools, Inc. Build Systems and Launchers Copyright © ParaTools, Inc.

3 Autotools Initialize before running configure:
tau initialize If the project is already initialized, be sure you don’t have an “expensive” experiment selected, e.g. tracing or profiling with lots of options. ./configure CC=“tau gcc” Recommend --disable-dependency-tracking to avoid problems with source-based instrumentation. No worries if only sampling. make && make install If you change your experiment you do not have to reconfigure, just recompile: make clean Copyright © ParaTools, Inc.

4 CMake This should work: If it doesn’t, use the wrapper scripts:
cmake -DCMAKE_C_COMPILER=“tau gcc” If it doesn’t, use the wrapper scripts: export PATH=$PWD/.tau/bin/<target_name> cmake -DCMAKE_C_COMPILER=“tau_gcc” Wrapper scripts are automatically generated for all compilers supported by the target. Wrapper for <compiler> is “tau_<compiler>” E.g. tau_gcc, tau_mpicc, tau_oshcc, etc. Wrappers can be used for any build system that doesn’t like spaces in the compiler name. Copyright © ParaTools, Inc.

5 Running with custom launchers
tau trial create \ --launcher mylauncher -np 4 -- \ ./a.out bar baz Use the --launcher flag to indicate the launcher command and arguments. Use “--” to mark the beginning of the application command line. tau mpirun -np 4 ./a.out 20 is shorthand for: tau trial create --launcher mpirun –np /a.out 20 Copyright © ParaTools, Inc.

6 Profiling Parallel Applications
ParaTools, Inc. Profiling Parallel Applications Copyright © ParaTools, Inc.

7 Step 1: Initialize TAU Project
$ cp -R /path/to/taucmdr-1.2.0/examples $HOME $ cd $HOME/examples/matmult_omp $ ls Makefile  matmult.f90 $ tau initialize --mpi --openmp Creates a new project configuration using defaults Project files exist in a directory named “.tau” Like git, all directories below the directory containing the “.tau” directory can access the project E.g. `tau dashboard` works in miniapp1/baseline WARNING: Don’t execute tau initialize in $HOME! (this bug is fixed in version ) Copyright © ParaTools, Inc.

8 matmult_omp Dashboard
Copyright © ParaTools, Inc.

9 Edit matmult_omp/Makefile
Before 1 F90 = mpifort 2 FFLAGS = -O -g 3 LIBS= -fopenmp After   1 F90 = tau mpif90   2 FFLAGS = -O -g   3 LIBS= -fopenmp Copyright © ParaTools, Inc.

10 Build matmult_omp Copyright © ParaTools, Inc.

11 Run matmult_omp Copyright © ParaTools, Inc.

12 Node for each MPI process
Copyright © ParaTools, Inc.

13 Open Windows | 3D Visualization
Copyright © ParaTools, Inc.

14 Event-based Sampling Data from Rank 0
Copyright © ParaTools, Inc.

15 Event-based Sampling Data from Rank 1&2
Copyright © ParaTools, Inc.

16 Node for each MPI process
But hey, where are the threads? Copyright © ParaTools, Inc.

17 Threads Not Instrumented by Default
To keep overhead low, OpenMP directives are not instrumented by default Create a new measurement (or edit an existing measurement) to enable thread-level instrumentation. Copyright © ParaTools, Inc.

18 From `tau measurement edit –help`
Copyright © ParaTools, Inc.

19 Rebuild to instrument OpenMP with OMPT
$ tau measurement copy profile profile.ompt \ openmp=ompt Copyright © ParaTools, Inc.

20 Tracing Parallel Applications
ParaTools, Inc. Tracing Parallel Applications Copyright © ParaTools, Inc.

21 Measurement Approaches
Profiling Tracing Shows how much time was spent in each routine Shows when events take place on a timeline Copyright © ParaTools, Inc.

22 Different Nodes, Different Timelines
Copyright © ParaTools, Inc.

23 View Time Lost Waiting for Send or Receive
Copyright © ParaTools, Inc.

24 Select the “trace” Measurement to Trace
$ tau select trace $ tau mpirun -np 16 ./matmult Copyright © ParaTools, Inc.

25 `tau show` Displays the Trace in Vampir
Copyright © ParaTools, Inc.

26 ParaTools, Inc. Profiling Heap Memory Copyright © ParaTools, Inc.

27 Measure Heap Memory Usage
From `tau measurement edit –help` $ tau measurement edit sample --heap-usage $ tau select sample $ make clean $ make $ tau mpirun -np 4 ./matmult Copyright © ParaTools, Inc.

28 Open the Context Event Window to See Heap Memory Usage
Right-click a node label to get this menu Copyright © ParaTools, Inc.

29 Heap Memory Usage on MPI Rank 1
Copyright © ParaTools, Inc.

30 Profiling CUDA / OpenCL
ParaTools, Inc. Profiling CUDA / OpenCL Copyright © ParaTools, Inc.

31 `tau init --cuda` Copyright © ParaTools, Inc.

32 Run with `tau` as usual Copyright © ParaTools, Inc.

33 GPUs are shown as “Threads”
Copyright © ParaTools, Inc.

34 Open the GPU “Thread” to see kernel time
Copyright © ParaTools, Inc.

35 Non-GPU threads show CUDA calls
Copyright © ParaTools, Inc.

36 Compiler-based Instrumentation
Copyright © ParaTools, Inc.

37 OpenCL OpenCL is pretty much the same: tau init --opencl tau gcc *.c
tau ./a.out Copyright © ParaTools, Inc.


Download ppt "Advanced TAU Commander"

Similar presentations


Ads by Google