<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:clearspace="http://www.jivesoftware.com/xmlns/clearspace/rss" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Intel Communities: Message List - Using  "#pragma omp flush" in emulator</title>
    <link>http://communities.intel.com/community/marc?view=discussions</link>
    <description>Most recent forum messages</description>
    <language>en</language>
    <pubDate>Wed, 11 May 2011 09:13:28 GMT</pubDate>
    <generator>Jive SBS 5.0.2.0  (http://jivesoftware.com/products/clearspace/)</generator>
    <dc:date>2011-05-11T09:13:28Z</dc:date>
    <dc:language>en</dc:language>
    <item>
      <title>Re: Using  "#pragma omp flush" in emulator</title>
      <link>http://communities.intel.com/message/124565?tstart=0#124565</link>
      <description>&lt;!-- [DocumentBodyStart:740cfd6a-92ac-47b2-b65f-1b94793552a8] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Of course, here it is. Haven't seen it fail once, both on hardware and on emulator...&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The address arithmetic is now done by RCCE_put.&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:740cfd6a-92ac-47b2-b65f-1b94793552a8] --&gt;</description>
      <pubDate>Wed, 11 May 2011 09:13:28 GMT</pubDate>
      <author>webadmin@intel.com</author>
      <guid>http://communities.intel.com/message/124565?tstart=0#124565</guid>
      <dc:date>2011-05-11T09:13:28Z</dc:date>
      <clearspace:dateToText>2 years, 2 weeks ago</clearspace:dateToText>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: Using  "#pragma omp flush" in emulator</title>
      <link>http://communities.intel.com/message/124405?tstart=0#124405</link>
      <description>&lt;!-- [DocumentBodyStart:3c2c2eca-30dd-435a-b8c6-86e900f663ec] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Strange. I also build emulator with gcc.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;App behaves in this way:&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Sometimes it crashes -&amp;gt; Here I suspect the RCCE_barrier on emulator.&lt;/p&gt;&lt;p&gt;Sometimes Assert statement is false -&amp;gt; Here I am not sure how it can be explained. Maybe some coherence issues between omp threads.&lt;/p&gt;&lt;p&gt;And sometimes it works as it should.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Could you please send me the code that you already run on actual hardware?&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks,&lt;/p&gt;&lt;p&gt;Omid&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:3c2c2eca-30dd-435a-b8c6-86e900f663ec] --&gt;</description>
      <pubDate>Tue, 10 May 2011 14:34:05 GMT</pubDate>
      <author>webadmin@intel.com</author>
      <guid>http://communities.intel.com/message/124405?tstart=0#124405</guid>
      <dc:date>2011-05-10T14:34:05Z</dc:date>
      <clearspace:dateToText>2 years, 2 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>1</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: Using  "#pragma omp flush" in emulator</title>
      <link>http://communities.intel.com/message/124399?tstart=0#124399</link>
      <description>&lt;!-- [DocumentBodyStart:70d9ce64-46af-47a0-b679-a8700da99bcd] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;I can't get it to fail... I've also checked it against the latest revision of RCCE. Note that I am using gcc to build the RCCE emulator (default is icc).&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:70d9ce64-46af-47a0-b679-a8700da99bcd] --&gt;</description>
      <pubDate>Tue, 10 May 2011 11:50:27 GMT</pubDate>
      <author>webadmin@intel.com</author>
      <guid>http://communities.intel.com/message/124399?tstart=0#124399</guid>
      <dc:date>2011-05-10T11:50:27Z</dc:date>
      <clearspace:dateToText>2 years, 2 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>2</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: Using  "#pragma omp flush" in emulator</title>
      <link>http://communities.intel.com/message/124397?tstart=0#124397</link>
      <description>&lt;!-- [DocumentBodyStart:dab94362-81d2-4d00-816e-d499b91005fc] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;This is exactly my code which runs on emulator:&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br/&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;br/&gt;#include "../../include/RCCE_lib.h"&lt;br/&gt;#include "../../include/RCCE.h"&lt;br/&gt;#include&amp;lt;assert.h&amp;gt;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;int RCCE_APP(int argc, char** argv) {&lt;br/&gt;char *p;&lt;br/&gt;int ID, next, prev;&lt;br/&gt;RCCE_init(&amp;amp;argc, &amp;amp;argv);&lt;br/&gt;ID = RCCE_ue();&lt;br/&gt;next = (ID + 1) % RCCE_num_ues();&lt;br/&gt;prev = (ID - 1 &amp;gt;= 0) ? ID - 1 : RCCE_num_ues() - 1;&lt;br/&gt;p = (char *)RCCE_malloc(32);&lt;br/&gt;*(int *)p = 0;&lt;br/&gt;RCCE_barrier(&amp;amp;RCCE_COMM_WORLD);&lt;br/&gt;RCCE_acquire_lock(0);&lt;br/&gt;printf("Core %d writes ' %d ' to the MPB of core %d\n", ID, ID, next);&lt;br/&gt;*(int *)(p - (char *)RCCE_comm_buffer[ID] + (char *)RCCE_comm_buffer[next]) = ID;&lt;br/&gt;RCCE_release_lock(0);&lt;br/&gt;RCCE_barrier(&amp;amp;RCCE_COMM_WORLD);&lt;br/&gt;assert(*(int *)p == prev);&lt;br/&gt;RCCE_finalize();&lt;br/&gt;}&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;And RCCE version is : "1.0.13.x" and I am using the trunc revision.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I still have the same strange behaviour. Are you sure no "#pragma omp flush " is needed (befroe reads or after writes) in order to make changes made by one thread to shared variables be visible to others threads too?&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Omid&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:dab94362-81d2-4d00-816e-d499b91005fc] --&gt;</description>
      <pubDate>Tue, 10 May 2011 08:49:39 GMT</pubDate>
      <author>webadmin@intel.com</author>
      <guid>http://communities.intel.com/message/124397?tstart=0#124397</guid>
      <dc:date>2011-05-10T08:49:39Z</dc:date>
      <clearspace:dateToText>2 years, 2 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>3</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: Using  "#pragma omp flush" in emulator</title>
      <link>http://communities.intel.com/message/124285?tstart=0#124285</link>
      <description>&lt;!-- [DocumentBodyStart:78be3078-6e5d-46f5-bfff-887a9a9aa31e] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Also no problems on the hardware... The code is slightly different, with puts and gets to avoid caching and write-combining issues.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Could you post your code again?&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:78be3078-6e5d-46f5-bfff-887a9a9aa31e] --&gt;</description>
      <pubDate>Mon, 09 May 2011 16:48:21 GMT</pubDate>
      <author>webadmin@intel.com</author>
      <guid>http://communities.intel.com/message/124285?tstart=0#124285</guid>
      <dc:date>2011-05-09T16:48:21Z</dc:date>
      <clearspace:dateToText>2 years, 2 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>4</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: Using  "#pragma omp flush" in emulator</title>
      <link>http://communities.intel.com/message/124283?tstart=0#124283</link>
      <description>&lt;!-- [DocumentBodyStart:d6ad133f-4b2f-49e0-bbc3-a8f9059c6609] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Hmm, it seems to work. No problems when I run it on the emulator (older, revision 90)...&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I will test a version of the code on the actual hardware.&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:d6ad133f-4b2f-49e0-bbc3-a8f9059c6609] --&gt;</description>
      <pubDate>Mon, 09 May 2011 16:03:49 GMT</pubDate>
      <author>webadmin@intel.com</author>
      <guid>http://communities.intel.com/message/124283?tstart=0#124283</guid>
      <dc:date>2011-05-09T16:03:49Z</dc:date>
      <clearspace:dateToText>2 years, 2 weeks ago</clearspace:dateToText>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: Using  "#pragma omp flush" in emulator</title>
      <link>http://communities.intel.com/message/124269?tstart=0#124269</link>
      <description>&lt;!-- [DocumentBodyStart:3bf06326-6ce8-47d3-b344-f464e80b964d] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Thanks for the modified code. Executing the above code on emulator leads to 3 possible results:&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;(1) it works as we expect (each code copy its id to its right hand nieghbor in a round robin manner)&lt;/p&gt;&lt;p&gt;(2) Sometimes just one core copy its ID to the nieghbor core and then Assert statement will be false. (this behaviour is not expected)&lt;/p&gt;&lt;p&gt;(3) Sometimes it crashes in the middle of execution. (this is also unexpected)&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Could anyone test the above code on SCC platform, since we haven't got the platform yet? I want to understand whether the emulator is guilty or RCCE library (or maybe the code itself !).&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks,&lt;/p&gt;&lt;p&gt;Omid&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:3bf06326-6ce8-47d3-b344-f464e80b964d] --&gt;</description>
      <pubDate>Mon, 09 May 2011 14:14:15 GMT</pubDate>
      <author>webadmin@intel.com</author>
      <guid>http://communities.intel.com/message/124269?tstart=0#124269</guid>
      <dc:date>2011-05-09T14:14:15Z</dc:date>
      <clearspace:dateToText>2 years, 2 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>6</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: Using  "#pragma omp flush" in emulator</title>
      <link>http://communities.intel.com/message/123518?tstart=0#123518</link>
      <description>&lt;!-- [DocumentBodyStart:f1092095-66de-4b04-8da2-dd237479b9c4] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;I guess it's pointer related... The following example is adapted from your code. Could you check it?&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;char *p;&lt;/p&gt;&lt;p&gt;int ID, next, prev;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;RCCE_init(&amp;amp;argc, &amp;amp;argv);&lt;/p&gt;&lt;p&gt;ID = RCCE_ue();&lt;/p&gt;&lt;p&gt;next = (ID + 1) % RCCE_num_ues();&lt;/p&gt;&lt;p&gt;prev = (ID - 1 &amp;gt;= 0) ? ID - 1 : RCCE_num_ues() - 1;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;p = RCCE_malloc(32);&lt;/p&gt;&lt;p&gt;*(int *)p = 0;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;RCCE_barrier(&amp;amp;RCCE_COMM_WORLD);&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;RCCE_acquire_lock(0);&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;printf("Core %d writes to the MPB of core %d\n", ID, next);&lt;/p&gt;&lt;p&gt;*(int *)(p - (char *)RCCE_comm_buffer[ID] + (char *)RCCE_comm_buffer[next]) = ID;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;RCCE_release_lock(0);&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;RCCE_barrier(&amp;amp;RCCE_COMM_WORLD);&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;assert(*(int *)p == prev);&lt;/p&gt;&lt;p&gt;RCCE_finalize();&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:f1092095-66de-4b04-8da2-dd237479b9c4] --&gt;</description>
      <pubDate>Tue, 03 May 2011 14:18:31 GMT</pubDate>
      <author>webadmin@intel.com</author>
      <guid>http://communities.intel.com/message/123518?tstart=0#123518</guid>
      <dc:date>2011-05-03T14:18:31Z</dc:date>
      <clearspace:dateToText>2 years, 3 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>7</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: Using  "#pragma omp flush" in emulator</title>
      <link>http://communities.intel.com/message/123515?tstart=0#123515</link>
      <description>&lt;!-- [DocumentBodyStart:75ce1d73-cef2-4323-8c35-87fb5c8c5add] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Any ideas? Plus is there anything wrong with using 'pragma' in the middle of executing code?&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Omid&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:75ce1d73-cef2-4323-8c35-87fb5c8c5add] --&gt;</description>
      <pubDate>Tue, 03 May 2011 13:05:15 GMT</pubDate>
      <author>webadmin@intel.com</author>
      <guid>http://communities.intel.com/message/123515?tstart=0#123515</guid>
      <dc:date>2011-05-03T13:05:15Z</dc:date>
      <clearspace:dateToText>2 years, 3 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>8</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: Using  "#pragma omp flush" in emulator</title>
      <link>http://communities.intel.com/message/122996?tstart=0#122996</link>
      <description>&lt;!-- [DocumentBodyStart:00b05303-a5c3-432a-b6b9-6fcf5b8b0f5a] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Yes Ted, I am using pragma in the middle of the code. A simple test code is attached. You will see that a variable called 'size'&lt;/p&gt;&lt;p&gt;in core B is incremented by core A, but sometimes it is not visible by core A in its future access. Test the code with 4 cores.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Omid&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:00b05303-a5c3-432a-b6b9-6fcf5b8b0f5a] --&gt;</description>
      <pubDate>Thu, 28 Apr 2011 18:03:09 GMT</pubDate>
      <author>webadmin@intel.com</author>
      <guid>http://communities.intel.com/message/122996?tstart=0#122996</guid>
      <dc:date>2011-04-28T18:03:09Z</dc:date>
      <clearspace:dateToText>2 years, 4 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>9</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
  </channel>
</rss>

