c - openMP and how to check cache behavior parallelism -
i using openmp parallelize loops in code in order optimize it
i hear openmp shows or bad cache behavior
how see these cache interactions arrange cache behavior openmp omp pragma loop program?
openmp cannot used information cache usage of program. depending on platform there tools give insights cache behavior.
on linux systems can use perf.
perf stat -e cache-references,cache-misses <your-exe>
outputs statistics cache-misses. there lot more events can used (see here further details). common events collected if run:
perf stat <your-exe>
another tool can used windows intel® performance counter monitor. although works intel cpus can collect additional information occupied memory bandwidth (on supported models).
however, tools can measure cache usage of program, did not improve it. have manually optimize code , recheck if cache misses have been reduced.
Comments
Post a Comment