<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic One time measurement is not in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Getting-different-time-measurement-while-runs-a-same-code/m-p/1014856#M19425</link>
    <description>&lt;P&gt;One time measurement is not meaningful. In this case, statistical number might help. For example, you can run a group of consecutive measurement, ignore the max number and min number, and calculate the standard deviation of this group of number. If the standard deviation is lower than a criteria, then take the average value of the numbers as the run time of the program.&lt;/P&gt;

&lt;P&gt;Another thing you might need to consider is the busy level of the computer when you take the measurement. For the same program, when your computer is super busy on other tasks, the run time of this program may be much higher than when the computer is not busy. Then the question is how the compare the results of the two measurement. So you need a benchmark if you want to compare the results.&lt;/P&gt;</description>
    <pubDate>Mon, 04 Aug 2014 01:44:51 GMT</pubDate>
    <dc:creator>Yu__Tao</dc:creator>
    <dc:date>2014-08-04T01:44:51Z</dc:date>
    <item>
      <title>Getting different time measurement while runs a same code</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Getting-different-time-measurement-while-runs-a-same-code/m-p/1014851#M19420</link>
      <description>&lt;P&gt;hi.,&lt;/P&gt;

&lt;P&gt;as i'm running a example code in intel mkl directory /opt/intel/composer_xe_2013_sp1.0.080/mkl/examples/spblasc with the following time function:&lt;/P&gt;

&lt;P&gt;#include&amp;lt;mkl.h&amp;gt;&lt;/P&gt;

&lt;P&gt;double time_st = dsecnd();&lt;/P&gt;

&lt;P&gt;// function call&lt;/P&gt;

&lt;P&gt;double time_end = dsecnd();&lt;BR /&gt;
	&amp;nbsp;double time_avg = (time_end - time_st)/LOOP_COUNT;&lt;/P&gt;

&lt;P&gt;printf("Average time: %e secs n", time_avg);&lt;/P&gt;

&lt;P&gt;getting different results all the time.&lt;/P&gt;

&lt;P&gt;can I get to know why this is happinning. and how to overcome from this problem.&lt;/P&gt;

&lt;P&gt;thanku&lt;/P&gt;

&lt;P&gt;regrads:&lt;/P&gt;

&lt;P&gt;prash r.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Aug 2014 05:54:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Getting-different-time-measurement-while-runs-a-same-code/m-p/1014851#M19420</guid>
      <dc:creator>prash_r_</dc:creator>
      <dc:date>2014-08-01T05:54:33Z</dc:date>
    </item>
    <item>
      <title>Are suggest me if there is </title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Getting-different-time-measurement-while-runs-a-same-code/m-p/1014852#M19421</link>
      <description>&lt;P&gt;Are suggest me if there is&amp;nbsp; any other way to measure the time.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Aug 2014 07:12:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Getting-different-time-measurement-while-runs-a-same-code/m-p/1014852#M19421</guid>
      <dc:creator>prash_r_</dc:creator>
      <dc:date>2014-08-01T07:12:09Z</dc:date>
    </item>
    <item>
      <title>Hi Prash, </title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Getting-different-time-measurement-while-runs-a-same-code/m-p/1014853#M19422</link>
      <description>&lt;P&gt;Hi Prash,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;What is your problem size and loop account , and what is your OS and hardware type?&lt;/P&gt;

&lt;P&gt;The article may be help :&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;A href="https://software.intel.com/en-us/articles/a-simple-example-to-measure-the-performance-of-an-intel-mkl-function.&amp;nbsp;" target="_blank"&gt;https://software.intel.com/en-us/articles/a-simple-example-to-measure-the-performance-of-an-intel-mkl-function.&amp;nbsp;&lt;/A&gt;;&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#666666" face="Arial, Tahoma, Helvetica, sans-serif"&gt;&lt;SPAN style="font-size: 14px; line-height: 16.799999237060547px;"&gt;As currently OS have mutil-tasks runing almost at all times and out of order&amp;nbsp;execution&amp;nbsp;within CPU. &amp;nbsp;So many factors contribute to the&amp;nbsp;performance of an Intel MKL subroutine, such as problem size, memory size, parallelism, states of caches, branch prediction logic, OS resource scheduled and so on. that is why we usually use statistical number as performance measure and &amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN style="color: rgb(102, 102, 102); font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 14px; line-height: 16.799999237060547px;"&gt;described&lt;/SPAN&gt;&lt;FONT color="#666666" face="Arial, Tahoma, Helvetica, sans-serif"&gt;&lt;SPAN style="font-size: 14px; line-height: 16.799999237060547px;"&gt;&amp;nbsp;a tips&amp;nbsp;in the article :&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN style="color: rgb(102, 102, 102); font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 14px; line-height: 16.799999237060547px;"&gt;ignore the time required by the first Intel MKL call.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#666666" face="Arial, Tahoma, Helvetica, sans-serif"&gt;&lt;SPAN style="font-size: 14px; line-height: 16.799999237060547px;"&gt;Best Regards,&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#666666" face="Arial, Tahoma, Helvetica, sans-serif"&gt;&lt;SPAN style="font-size: 14px; line-height: 16.799999237060547px;"&gt;Ying&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Aug 2014 08:54:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Getting-different-time-measurement-while-runs-a-same-code/m-p/1014853#M19422</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2014-08-01T08:54:46Z</dc:date>
    </item>
    <item>
      <title> </title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Getting-different-time-measurement-while-runs-a-same-code/m-p/1014854#M19423</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;If running on multple cpu platform while excluding competing tasks, setting omp_proc_bind should help.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Aug 2014 12:52:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Getting-different-time-measurement-while-runs-a-same-code/m-p/1014854#M19423</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2014-08-01T12:52:24Z</dc:date>
    </item>
    <item>
      <title>As @Ying H wrote in his</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Getting-different-time-measurement-while-runs-a-same-code/m-p/1014855#M19424</link>
      <description>&lt;P&gt;As @Ying H wrote in his response there are a lot of factors&amp;nbsp; which can contribute to variation in function timing between consecutive measurement and beetwen consecutive test runs.&lt;/P&gt;

&lt;P&gt;For example main thread which is running the code of timed function between two runs of tests could have been swapped out by more priviledged thread for varying amount of time.&lt;/P&gt;</description>
      <pubDate>Sun, 03 Aug 2014 14:14:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Getting-different-time-measurement-while-runs-a-same-code/m-p/1014855#M19424</guid>
      <dc:creator>Bernard</dc:creator>
      <dc:date>2014-08-03T14:14:55Z</dc:date>
    </item>
    <item>
      <title>One time measurement is not</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Getting-different-time-measurement-while-runs-a-same-code/m-p/1014856#M19425</link>
      <description>&lt;P&gt;One time measurement is not meaningful. In this case, statistical number might help. For example, you can run a group of consecutive measurement, ignore the max number and min number, and calculate the standard deviation of this group of number. If the standard deviation is lower than a criteria, then take the average value of the numbers as the run time of the program.&lt;/P&gt;

&lt;P&gt;Another thing you might need to consider is the busy level of the computer when you take the measurement. For the same program, when your computer is super busy on other tasks, the run time of this program may be much higher than when the computer is not busy. Then the question is how the compare the results of the two measurement. So you need a benchmark if you want to compare the results.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Aug 2014 01:44:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Getting-different-time-measurement-while-runs-a-same-code/m-p/1014856#M19425</guid>
      <dc:creator>Yu__Tao</dc:creator>
      <dc:date>2014-08-04T01:44:51Z</dc:date>
    </item>
    <item>
      <title>hi, thank you all for a</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Getting-different-time-measurement-while-runs-a-same-code/m-p/1014857#M19426</link>
      <description>&lt;P&gt;hi, thank you all for a excellent explanation.&lt;/P&gt;

&lt;P&gt;it there any effect on time if i clear the cache memory each time using&lt;/P&gt;

&lt;P&gt;command: sync; echo 3 | sudo tee /proc/sys/vm/drop_caches ?&lt;/P&gt;

&lt;P&gt;regards:&lt;/P&gt;

&lt;P&gt;prash r.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Aug 2014 05:25:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Getting-different-time-measurement-while-runs-a-same-code/m-p/1014857#M19426</guid>
      <dc:creator>prash_r_</dc:creator>
      <dc:date>2014-08-04T05:25:55Z</dc:date>
    </item>
    <item>
      <title>@prash</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Getting-different-time-measurement-while-runs-a-same-code/m-p/1014858#M19427</link>
      <description>&lt;P&gt;@prash&lt;/P&gt;

&lt;P&gt;If you are on Windows you can increase thread executing priority to even Real-Time for the period of the timing. By doing this you can decrease the context switching frequency of your thread. This should help to achieve more accurate result of timing measurement.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Aug 2014 14:13:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Getting-different-time-measurement-while-runs-a-same-code/m-p/1014858#M19427</guid>
      <dc:creator>Bernard</dc:creator>
      <dc:date>2014-08-04T14:13:21Z</dc:date>
    </item>
  </channel>
</rss>

