<?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 Questions about my Parallel Sort Library ... in Intel® Moderncode for Parallel Architectures</title>
    <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Questions-about-my-Parallel-Sort-Library/m-p/822795#M1281</link>
    <description>&lt;P&gt;&lt;BR /&gt;jarto wrote:&lt;BR /&gt;&amp;gt;Yes, I can reproduce the same problem with ctHeapSort.&lt;BR /&gt;&amp;gt; It can also be reproduced with Delphi 7.&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.lazarus.freepascal.org/index.php/topic,9359.msg46017/topicseen.html#new"&gt;http://www.lazarus.freepascal.org/index.php/topic,9359.msg46017/topicseen.html#new&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Here it is jarto , i have solved the problem, you can &lt;BR /&gt;download version 2.11 from my website:&lt;/P&gt;&lt;P&gt;&lt;A href="http://pages.videotron.com/aminer/"&gt;http://pages.videotron.com/aminer/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Please test it and tell me if all is ok...&lt;/P&gt;&lt;P&gt;Note: the problem was not on my algorithm , it was &lt;BR /&gt; very difficult to spot the problem ...&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Sincerely,&lt;BR /&gt;Amine.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 11 May 2010 14:35:23 GMT</pubDate>
    <dc:creator>aminer10</dc:creator>
    <dc:date>2010-05-11T14:35:23Z</dc:date>
    <item>
      <title>Questions about my Parallel Sort Library ...</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Questions-about-my-Parallel-Sort-Library/m-p/822794#M1280</link>
      <description>&lt;P&gt;&lt;BR /&gt;jarto wrote:&lt;BR /&gt;&amp;gt;Here's an updated version of my test program. In this one you &lt;BR /&gt;&amp;gt;can specify the number of names as a command line argument. &lt;BR /&gt;&amp;gt;It also saves the original names and results as text files as long&lt;BR /&gt;&amp;gt;as number of names does not exceed 100000.&lt;/P&gt;&lt;P&gt;&amp;gt;&lt;A href="http://www.starsoft.fi/jarto/ParallelSortTest2.zip" target="_blank"&gt;http://www.starsoft.fi/jarto/ParallelSortTest2.zip&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;With my Dell Latitute E5500 with 2,40GHz P8600 I got this kind of results:&lt;/P&gt;&lt;P&gt;&amp;gt;Cores: 2&lt;BR /&gt;&amp;gt;4000000 names sorted in 00:13:360&lt;BR /&gt;&amp;gt;Cores: 1&lt;BR /&gt;&amp;gt;4000000 names sorted in 00:24:000&lt;/P&gt;&lt;P&gt;&amp;gt;But the biggest concern was, that the result files did not always match. &lt;BR /&gt;&amp;gt;One or a few names were not sorted properly in some of the test runs.&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.lazarus.freepascal.org/index.php/topic,9359.0.html"&gt;http://www.lazarus.freepascal.org/index.php/topic,9359.0.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;As i have noticed , you are using this:&lt;BR /&gt;&lt;BR /&gt;Intel Pentium Processor E5500 &lt;BR /&gt;(2M Cache, 2.80 GHz, 800 MHz FSB)&lt;/P&gt;&lt;P&gt;&lt;A href="http://ark.intel.com/Product.aspx?id=42800"&gt;http://ark.intel.com/Product.aspx?id=42800&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It has only *1* L2 cache of 2M.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have used CPU-Z on my hardware:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.cpuid.com/cpuz.php"&gt;http://www.cpuid.com/cpuz.php&lt;/A&gt; &lt;/P&gt;&lt;P&gt;and it gives me this:&lt;/P&gt;&lt;P&gt;Level 1 Data: 4 x 34 KBytes 8ways &lt;BR /&gt;Level 1 Inst.: 4 x 34 KBytes 8 ways &lt;BR /&gt;Level 2: 2 x 4096 KBytes 16 ways &lt;/P&gt;&lt;P&gt;So, mine has *2* L2 caches of 4M&lt;/P&gt;&lt;P&gt;So, when i am quicksorting a big array on 1 core , &lt;BR /&gt;there is much higher cache misses than &lt;BR /&gt;on 2 threads/2 cores - cause i am breaking the array &lt;BR /&gt;in 4 parts and quicksorting in parallel, also , &lt;BR /&gt;i have 2 x L2 caches of 4M - and you have only one &lt;BR /&gt;one on your E5500 - and this explains my results...&lt;/P&gt;&lt;P&gt;&amp;gt;But the biggest concern was, that the result files did not &lt;BR /&gt;&amp;gt;always &amp;gt;match. One or a few names were not sorted &lt;BR /&gt;&amp;gt;properly in some of the test runs.&lt;/P&gt;&lt;P&gt;As i have noticed, you are using this:&lt;/P&gt;&lt;P&gt;TestParallelSort(10000,1,4); //Tests 10000 names with 1 -&amp;gt; 4 cores.&lt;/P&gt;&lt;P&gt;The number of cores *MUST* be 2^N: 1,2,4 etc. &lt;/P&gt;&lt;P&gt;I have reproduced your problem with a number of cores &lt;BR /&gt;equal to 3. &lt;/P&gt;&lt;P&gt;So, you have to avoid *3*, example: 1,2,4,6,8,10,12,14,16 etc.&lt;/P&gt;&lt;P&gt;Try to use a number that is not 3 and that is 2^N,&lt;BR /&gt;example: 1,2,4,6,8 ,10,12,14,16 etc. &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;And you will be safe :)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Welcome: &lt;A href="http://pages.videotron.com/aminer/"&gt;http://pages.videotron.com/aminer/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Sincerely,&lt;BR /&gt;Amine Moulay Ramdane.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 May 2010 04:41:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Questions-about-my-Parallel-Sort-Library/m-p/822794#M1280</guid>
      <dc:creator>aminer10</dc:creator>
      <dc:date>2010-05-11T04:41:57Z</dc:date>
    </item>
    <item>
      <title>Questions about my Parallel Sort Library ...</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Questions-about-my-Parallel-Sort-Library/m-p/822795#M1281</link>
      <description>&lt;P&gt;&lt;BR /&gt;jarto wrote:&lt;BR /&gt;&amp;gt;Yes, I can reproduce the same problem with ctHeapSort.&lt;BR /&gt;&amp;gt; It can also be reproduced with Delphi 7.&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.lazarus.freepascal.org/index.php/topic,9359.msg46017/topicseen.html#new"&gt;http://www.lazarus.freepascal.org/index.php/topic,9359.msg46017/topicseen.html#new&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Here it is jarto , i have solved the problem, you can &lt;BR /&gt;download version 2.11 from my website:&lt;/P&gt;&lt;P&gt;&lt;A href="http://pages.videotron.com/aminer/"&gt;http://pages.videotron.com/aminer/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Please test it and tell me if all is ok...&lt;/P&gt;&lt;P&gt;Note: the problem was not on my algorithm , it was &lt;BR /&gt; very difficult to spot the problem ...&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Sincerely,&lt;BR /&gt;Amine.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 May 2010 14:35:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Questions-about-my-Parallel-Sort-Library/m-p/822795#M1281</guid>
      <dc:creator>aminer10</dc:creator>
      <dc:date>2010-05-11T14:35:23Z</dc:date>
    </item>
  </channel>
</rss>

