<?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: Record and playback thread interactions in Intel® Moderncode for Parallel Architectures</title>
    <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Record-and-playback-thread-interactions/m-p/883776#M3436</link>
    <description>&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;Thanks for your reply!&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;Its a good point that either approach depends
on a suite of test cases which cover all necessary code paths. Thread Checker
is perhaps more efficient in that it can detect race conditions directly
whereas record/playback testing can only detect when a race causes a change in
path.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;With regards to the rest of your post, the
library provides a set of synchronizationprimitives wrapping the system
threading API (theyre based more on the Windows primitives than on the
pthreads primitives i.e., recursive mutexes, events, semaphores and thread
waiting). I have been careful writing the wrappers such that they behave the
same on POSIX systems and on Windows. In fact (in a self referential way) I
have tested the library itself across the various platforms using record/playback
on randomized code path test suites and debugged it using its own
record/playback functionality.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;I guess in this way the approach Ive taken
is also independent of target since if I can assume that the primitives behave
the same on all platforms then I can develop and test threading software on
Windows with a high degree of confidence that the code will work on other
platforms (which I find to be the case in practice).&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;As for the independence of compiler optimization
then I guess all I can say is that the record/playback works for all
combinations of optimized/non-optimized and record/playback.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 24 May 2008 10:15:15 GMT</pubDate>
    <dc:creator>davidnoz</dc:creator>
    <dc:date>2008-05-24T10:15:15Z</dc:date>
    <item>
      <title>Record and playback thread interactions</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Record-and-playback-thread-interactions/m-p/883774#M3434</link>
      <description>&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;I'm a PhD developer with a mathematical
optimization software company.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;I have developed (as a side project) some
portable C code that wraps the pthreads and Windows threading API providing
support for thread creation and management, mutexes, events and semaphores. The
unique thing about the library is that it can record the interaction of the
threads with the mutexes, events etc during a run of an application and then it
can playback the interactions in a subsequent run such that the subsequent
run behaves the same as the first (assuming all external input into the &lt;/SPAN&gt;&lt;SPAN&gt;application &lt;/SPAN&gt;&lt;SPAN&gt;runs are the same).&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;Using this library in my work I have not
needed tools such as Thread Checker to debug my code since I have been able to
detect race conditions by writing randomized test beds for my code modules and
running the tests through repeated record and playback run pairs (the race
conditions typically show up as deviations in the execution path that are detected
by the playback i.e., thread x tries to lock mutex y instead of the expected mutex
z). Furthermore, it seems that the record/playback functionality is uniquely
useful when a bug occurs not as the result of a race but as the result of a particular
state the application arrives at resulting from the random ordering of thread
interactions with shared data.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;The code is ported to 32 and 64 bit on
HPUX, AIX, Linux, Solaris and Windows.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;How useful is such a library?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 May 2008 19:07:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Record-and-playback-thread-interactions/m-p/883774#M3434</guid>
      <dc:creator>davidnoz</dc:creator>
      <dc:date>2008-05-22T19:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: Record and playback thread interactions</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Record-and-playback-thread-interactions/m-p/883775#M3435</link>
      <description>You state that you have not needed tools such as Thread Checker, which take a higher level approach to diagnosing threading correctness. With either approach, completeness depends on a suite of test cases which cover all necessary code paths. With your method, it appears that you must test each build on each target with your test suite, and could (perhaps intentionally?) have technical violations of threading correctness which don't show up on your targets, with your compilation. Thread Checker aims to diagnose threading problems independent of target or compiler optimizations.</description>
      <pubDate>Fri, 23 May 2008 22:46:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Record-and-playback-thread-interactions/m-p/883775#M3435</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2008-05-23T22:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: Record and playback thread interactions</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Record-and-playback-thread-interactions/m-p/883776#M3436</link>
      <description>&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;Thanks for your reply!&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;Its a good point that either approach depends
on a suite of test cases which cover all necessary code paths. Thread Checker
is perhaps more efficient in that it can detect race conditions directly
whereas record/playback testing can only detect when a race causes a change in
path.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;With regards to the rest of your post, the
library provides a set of synchronizationprimitives wrapping the system
threading API (theyre based more on the Windows primitives than on the
pthreads primitives i.e., recursive mutexes, events, semaphores and thread
waiting). I have been careful writing the wrappers such that they behave the
same on POSIX systems and on Windows. In fact (in a self referential way) I
have tested the library itself across the various platforms using record/playback
on randomized code path test suites and debugged it using its own
record/playback functionality.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;I guess in this way the approach Ive taken
is also independent of target since if I can assume that the primitives behave
the same on all platforms then I can develop and test threading software on
Windows with a high degree of confidence that the code will work on other
platforms (which I find to be the case in practice).&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;As for the independence of compiler optimization
then I guess all I can say is that the record/playback works for all
combinations of optimized/non-optimized and record/playback.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 24 May 2008 10:15:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Record-and-playback-thread-interactions/m-p/883776#M3436</guid>
      <dc:creator>davidnoz</dc:creator>
      <dc:date>2008-05-24T10:15:15Z</dc:date>
    </item>
  </channel>
</rss>

