I have been trying different methods of timing subroutines in order to measure performance. Since I am calling an MKL method, I decided to try mkl_get_cpu_clocks() which as the name suggests returns elaspsed CPU clock ticks. Of course, I also need to know the core frequency to convert the measurement to seconds so I call the mkl_get_cpu_frequency() function. However, I noticed that although the initial speed reported is the expected 1.05 GHz, the value drops once the computational kernel begins executing. Here are the approximate frequencies being reported for a given number of threads per core: 2 threads 1.0 GHz, 3 threads 0.9 GHz, and 4 threads 0.8 GHz. Are the core frequencies in fact being dynamically adjusted?
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.