<?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 rdtsc anomaly in Intel® Moderncode for Parallel Architectures</title>
    <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/rdtsc-anomaly/m-p/898496#M4115</link>
    <description>Neither you nor the original poster specified which compiler you intend to use, or which defines were set, so the reasonable assumption was made that correcting the obvious error in combining low and high order parts would help.</description>
    <pubDate>Mon, 08 Mar 2010 18:37:08 GMT</pubDate>
    <dc:creator>TimP</dc:creator>
    <dc:date>2010-03-08T18:37:08Z</dc:date>
    <item>
      <title>rdtsc anomaly</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/rdtsc-anomaly/m-p/898492#M4111</link>
      <description>I wrote a test program to compare the results from rdtsc and gettimeofday. I ran the test of Nehalem X5570. I understand that this platform has Invariant TSC.&lt;BR /&gt;&lt;BR /&gt;The test program is as follows:&lt;BR /&gt;1. start = x86_get_timer();&lt;BR /&gt;2. while loop downcounting register value from 2.93e+09 till 0&lt;BR /&gt;3. end = x86_get_timer();&lt;BR /&gt;4. Display the result.&lt;BR /&gt;&lt;BR /&gt;With just the above steps, the result printed varying drastically. I can't explain why it is so, even when I do taskset to run the program.&lt;BR /&gt;&lt;BR /&gt;I added gettimeofday calls before and after to compare the results. The results of both rdtsc and gettimeofday were consistent, but the result of gettimeofday is almost half of rdtsc value.&lt;BR /&gt;&lt;BR /&gt;I've attached the program for readers to review and comment.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;SlackMack</description>
      <pubDate>Tue, 11 Aug 2009 04:10:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/rdtsc-anomaly/m-p/898492#M4111</guid>
      <dc:creator>slackmack</dc:creator>
      <dc:date>2009-08-11T04:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: rdtsc anomaly</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/rdtsc-anomaly/m-p/898493#M4112</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;Try&lt;BR /&gt;&lt;BR /&gt;
&lt;PRE&gt;[cpp]    return ((((unsigned long long)hi)&amp;lt;&amp;lt;32) | (lo &amp;amp; 0xffffffff));[/cpp]&lt;/PRE&gt;
&lt;BR /&gt;Jim Dempsey&lt;BR /&gt;</description>
      <pubDate>Tue, 11 Aug 2009 12:28:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/rdtsc-anomaly/m-p/898493#M4112</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2009-08-11T12:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: rdtsc anomaly</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/rdtsc-anomaly/m-p/898494#M4113</link>
      <description>&lt;DIV&gt;
&lt;DIV id="quote_reply"&gt;
&lt;DIV&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/99850"&gt;jimdempseyatthecove&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;Try&lt;BR /&gt;&lt;BR /&gt;
&lt;PRE&gt;[cpp]    return ((((unsigned long long)hi)&amp;lt;&amp;lt;32) | (lo &amp;amp; 0xffffffff));[/cpp]&lt;/PRE&gt;
&lt;BR /&gt;Jim Dempsey&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
With Intel or Microsoft compilers, the _rdtsc() macro takes care of this stuff, and the return value may be treated as unsigned long long int.&lt;BR /&gt;</description>
      <pubDate>Wed, 12 Aug 2009 01:01:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/rdtsc-anomaly/m-p/898494#M4113</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2009-08-12T01:01:57Z</dc:date>
    </item>
    <item>
      <title>rdtsc anomaly</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/rdtsc-anomaly/m-p/898495#M4114</link>
      <description>Does the suggested solution work?</description>
      <pubDate>Mon, 08 Mar 2010 17:23:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/rdtsc-anomaly/m-p/898495#M4114</guid>
      <dc:creator>zhen436</dc:creator>
      <dc:date>2010-03-08T17:23:58Z</dc:date>
    </item>
    <item>
      <title>rdtsc anomaly</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/rdtsc-anomaly/m-p/898496#M4115</link>
      <description>Neither you nor the original poster specified which compiler you intend to use, or which defines were set, so the reasonable assumption was made that correcting the obvious error in combining low and high order parts would help.</description>
      <pubDate>Mon, 08 Mar 2010 18:37:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/rdtsc-anomaly/m-p/898496#M4115</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2010-03-08T18:37:08Z</dc:date>
    </item>
  </channel>
</rss>

