... | @@ -29,6 +29,7 @@ If you use only the 4 basic calls, those are the rules: |
... | @@ -29,6 +29,7 @@ If you use only the 4 basic calls, those are the rules: |
|
|
|
|
|
# Topics
|
|
# Topics
|
|
|
|
|
|
|
|
* [Placement of `LIKWID_MARKER_INIT`](https://github.com/RRZE-HPC/likwid/wiki/LikwidMarkerAPIPitfalls#placement-of-likwid_marker_init)
|
|
* [My code region is quite short](https://github.com/RRZE-HPC/likwid/wiki/LikwidMarkerAPIPitfalls#my-code-region-is-quite-short)
|
|
* [My code region is quite short](https://github.com/RRZE-HPC/likwid/wiki/LikwidMarkerAPIPitfalls#my-code-region-is-quite-short)
|
|
* [The measured times for multiple threads vary although all perform the same operation](https://github.com/RRZE-HPC/likwid/wiki/LikwidMarkerAPIPitfalls#the-measured-times-for-multiple-threads-vary-although-all-perform-the-same-operation)
|
|
* [The measured times for multiple threads vary although all perform the same operation](https://github.com/RRZE-HPC/likwid/wiki/LikwidMarkerAPIPitfalls#the-measured-times-for-multiple-threads-vary-although-all-perform-the-same-operation)
|
|
* [What about `LIKWID_MARKER_THREADINIT`?](https://github.com/RRZE-HPC/likwid/wiki/LikwidMarkerAPIPitfalls#what-about-likwid_marker_threadinit)
|
|
* [What about `LIKWID_MARKER_THREADINIT`?](https://github.com/RRZE-HPC/likwid/wiki/LikwidMarkerAPIPitfalls#what-about-likwid_marker_threadinit)
|
... | @@ -37,6 +38,10 @@ If you use only the 4 basic calls, those are the rules: |
... | @@ -37,6 +38,10 @@ If you use only the 4 basic calls, those are the rules: |
|
* [Resetting the results of a region](https://github.com/RRZE-HPC/likwid/wiki/LikwidMarkerAPIPitfalls#resetting-the-results-of-a-region)
|
|
* [Resetting the results of a region](https://github.com/RRZE-HPC/likwid/wiki/LikwidMarkerAPIPitfalls#resetting-the-results-of-a-region)
|
|
* [LIKWID measures FP operations with MarkerAPI for non-FP code](https://github.com/RRZE-HPC/likwid/wiki/LikwidMarkerAPIPitfalls#likwid-measures-fp-operations-with-markerapi-for-non-fp-code)
|
|
* [LIKWID measures FP operations with MarkerAPI for non-FP code](https://github.com/RRZE-HPC/likwid/wiki/LikwidMarkerAPIPitfalls#likwid-measures-fp-operations-with-markerapi-for-non-fp-code)
|
|
|
|
|
|
|
|
# Placement of `LIKWID_MARKER_INIT`
|
|
|
|
|
|
|
|
The MarkerAPI get initialized with `LIKWID_MARKER_INIT`. This does not only include the MarkerAPI logic itself but sets up the whole LIKWID stack including register access checks, starting of separate processes and other quite expensive operations. It is recommended to execute it **early** in the execution process (for C/C++ projects: put it in the beginning of main) because loaded libraries might affect this initialization. We got reports of deadlocks if `LIKWID_MARKER_INIT` is located after the first OpenMP call. So, to avoid problems, call `LIKWID_MARKER_INIT` early in the execution and `LIKWID_MARKER_CLOSE` late in the exection.
|
|
|
|
|
|
# My code region is quite short
|
|
# My code region is quite short
|
|
|
|
|
|
It is simple to put instrumentation calls inside your application, but always remember, they have overhead which (in most cases) does not come from LIKWID directly but the system calls to access the hardware counters. Independent of the `ACCESSMODE` you selected at `config.mk`, system calls are executed. Of course, if you use more events, the overhead is getting larger.
|
|
It is simple to put instrumentation calls inside your application, but always remember, they have overhead which (in most cases) does not come from LIKWID directly but the system calls to access the hardware counters. Independent of the `ACCESSMODE` you selected at `config.mk`, system calls are executed. Of course, if you use more events, the overhead is getting larger.
|
... | | ... | |