$ likwid-perfctr -C S0:0@S1:0 -g MEM ./example 1
412,892,333/sec
+-----------------------------+-------------+---------+
| Metric | core 0 | core 1 |
+-----------------------------+-------------+---------+
| Runtime (RDTSC) [s] | 7.81101 | 7.81101 |
| Runtime unhalted [s] | 0.00114729 | 5.27201 |
| CPI | 1.40394 | 2.24556 |
| Memory bandwidth [MBytes/s] | 0.0760854 | 2159.91 | <--- Look here
| Memory data volume [GBytes] | 0.000594304 | 16.871 |
+-----------------------------+-------------+---------+
Next, we run with 2 threads. One thread on socket 0 core 0 (0 on diagram above), another on socket 1, core 0 (1 on diagram above)
$ likwid-perfctr -C S0:0@S1:0 -g MEM ./example 2
Thread 1: 218,808,992/sec
Thread 2: 223,619,536/sec
+-----------------------------+---------+---------+
| Metric | core 0 | core 1 |
+-----------------------------+---------+---------+
| Runtime (RDTSC) [s] | 11.9734 | 11.9734 |
| Runtime unhalted [s] | 8.15541 | 8.19745 |
| CPI | 3.47251 | 3.49166 |
| Memory bandwidth [MBytes/s] | 1404.88 | 1405.07 | <--- Look here
| Memory data volume [GBytes] | 16.8212 | 16.8234 | memory bandwidth
+-----------------------------+---------+---------+ looks shared!