Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
outils_analyse:hpctoolkit [2016/04/20 13:45] – [Installed versions] adminoutils_analyse:hpctoolkit [2016/04/20 14:18] (Version actuelle) – [Links] admin
Ligne 15: Ligne 15:
  
 ===== HPCToolkit usage and displaying tools ===== ===== HPCToolkit usage and displaying tools =====
 +
 +3 steps are needed to analyse and display profile and trace data.
  
 ==== Dynamically linked applications ==== ==== Dynamically linked applications ====
Ligne 24: Ligne 26:
 </code> </code>
 ==== Recover static program structure ==== ==== Recover static program structure ====
 +
 Next, we must recover the static program structure from the linked binary, for which there is a tool named ''hpcstruct'', typically launched with no extra arguments:  Next, we must recover the static program structure from the linked binary, for which there is a tool named ''hpcstruct'', typically launched with no extra arguments: 
  
Ligne 31: Ligne 34:
  
 This will build a representation of the program's structure in ''cpi.hpcstruct'' (e.g. loop nesting, inlining) to be used later when profiling/tracing, so that performance metrics may accurately be associated with the correct code construct (be it a loop or a procedure).  This will build a representation of the program's structure in ''cpi.hpcstruct'' (e.g. loop nesting, inlining) to be used later when profiling/tracing, so that performance metrics may accurately be associated with the correct code construct (be it a loop or a procedure). 
 +
 +
 +Execution differs in that ''hpcrun'' should be used to launch the executable (in addition to mpirun):
 +
 +<code bash>
 +$ mpirun -np 8 hpcrun <hpcrun-args> ./cpi
 +</code>
 +The argument for ''hpcrun'' will define which measurements will be made, and how often. By default, HPCToolkit comes with a handful of events; a list may be obtained via the following command:
 +
 +<code bash>
 +$ hpcrun -L ./cpi
 +
 +</code>
 +
 +Events are passed as arguments of the form ''--event E_I@P_I'', where:
 +
 +  * ''E_I'': event identifier (''WALLCLOCK'', ''MEMLEAK'', etc);
 +  * ''P_1'': period in units meaningful to the event: microseconds for ''WALLCLOCK'', cycles for ''PAPI_TOT_CYC'', cache misses for ''PAPI_L2_DCA'', etc. 
 +
 +
 +For example:
 +
 +<code bash>
 +$ mpirun -np 16 hpcrun --event PAPI_L2_TCM@10000 --event PAPI_L2_DCA@10000  ./cpi
 +</code>
 +
 +This will create a folder named ''hpctoolkit-cpi-measurements'', with entries for every rank used during runtime.
 +
 +
 +
 ==== Analyze measurements ==== ==== Analyze measurements ====
  
 +Finally, we combine the measurements with the program structure, obtaining the final profiling database, using the command ''hpcprof'':
 +
 +<code bash>
 +
 +$ hpcprof -S cpi.hpcstruct -I ./'*' hpctoolkit-cpi-measurements
 +
 +</code>
 +
 +The parameter ''-I'' should point to the folder containing the program's source code
 ==== Display results ==== ==== Display results ====
 +Display results using hpcviewer:
 +
 +<code bash>
 +$ hpcviewer hpctoolkit-cpi-database
 +</code>
 +
 +{{ :outils_analyse:hpctoolkit.png?600 |}}
 +
 +=== Tracing ===
 +
 +
 +To get tracing information, the flag ''-t'' should be passed to ''hpcrun''. 
 +
 +We now point hpctraceviewer to the database folder:
 +
 +<code bash>
 +$ hpctraceviewer hpctoolkit-cpi-database
 +
 +</code>
 +
 +====== Links ======
 +
 +  * http://hpctoolkit.org/
  • outils_analyse/hpctoolkit.1461159909.txt.gz
  • Dernière modification : 2016/04/20 13:45
  • de admin