<?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 Why Are Two Same Code and Data with Different Execution Time?  in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Why-Are-Two-Same-Code-and-Data-with-Different-Execution-Time/m-p/1082232#M62042</link>
    <description>&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Hi everyone,&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;I found that when I run the axpy(y&lt;I&gt; = x&lt;I&gt; * a + y&lt;I&gt;) with two separate set of similar data, I got the totally different execution time as following. The attached file is the sample code for axpy.&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;

&lt;P&gt;My assumption is that the first time to run the inout pragma has to spend the time to prepare/preconfigure/preheat the Xeon Phi Coprocessor. If so, is there any official explanation to explain this odd situation? If not, what is the reason? Is there any better way to make a improvement or avoid for this situation? &amp;nbsp;It's really important for the benchmark. Because compare to NVIDIA/INTEL GPU/CPU, this situation never happens.&lt;/P&gt;

&lt;P style="margin-bottom: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"&gt;[liu@fornax Test_offomp]$ ./a.out&lt;/P&gt;

&lt;P style="margin-bottom: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"&gt;Total time for inout1 combined &amp;nbsp; = 0.39732003 sec&lt;/P&gt;

&lt;P style="margin-bottom: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"&gt;Total time for inout2 combined &amp;nbsp; = 0.01132083 sec&lt;/P&gt;

&lt;P style="margin-bottom: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"&gt;&amp;nbsp;&lt;/P&gt;

&lt;P style="margin-bottom: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"&gt;Best wishes,&lt;/P&gt;

&lt;P style="margin-bottom: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"&gt;Jiawen&lt;/P&gt;</description>
    <pubDate>Tue, 12 Jan 2016 05:07:48 GMT</pubDate>
    <dc:creator>Jiawen_L_</dc:creator>
    <dc:date>2016-01-12T05:07:48Z</dc:date>
    <item>
      <title>Why Are Two Same Code and Data with Different Execution Time?</title>
      <link>https://community.intel.com/t5/Software-Archive/Why-Are-Two-Same-Code-and-Data-with-Different-Execution-Time/m-p/1082232#M62042</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Hi everyone,&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;I found that when I run the axpy(y&lt;I&gt; = x&lt;I&gt; * a + y&lt;I&gt;) with two separate set of similar data, I got the totally different execution time as following. The attached file is the sample code for axpy.&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;

&lt;P&gt;My assumption is that the first time to run the inout pragma has to spend the time to prepare/preconfigure/preheat the Xeon Phi Coprocessor. If so, is there any official explanation to explain this odd situation? If not, what is the reason? Is there any better way to make a improvement or avoid for this situation? &amp;nbsp;It's really important for the benchmark. Because compare to NVIDIA/INTEL GPU/CPU, this situation never happens.&lt;/P&gt;

&lt;P style="margin-bottom: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"&gt;[liu@fornax Test_offomp]$ ./a.out&lt;/P&gt;

&lt;P style="margin-bottom: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"&gt;Total time for inout1 combined &amp;nbsp; = 0.39732003 sec&lt;/P&gt;

&lt;P style="margin-bottom: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"&gt;Total time for inout2 combined &amp;nbsp; = 0.01132083 sec&lt;/P&gt;

&lt;P style="margin-bottom: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"&gt;&amp;nbsp;&lt;/P&gt;

&lt;P style="margin-bottom: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"&gt;Best wishes,&lt;/P&gt;

&lt;P style="margin-bottom: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"&gt;Jiawen&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jan 2016 05:07:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Why-Are-Two-Same-Code-and-Data-with-Different-Execution-Time/m-p/1082232#M62042</guid>
      <dc:creator>Jiawen_L_</dc:creator>
      <dc:date>2016-01-12T05:07:48Z</dc:date>
    </item>
    <item>
      <title>For offload code, the first</title>
      <link>https://community.intel.com/t5/Software-Archive/Why-Are-Two-Same-Code-and-Data-with-Different-Execution-Time/m-p/1082233#M62043</link>
      <description>&lt;P&gt;For offload code, the first time&amp;nbsp;offload has to copy in the MIC code of the application, and then instantiate the OpenMP thread pool.&lt;/P&gt;

&lt;P&gt;Whereas the second and later&amp;nbsp;offloads do not have to copy in the MIC code of the application, and also can re-use the existing OpenMP thread pool.&lt;/P&gt;

&lt;P&gt;There is an option to specify that the MIC code than be pre-loaded at program start time.&lt;/P&gt;

&lt;P&gt;Generally for timing your code you either disregard the first call of your timed region or prior to the timed region you induce an offload region that is not timed (this is once only at application start).&lt;/P&gt;

&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jan 2016 13:50:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Why-Are-Two-Same-Code-and-Data-with-Different-Execution-Time/m-p/1082233#M62043</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2016-01-12T13:50:16Z</dc:date>
    </item>
  </channel>
</rss>

