<?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 Re: OMP - thread dying??? in Intel® Moderncode for Parallel Architectures</title>
    <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/OMP-thread-dying/m-p/893837#M3913</link>
    <description>The OpenMP compiler doesn't check for problems introduced by threading, such as data races. Intel Thread checker is available for that purpose.&lt;BR /&gt;</description>
    <pubDate>Fri, 09 Nov 2007 20:19:14 GMT</pubDate>
    <dc:creator>TimP</dc:creator>
    <dc:date>2007-11-09T20:19:14Z</dc:date>
    <item>
      <title>OMP - thread dying???</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/OMP-thread-dying/m-p/893836#M3912</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I have started running an OMP application with 2 threads (on a dual-core machine). I have tested pretty extensively the thing that goes inside the do-loop (a subprogram that solves a complicated fixed-point problem) and I have never had this solver die. But now that I am running in two, sometimes the program just stops - one thread reports having completed its process, so it waits for the other; but the other just never comes out - not for hours. Yet it says nothing. Is this a known problem? The weird thing is that my process-meter shows that my program is still using one core fully. ... but what it's doing I don't know. (Paging file usage is totally flat, which is uncharacteristic for the subprogram). &lt;BR /&gt;&lt;BR /&gt;Any ideas?&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;</description>
      <pubDate>Fri, 09 Nov 2007 19:16:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/OMP-thread-dying/m-p/893836#M3912</guid>
      <dc:creator>iatel</dc:creator>
      <dc:date>2007-11-09T19:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: OMP - thread dying???</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/OMP-thread-dying/m-p/893837#M3913</link>
      <description>The OpenMP compiler doesn't check for problems introduced by threading, such as data races. Intel Thread checker is available for that purpose.&lt;BR /&gt;</description>
      <pubDate>Fri, 09 Nov 2007 20:19:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/OMP-thread-dying/m-p/893837#M3913</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2007-11-09T20:19:14Z</dc:date>
    </item>
    <item>
      <title>Re: OMP - thread dying???</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/OMP-thread-dying/m-p/893838#M3914</link>
      <description>&lt;P&gt;You might start looking by pressing the Pause tool bar button in the Debugger. Then see where the busy thread is tied up.&lt;/P&gt;
&lt;P&gt;You may have issues relating to code optimizations removing memory references (read once into register the re-use register) for shared variables. Dumb example&lt;/P&gt;
&lt;P&gt;intdone=0;// other thread sets to 1 when done&lt;BR /&gt;...&lt;BR /&gt;while(!done)&lt;BR /&gt; {&lt;BR /&gt;sleep(0);&lt;BR /&gt;continue;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;Most compilers will read done once then stay in that loop forever. What you want to do is:&lt;/P&gt;
&lt;P&gt; volatileintdone=0;// other thread sets to 1&lt;BR /&gt;...&lt;BR /&gt;while(!done)&lt;BR /&gt; {&lt;BR /&gt;sleep(0);&lt;BR /&gt;continue;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;Note, I am not suggesting that you program waits like this.&lt;/P&gt;
&lt;P&gt;The important point is to be careful of shared variables that get registerized and are thread to thread communication variables. Consider using volatile on these variables.&lt;/P&gt;
&lt;P&gt;For thread to thread communication (shared variables that get modified) take a look at the &lt;/P&gt;
&lt;P&gt;InterlockedCompare... &lt;/P&gt;
&lt;P&gt;series of functions.&lt;/P&gt;
&lt;P&gt;Jim Dempsey&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Nov 2007 23:30:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/OMP-thread-dying/m-p/893838#M3914</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2007-11-09T23:30:37Z</dc:date>
    </item>
    <item>
      <title>Re: OMP - thread dying???</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/OMP-thread-dying/m-p/893839#M3915</link>
      <description>&lt;P&gt;It doesn't sound like the thread is dying, just spinning forever. This could be something like a dependency relation in the parallel loop that wouldn't bother a single-threaded execution but plays havok once there's multiple threads trying to execute the same code.&lt;/P&gt;
&lt;P&gt;How are you dividing the work of the solver between multiple threads? You mention OMP but it's not clear how you use it in relation to the solver loop.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Nov 2007 23:05:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/OMP-thread-dying/m-p/893839#M3915</guid>
      <dc:creator>robert-reed</dc:creator>
      <dc:date>2007-11-12T23:05:02Z</dc:date>
    </item>
  </channel>
</rss>

