<?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 I have wrote:&amp;quot;But Amine, you in Intel® Moderncode for Parallel Architectures</title>
    <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Here-is-my-proof/m-p/952191#M5200</link>
    <description>&lt;P&gt;I have wrote:&lt;BR /&gt;"But Amine, you have said that the Amdahl's law predict scalability&lt;BR /&gt;of the worst case contention scenario , so the Amdahl's calculation in parallel computing looks like the calculation of&amp;nbsp; the worst case complexity in computer science?&lt;BR /&gt;&lt;BR /&gt;That's right, cause what is, in your opinion , the purpose of the Amdahl's law if it's not to predict worst case scalability by calculating the maximum bound of time time inside the critical sections and the maximum bound of the time inside the parallel part and doing the Amdahl's calculation to predict the worst case contention scenario&lt;BR /&gt;hence the worst case scalability? so i think this will predict that the scalability will be equal or greater to the result that we have&lt;BR /&gt;found with the Amdahl's law. This is the purpose of Amdahl's law:&lt;BR /&gt;it's also to predict the worst case scalability."&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;To do a better scalability prediction, you have to use the&lt;BR /&gt;same number of threads than the number of cores, and each &lt;BR /&gt;thread must run a a separate core, to avoid context switches &lt;BR /&gt;and you have to use Locks that lower better the cache-coherence traffic,&lt;BR /&gt;such us the scalable Anderson Lock or the scalable MCS Lock &lt;BR /&gt;or my scalable and distributed fair Lock, and try to find a maximum &lt;BR /&gt;bound of the time inside your critical sections and maximum bound &lt;BR /&gt;inside of the time inside the parallel part , and do the Amdahl's calculation with them to find the result of the worst case scalability, so the scalability will equal or be greater to this result. I think&amp;nbsp; this is the purpose of the Amdahl's law: to predict the worst case scalability.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thank you,&lt;BR /&gt;Amine Moulay Ramdne.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 10 Oct 2013 18:31:31 GMT</pubDate>
    <dc:creator>aminer10</dc:creator>
    <dc:date>2013-10-10T18:31:31Z</dc:date>
    <item>
      <title>Here is my proof</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Here-is-my-proof/m-p/952186#M5195</link>
      <description>&lt;P&gt;Hello, &lt;BR /&gt; &lt;BR /&gt;I have noticed that Robert Wessel didn't understood my ideas.. &lt;BR /&gt; &lt;BR /&gt;So i will prove it to you right now , so follow with me carefully please... &lt;BR /&gt; &lt;BR /&gt;Let say we have 4 threads, and 4 cores, and let say that each &lt;BR /&gt;thread is running the same parallel code, and let say we have also a serial code inside some critical section, and let say that the parallel part is &lt;BR /&gt;0.1% and the serial part is 0.9%, so let say that the serial part &lt;BR /&gt;takes 1 second(it means 0.1%) and the parallel part takes 9 seconds(it means 0.9%), what i have tried to explain to you is that the Amadhl's law or equation&amp;nbsp; is not a correct law and it doesn't give a correct results, &lt;BR /&gt;here is why: so if the 4 threads are all looping and looping again &lt;BR /&gt;for a number of times running the same parallel code and the same serial code and let say that they are contending at the same time &lt;BR /&gt;for the critical section, this&amp;nbsp; is why i have called an ideal contention &lt;BR /&gt;scenario, so if they&amp;nbsp; are contending AT THE SAME TIME for the critical section(the serial part) they will run 4 serial parts in 4 seconds in one loop&amp;nbsp; and they will run 4 parallel parts in 9 seconds in one loop, hence it will take 13 seconds in one loop , but&amp;nbsp; if you run the parallel part and the serial part serially they will take 40 seconds, so the scalability will equal 40 seconds divide by 13 seconds = 3.07X, this is the result that gives us the Amdahl's law, it's 1 /(0.1 + 0.9/4) = 3.07X, but this is not the end of the story , so follow now carefully with me, so let divide the parallel part into 9 small parts&amp;nbsp; each equal to &lt;BR /&gt;1 seconds, and the serial part is equal to 1 second, so if the threads &lt;BR /&gt;are looping and not contending at the same time for the critical section and let say that when the threads are looping the first thread will be on the first small part equal to 1 seconds of the 9 small parts of the 9 seconds of the parallel part ,&amp;nbsp; the second thread will be on the second small part equal to 1 seconds of the 9 parts of the 9 seconds of the parallel part, and the third threads will be on the third small part equal to 1 second of the 9 parts of the 9 seconds of the parallel part , and the fourth thread will be on the third small part equal to 1 second of the 9 parts of the 9 seconds of the parallel part , so imagine the 4 threads &lt;BR /&gt;looping again and again and not changing there places like that , so &lt;BR /&gt;there will be no serial part at all, cause when each thread will be on the 1 second of the serial part the other threads will not be on the the same serial part, so this is a none contention scenario , so since &lt;BR /&gt;there is no serial part so the scalability will be perfect and &lt;BR /&gt;equal to 4X , so as you have noticed the Amdahl equation gives &lt;BR /&gt;the scalability of the ideal contention scenario all the threads &lt;BR /&gt;are contending at the same time so the scalability will equal 3.07X, but if they are not contending at all the scalability will be perfect &lt;BR /&gt;and equal to 4X, and if you have less contention this will scale &lt;BR /&gt;better than 3.07X,&amp;nbsp; so now i have proved to you that the Amdahl's law &lt;BR /&gt;doesn't give you a correct result. &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;Hope you have understood my arguments and my ideas against the &lt;BR /&gt;Amdahl's law. &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;Thank you, &lt;BR /&gt;Amine Moulay Ramdane. &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2013 03:29:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Here-is-my-proof/m-p/952186#M5195</guid>
      <dc:creator>aminer10</dc:creator>
      <dc:date>2013-10-10T03:29:11Z</dc:date>
    </item>
    <item>
      <title>Hello,</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Here-is-my-proof/m-p/952187#M5196</link>
      <description>&lt;P&gt;&lt;BR /&gt;Hello,&lt;/P&gt;
&lt;P&gt;I&amp;nbsp; correct some typos, please read gain...&lt;/P&gt;
&lt;P&gt;I will prove it to you again, so follow with me carefully please...&lt;BR /&gt;&lt;BR /&gt;Let say we have 4 threads, and 4 cores, and let say that each&lt;BR /&gt;thread is running the same parallel code, and let say we have also a serial code inside some critical section, and let say that the parallel part is&lt;BR /&gt;0.1% and the serial part is 0.9%, so let say that the serial part&lt;BR /&gt;takes 1 second(it means 0.1%) and the parallel part takes 9 seconds(it means 0.9%), what i have tried to explain to you is that the Amadhl's law or equation&amp;nbsp; is not a correct law and it doesn't give a correct results,&lt;BR /&gt;here is why: so if the 4 threads are all looping and looping again&lt;BR /&gt;for a number of times running the same parallel code and the same serial code and let say that they are contending at the same time&lt;BR /&gt;for the critical section, this&amp;nbsp; is why i have called an ideal contention&lt;BR /&gt;scenario, so if they&amp;nbsp; are contending AT THE SAME TIME for the critical section(the serial part) they will run 4 serial parts in 4 seconds in one loop&amp;nbsp; and they will run 4 parallel parts in 9 seconds in one loop, hence it will take 13 seconds in one loop , but&amp;nbsp; if you run the parallel part and the serial part serially they will take 40 seconds, so the scalability will equal 40 seconds divide by 13 seconds = 3.07X, this is the result that gives us the Amdahl's law, it's 1 /(0.1 + 0.9/4) = 3.07X, but this is not the end of the story , so follow now carefully with me, so let divide the parallel part into 9 small parts&amp;nbsp; each equal to&lt;BR /&gt;1 seconds, and the serial part is equal to 1 second, so if the threads&lt;BR /&gt;are looping and not contending at the same time for the critical section and let say that when the threads are looping the first thread will be on the first small part equal to 1 seconds of the 9 small parts of the 9 seconds of the parallel part ,&amp;nbsp; the second thread will be on the second small part equal to 1 seconds of the 9 parts of the 9 seconds of the parallel part, and the third threads will be on the third small part equal to 1 second of the 9 parts of the 9 seconds of the parallel part , and the fourth thread will be on the fourth small part equal to 1 second of the 9 parts of the 9 seconds of the parallel part , so imagine the 4 threads&lt;BR /&gt;looping again and again and not changing there places like that , so&lt;BR /&gt;there will be no serial part at all, cause when each thread will be on the 1 second of the serial part the other threads will not be on the the same serial part, so this is a none contention scenario , so since&lt;BR /&gt;there is no serial part so the scalability will be perfect and&lt;BR /&gt;equal to 4X , so as you have noticed the Amdahl equation gives&lt;BR /&gt;the scalability of the ideal contention scenario all the threads&lt;BR /&gt;are contending at the same time so the scalability will equal 3.07X, but if they are not contending at all the scalability will be perfect&lt;BR /&gt;and equal to 4X, and if you have less contention this will scale&lt;BR /&gt;better than 3.07X,&amp;nbsp; so now i have proved to you that the Amdahl's law&lt;BR /&gt;doesn't give you a correct result.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hope you have understood my arguments and my ideas against the&lt;BR /&gt;Amdahl's law.&lt;BR /&gt;&lt;BR /&gt;And of course in my example each thread have the same number of loops and the same number of work, and each thread is running on a separate core in my example. so that you understand more my example. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thank you,&lt;BR /&gt;Amine Moulay Ramdane.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2013 04:25:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Here-is-my-proof/m-p/952187#M5196</guid>
      <dc:creator>aminer10</dc:creator>
      <dc:date>2013-10-10T04:25:43Z</dc:date>
    </item>
    <item>
      <title>I wrote: &gt; Hello, &gt; &gt; I think</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Here-is-my-proof/m-p/952188#M5197</link>
      <description>&lt;P&gt;I wrote: &lt;BR /&gt;&amp;gt; Hello, &lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt; I think i know what is my mistake: the serial part in &lt;BR /&gt;&amp;gt; the Amdahl's law is not the critical section, you must not &lt;BR /&gt;&amp;gt; confuse the two. &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;But, Amine,&amp;nbsp; how can you say that the serial part of the Amdahl's law is not &lt;BR /&gt;the critical section ? &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;In my example if you don't have context switches , and you have the same &lt;BR /&gt;number of threads than the number of cores, and the time inside the critical &lt;BR /&gt;section is constant and the time inside the parallel part is constant, so the Amdahl's law can predict the worst case contention scenario , that means when all the threads are contending for the same critical section, hence you can predict the worst case contention scenario by just&amp;nbsp; calculating the time inside the critical section and the time inside the parallel part and doing the Amdahl calculation, this will give you the &lt;BR /&gt;exact result for the worst case contention scenario, so as you have &lt;BR /&gt;noticed the serial part of the Amdahl equation is not only the critical section, it's the critical section with a context, so you have to take &lt;BR /&gt;into consideration also the context, that means the context of the worst case contention scenario. &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;Thank you, &lt;BR /&gt;Amine Moulay Ramdane. &lt;BR /&gt; &lt;BR /&gt; &lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2013 16:50:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Here-is-my-proof/m-p/952188#M5197</guid>
      <dc:creator>aminer10</dc:creator>
      <dc:date>2013-10-10T16:50:17Z</dc:date>
    </item>
    <item>
      <title>Hello,</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Here-is-my-proof/m-p/952189#M5198</link>
      <description>&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Hello, &lt;BR /&gt;&lt;BR /&gt;But how can we use the Amdahl's law to predict scalability ?&lt;BR /&gt;&lt;BR /&gt;You can not use the Amdahl's to predict the exact scalability, &lt;BR /&gt;i think , and i have explained it to you that the Amdahl's laws &lt;BR /&gt;in parallel computing gives you the scalability in the worst case contention scenario , so the Amdahl's calculation in parallel computing looks like the calculation of&amp;nbsp; the worst case complexity in computer science, so it can help to give the scalability &lt;BR /&gt;of the worst case contention scenario, so that help also &lt;BR /&gt;to predict worst case scalability, and if the serial part have not &lt;BR /&gt;a constant running time and the parallel part have not a constant runnning time you can try to find and choose a maximum bound of &lt;BR /&gt;the time to run the serial part and a maximum bound of the time to run the parallel part &lt;BR /&gt;and do the Amdahl's calculation and this will give you the scalability &lt;BR /&gt;for the worst case contention scenario, so the scalability will be equal &lt;BR /&gt;or greater than the scalability that you will find with the Amdahl's equation.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thank you,&lt;BR /&gt;Amine Moulay Ramdne.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2013 17:11:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Here-is-my-proof/m-p/952189#M5198</guid>
      <dc:creator>aminer10</dc:creator>
      <dc:date>2013-10-10T17:11:11Z</dc:date>
    </item>
    <item>
      <title>Hello,</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Here-is-my-proof/m-p/952190#M5199</link>
      <description>&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;But Amine, you have said that the Amdahl's law predict scalability&lt;BR /&gt;of the worst case contention scenario , so the Amdahl's calculation in parallel computing looks like the calculation of&amp;nbsp; the worst case complexity in computer science?&lt;BR /&gt;&lt;BR /&gt;That's right, cause what is, in your opinion , the purpose of the Amdahl's law if it's not to predict worst case scalability by calculating the maximum bound of time time inside the critical sections and the maximum bound of the time inside the parallel part and doing the Amdahl's calculation to predict the worst case contention scenario &lt;BR /&gt;hence the worst case scalability, so i think this will predict that the scalability will be equal or greater to the result that we have &lt;BR /&gt;found with the Amdahl's law. This is the purpose of Amdahl's law: &lt;BR /&gt;it's also to predict the worst case scalability.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thank you,&lt;BR /&gt;Amine Moulay Ramdane.&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2013 17:59:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Here-is-my-proof/m-p/952190#M5199</guid>
      <dc:creator>aminer10</dc:creator>
      <dc:date>2013-10-10T17:59:28Z</dc:date>
    </item>
    <item>
      <title>I have wrote:"But Amine, you</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Here-is-my-proof/m-p/952191#M5200</link>
      <description>&lt;P&gt;I have wrote:&lt;BR /&gt;"But Amine, you have said that the Amdahl's law predict scalability&lt;BR /&gt;of the worst case contention scenario , so the Amdahl's calculation in parallel computing looks like the calculation of&amp;nbsp; the worst case complexity in computer science?&lt;BR /&gt;&lt;BR /&gt;That's right, cause what is, in your opinion , the purpose of the Amdahl's law if it's not to predict worst case scalability by calculating the maximum bound of time time inside the critical sections and the maximum bound of the time inside the parallel part and doing the Amdahl's calculation to predict the worst case contention scenario&lt;BR /&gt;hence the worst case scalability? so i think this will predict that the scalability will be equal or greater to the result that we have&lt;BR /&gt;found with the Amdahl's law. This is the purpose of Amdahl's law:&lt;BR /&gt;it's also to predict the worst case scalability."&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;To do a better scalability prediction, you have to use the&lt;BR /&gt;same number of threads than the number of cores, and each &lt;BR /&gt;thread must run a a separate core, to avoid context switches &lt;BR /&gt;and you have to use Locks that lower better the cache-coherence traffic,&lt;BR /&gt;such us the scalable Anderson Lock or the scalable MCS Lock &lt;BR /&gt;or my scalable and distributed fair Lock, and try to find a maximum &lt;BR /&gt;bound of the time inside your critical sections and maximum bound &lt;BR /&gt;inside of the time inside the parallel part , and do the Amdahl's calculation with them to find the result of the worst case scalability, so the scalability will equal or be greater to this result. I think&amp;nbsp; this is the purpose of the Amdahl's law: to predict the worst case scalability.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thank you,&lt;BR /&gt;Amine Moulay Ramdne.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2013 18:31:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Here-is-my-proof/m-p/952191#M5200</guid>
      <dc:creator>aminer10</dc:creator>
      <dc:date>2013-10-10T18:31:31Z</dc:date>
    </item>
    <item>
      <title>If the serial portion of the</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Here-is-my-proof/m-p/952192#M5201</link>
      <description>&lt;P&gt;If the serial portion of the computation can be executed at the same time as the rest of the computation, then it's not serial, it's parallel.&amp;nbsp; So what you're saying is, Amdahl's Law never applies, because there's no such thing as serial work.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2013 20:52:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Here-is-my-proof/m-p/952192#M5201</guid>
      <dc:creator>Gregg_S_Intel</dc:creator>
      <dc:date>2013-10-10T20:52:30Z</dc:date>
    </item>
    <item>
      <title>Or to put it a different way:</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Here-is-my-proof/m-p/952193#M5202</link>
      <description>&lt;P&gt;Or to put it a different way: &lt;EM&gt;When you remove from consideration the serial portion of the code, then if you balance the load amongst available threads, you will have perfect scalability.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;/EM&gt;Amdahl's law encompances the serial portion of the code. In Amdahl's "law" there is no factor of overhead in entering and leaving parallel regions of code. Critical sections are a bit different than serial sections. With regard to&amp;nbsp;critical sections,&amp;nbsp;threads that have yet to reach&amp;nbsp;an owned critical section, and threads that&amp;nbsp;have passed through the critical section,&amp;nbsp;can continue to run while the critical section is held. In non-contending situations, critical sections have no impact on scalability, whereas serial sections do. Under the unique situation where all threads reach the critical section simulteanously,&amp;nbsp;use of&amp;nbsp;critical section is more scalabile than use of serial, when there is more work to do in parallel following the critical section. i.e. upon exiting the critical section, the exiting thread continues and one of the waiting threads resumes.&lt;/P&gt;
&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2013 12:43:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Here-is-my-proof/m-p/952193#M5202</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2013-10-11T12:43:28Z</dc:date>
    </item>
  </channel>
</rss>

