... | ... | @@ -107,7 +107,14 @@ In some cases, you might see measurements like this: |
|
|
|
|
|
Let's look at one output (just an excerpt):
|
|
|
```
|
|
|
+-------------------+----------+----------+----------+----------+----------+----------+
|
|
|
| Region Info | Core 0 | Core 1 | Core 2 | Core 3 | Core 4 | Core 5 |
|
|
|
+-------------------+----------+----------+----------+----------+----------+----------+
|
|
|
| RDTSC Runtime [s] | 1.227251 | 0.975324 | 0.995353 | 1.005493 | 0.975347 | 0.975315 |
|
|
|
| call count | 20 | 20 | 20 | 20 | 20 | 20 |
|
|
|
+-------------------+----------+----------+----------+----------+----------+----------+
|
|
|
```
|
|
|
|
|
|
The problem with this code is that the first `LIKWID_MARKER_START` performs some operations that increases the runtime of the master thread (`Core 0`). You can see this especially if `ACCESSMODE=accessdaemon` because each application thread requires it's own instance of the access daemon to perform simultaneous access to the hardware registers (UNIX sockets connection between library and access daemon is not thread-safe). Other operations are the creation of hash table entries for the string `copy`. To fix this, we can tell the MarkerAPI, to do these operations already in a separate part of the application using `LIKWID_MARKER_REGISTER()`:
|
|
|
```
|
|
|
LIKWID_MARKER_INIT;
|
... | ... | |