| ... | ... | @@ -8,6 +8,7 @@ title: Profilage de Code |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Code profilers
|
|
|
|
|
|
|
|
In this Wiki, we will provide a methodology to install and run some code profilers. This has been tested on a specific
|
| ... | ... | @@ -99,14 +100,11 @@ In the TAU folder, activate the `profilers` environment and type |
|
|
|
./configure -prefix=$PROFILER_PATH/ -papi=$PROFILER_PATH/ -pdt=$PROFILER_PATH/ -mpi -c++=g++ -cc=gcc -fortran=gfortran
|
|
|
|
make install
|
|
|
|
```
|
|
|
|
{{< panel header="**Note**" header-bg="blue" >}}
|
|
|
|
NOTE DESCRIPTION
|
|
|
|
{{< /panel >}}
|
|
|
|
|
|
|
|
> [!CAUTION]
|
|
|
|
> **CAUTION**
|
|
|
|
> In TAU, each set of compile options generate a specific Makefile. In the above, the generated Makefile will include PAPI, PDT, Score-P and MPI. To compile a non-MPI program, re-compile TAU without the `-mpi` option
|
|
|
|
|
|
|
|
> [!important]
|
|
|
|
> **IMPORTANT!**
|
|
|
|
> The `-scorep` options does not work due to a failure of shared library building of Score-P
|
|
|
|
|
|
|
|
## Profile
|
| ... | ... | @@ -207,6 +205,30 @@ For example |
|
|
|
scorep-g++ test_cpp.cpp -o test.exe
|
|
|
|
```
|
|
|
|
|
|
|
|
As with TAU, the user can also control which part of the code will be profiled. This is done by creating a `scorep.filt` file as follows:
|
|
|
|
|
|
|
|
```
|
|
|
|
SCOREP_FILE_NAMES_BEGIN # This is a comment
|
|
|
|
EXCLUDE */filtering/filter*
|
|
|
|
INCLUDE */filter_test.c
|
|
|
|
SCOREP_FILE_NAMES_END
|
|
|
|
|
|
|
|
SCOREP_REGION_NAMES_BEGIN
|
|
|
|
EXCLUDE *
|
|
|
|
INCLUDE bar foo
|
|
|
|
baz
|
|
|
|
main
|
|
|
|
SCOREP_REGION_NAMES_END
|
|
|
|
```
|
|
|
|
|
|
|
|
The next step is to export the `SCOREP_FILTERING_FILE` environment variable and point to the `scorep.filt` file:
|
|
|
|
|
|
|
|
```
|
|
|
|
export SCOREP_FILTERING_FILE=/path/to/scorep.filt
|
|
|
|
```
|
|
|
|
|
|
|
|
With this variable defined, the user can recompile the code.
|
|
|
|
|
|
|
|
The next step is to run your code:
|
|
|
|
|
|
|
|
```
|
| ... | ... | @@ -219,8 +241,6 @@ A `scorep-` folder will appear containing all the profiling informations. It can |
|
|
|
paraprof scorep-20250310_1624_81500554863145/profile.cubex &
|
|
|
|
```
|
|
|
|
|
|
|
|
Note that `.cubex` can also be analysed using the Cube software, available as an App Image [here](https://apps.fz-juelich.de/scalasca/releases/cube/4.8/dist/CubeGUI-4.8.2.AppImage):
|
|
|
|
|
|
|
|
```
|
|
|
|
CubeGUI-4.8.2.AppImage scorep-20250310_1624_81500554863145/profile.cubex &
|
|
|
|
``` |
|
|
|
> **Note**:
|
|
|
|
> `.cubex` files can also be analysed using the Cube software, available as an App Image [here](https://apps.fz-juelich.de/scalasca/releases/cube/4.8/dist/CubeGUI-4.8.2.AppImage):
|
|
|
|
> `CubeGUI-4.8.2.AppImage scorep-20250310_1624_81500554863145/profile.cubex &` |