Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| outils_analyse:tau [2015/02/27 13:27] – créée admin | outils_analyse:tau [2016/04/22 09:04] (Version actuelle) – admin | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| - | ====== | + | ====== |
| + | TAU is an MPI program analyzer. It generates all necessary information during the program | ||
| + | execution, so that it can be read after it and displayed by a specialized program. | ||
| - | **Problème **: Comment déboguer une application parallèle MPI (Intel MPI) ? | ||
| - | **Solution **: Intel fournit un outil, ITAC, puissant et facile à utiliser. | ||
| - | <note tip>Pour OpenMPI utiliser [[Scalasca|Scalasca]]</ | + | ===== Installed version ===== |
| - | ** Pré-requis ** | + | |
| + | | ||
| - | Besoin d'une application MPI à compiler avec Intel MPI | + | use |
| - | < | + | example |
| - | **Exemple de programme** : send/ | ||
| + | <code bash> | ||
| - | <file c sendreceive.c> | + | $ module avail perf/tau |
| + | </ | ||
| + | |||
| + | ===== TAU usage and displaying tools ===== | ||
| - | #include "mpi.h" | + | - **Dynamic Instrumentation**: |
| + | - **Compiler-Based Instrumentation**: | ||
| - | #include < | + | ==== Dynamic Instrumentation ==== |
| - | int main(argc, | ||
| - | int argc; | ||
| - | char *argv[]; | ||
| - | int numtasks, rank, dest, source, rc, count, tag=1; | ||
| - | char inmsg, outmsg=' | ||
| - | MPI_Status Stat; | ||
| - | MPI_Init(& | + | <note tip> |
| - | MPI_Comm_size(MPI_COMM_WORLD, | + | |
| - | MPI_Comm_rank(MPI_COMM_WORLD, | + | * TAU_TRACE=1 |
| + | * TAU_PROFILE=1 | ||
| + | * TAU_COMM_MATRIX=1 default 0) to view 3D communication matrix | ||
| - | if (rank == 0) { | + | </ |
| - | dest = 1; | + | |
| - | source = 1; | + | |
| - | rc = MPI_Send(& | + | |
| - | rc = MPI_Recv(& | + | |
| - | } | + | |
| - | else if (rank == 1) { | + | - Load the needed tau <code bash>$ module load perf/ |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | - After this it will have generated some output files, merge them with the next command <code bash>$ tau2slog2 tau.trc tau.edf -o tau.slog2</ |
| - | | + | |
| + | | ||
| - | rc = MPI_Get_count(& | ||
| - | printf(" | ||
| - | rank, count, Stat.MPI_SOURCE, | ||
| + | ==== Compiler-Based Instrumentation==== | ||
| + | |||
| + | For each compiler type there is TAU wrapper, for example: | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| - | MPI_Finalize(); | + | Tau warapper uses '' |
| - | } | + | |
| - | </file> | + | - Compile programs <code bash> |
| + | - Run program as usual <code bash> | ||
| + | - Follow steps 4, 5, 6 like for dynamic instrumentation | ||
| - | **Compilation**: pour générer les traces on utilise l'option **-trace** | + | You can also view profilers information with: '' |
| - | <code bash> | + | ==== Example ==== |
| - | $ mpiicc sendreceive.c -trace -o sendreceive | + | Let's profile/trace program (simple Jacobi iteration) |
| - | </code> | + | |
| - | **Exécution du programme** | + | **Tracing**\\ |
| <code bash> | <code bash> | ||
| - | $ mpirun -np 2 ./sendreceive | + | |
| + | $ module load perf/ | ||
| + | |||
| + | $ mpicc jacobi.c -o jacobi | ||
| + | |||
| + | $ mpirun -np 4 tau_exec | ||
| + | |||
| + | $ tau_treemerge.pl | ||
| + | |||
| + | $ tau2slog2 tau.trc tau.edf -o tau.slog2 | ||
| + | |||
| + | $ jumpshot tau.slog2 | ||
| </ | </ | ||
| + | {{: | ||
| - | <note tip>A la fin de l' | ||
| - | ** Lancement de l' | + | ---- |
| + | |||
| + | |||
| + | **Profiling**\\ | ||
| + | We need to pack all the profiles.* files in a | ||
| + | unique one: | ||
| <code bash> | <code bash> | ||
| - | $ traceanalyzer sendreceive.stf | + | $ paraprof --pack tau.ppk |
| + | |||
| + | </ | ||
| + | Now, we can visualize the tau.ppk file by using | ||
| + | Paraprof | ||
| + | <code bash> | ||
| + | $ paraprof | ||
| </ | </ | ||
| - | **Exemple d'un écran graphique de l' | + | <note tip> |
| - | {{:capture-intel_trace_analyzer.png?800*200|}} | + | {{:profile.png?300|}} {{: |
| - | * http:// | ||