<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated on Wed, 25 Nov 2009 15:46:20 -0800 -->
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <atom:link href="http://software.intel.com/en-us/articles/intel-thread-checker-for-linux-kb/type/tips-and-techniques/feed/" rel="self" type="application/rss+xml" />
    <title>Intel Software Network articles feed</title>
    <link>http://software.intel.com/en-us/articles/intel-thread-checker-for-linux-kb/tips-and-techniques/</link>
    <description></description>
    <language>en-us</language>
    <item>
      <title>Preparing Your Software: Building or Making Source Code </title>
      <description><![CDATA[ <p><strong>Page Contents:</strong> <br />
<ul>
<li><a href="#1">Tips on Preparing Linux* Code</a> </li>
<li><a href="#2">I don't have source code. Can I use Intel® Thread Checker?</a></li>
</ul>
<br />
<p><strong><a name="1"></a>Tips on Preparing Linux* Code for Intel® Thread Checker for Linux*</strong><br />The following are general tips for preparing Linux* source code for Intel® Thread Checker. Build (make) your source with the following switches:</p>
<ul>
<li>Generate symbols by compiling with the -g switch. This will enable Thread Checker to specify source code information (file name and line number) with its diagnostics.</li>
<li>Compile without optimization using the -O0 switch. Just like when using a debugger, this will enable Thread Checker source code information (especially line numbers) to be accurate. Moreover, turning on compiler optimizations is usually not beneficial for code run under Intel Thread Checker.</li>
</ul>
<p><strong><a name="2"></a>I don't have source code. Can I use Intel® Thread Checker?</strong><br />An example of using Thread Checker without source code might be if you are using an application file from another vendor, so you don't have source code for the for the application. But you are interested in diagnostics about a dynamic or shared library file that is loaded by the vendor's .application. You may not even have source code for the library that gets loaded. You can still use Thread Checker to see if any threading diagnostics are detected. Of course, if you really want to correct threading issues, you'll need source code.</p>
</p>
<p> </p> ]]></description>
      <link>http://software.intel.com/en-us/articles/preparing-your-software-building-or-making-source-code</link>
      <pubDate>Mon, 05 Jan 2009 14:48:53 -0800</pubDate>
      <comments>http://software.intel.com/en-us/articles/preparing-your-software-building-or-making-source-code#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/preparing-your-software-building-or-making-source-code</guid>
      <category>Intel® Thread Checker for Linux* Knowledge Base</category>
    </item>
    <item>
      <title>Intel® Thread Checker for Linux* - Compiler settings for Linux* OpenMP* applications when using Thread Checker</title>
      <description><![CDATA[ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body>
<table border="0" cellspacing="15" cellpadding="0"><tr><td class="bodycopy">
<p><strong>Recommended Intel® Compiler Settings for Linux* OpenMP* Applications When Using the Intel® Thread Checker</strong></p>
<p>Get the best results from Intel® Thread Checker by using the following command to compile your Linux* OpenMP* applications:</p>
<blockquote><span class="Code">icc file.c -openmp [-tcheck] -O0 -g</span></blockquote>
<table cellspacing="15" cellpadding="0" border="0"><tr><td bgcolor="#A6A6A6"><table cellspacing="1" cellpadding="5" border="0">
<tr>
<td class="bodycopy" bgcolor="#EFEFEF"><strong>Switch</strong></td>
<td class="bodycopy" bgcolor="#EFEFEF"><strong>Purpose</strong></td>
</tr>
<tr>
<td class="bodycopy" valign="top" bgcolor="#FFFFFF">
<span class="Code">-openmp</span><br>(required)</td>
<td class="bodycopy" bgcolor="#FFFFFF">Tells the compiler to process the OpenMP* pragmas.</td>
</tr>
<tr>
<td class="bodycopy" valign="top" bgcolor="#FFFFFF">
<span class="Code">-tcheck</span><br>(optional)</td>
<td class="bodycopy" bgcolor="#FFFFFF">Enables thread count independent (TCI) analysis mode instead of thread count dependent (TCD) analysis mode on OpenMP* applications.</td>
</tr>
<tr>
<td class="bodycopy" valign="top" bgcolor="#FFFFFF">
<span class="Code">-O0</span><br>(recommended)</td>
<td class="bodycopy" bgcolor="#FFFFFF">
<p>Allows Intel® Thread Checker to more easily associate errors to source lines.</p>
<p>Intel® Thread Checker can also analyze optimized binaries, but it is difficult for Intel® Thread Checker to pinpoint the source code location causing a problem in optimized assembly that does not have specific source lines.</p>
</td>
</tr>
<tr>
<td class="bodycopy" valign="top" bgcolor="#FFFFFF">
<span class="Code">-g</span><br>(highly recommended)</td>
<td class="bodycopy" bgcolor="#FFFFFF">
<p>Creates symbols for the binary. Intel® Thread Checker uses the symbols to associate addresses to source lines.</p>
<p><strong>Note:</strong> For binaries compiled without 
<span class="Code">-g</span> (no symbols), Intel® Thread Checker instruments using API Imports. Intel® Thread Checker cannot find all threading errors within a binary that is instrumented with API Imports. The Default of API Imports instrumentation on a particular file can be changed to Full Image via advanced settings in Intel® Thread Checker, but the result is that you will not see the source code that caused the problem, only the assembly.</p>
</td>
</tr>
</table></td></tr></table>
<p><strong>Note:</strong> Intel® Thread Checker requires the dynamic versions of the following libraries:</p>
<ul>
<li>OpenMP* Runtime Library (libguide.so or libiomp5.so)</li>
<li>Posix* Thread Library (libpthread.so)</li>
<li>C Runtime Library (libc.so)</li>
</ul>
<p>Linking to any of the following static libraries causes problems with Intel® Thread Checker:</p>
<ul>
<li>OpenMP* Runtime Library (libguide.a or libiomp5.a)</li>
<li>Posix* Thread Libra
ry (libpthread.a)</li>
<li>C Runtime Library (libc.a)</li>
</ul>
<p>The switch -static is not compatible with Intel® Thread Checker, as it links the static version of these libraries.</p>
<p><strong>Related Documentation</strong></p>
<ul><li>Using Intel® Thread Checker on OpenMP* Applications Compiled with the GNU* GCC Compiler</li></ul>
<p><strong>Confirmed On:</strong></p>
<ul>
<li>Intel® C/C++ Compiler 10.1 for Linux*</li>
<li>Intel® Fortran Compiler 10.1 for Linux*</li>
<li>Intel® Thread Checker 3.1 for Linux*</li>
</ul>
</td></tr></table>
<table border="0" cellspacing="0" cellpadding="0">
<tr><td><img src="http://software.intel.com/file/6324" width="388" height="5"></td></tr>
<tr><td height="10"></td></tr>
</table>
</body></html>
 ]]></description>
      <link>http://software.intel.com/en-us/articles/intel-thread-checker-for-linux-compiler-settings-for-linux-openmp-applications-when-using-thread-checker</link>
      <pubDate>Fri, 19 Sep 2008 00:00:00 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/intel-thread-checker-for-linux-compiler-settings-for-linux-openmp-applications-when-using-thread-checker#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/intel-thread-checker-for-linux-compiler-settings-for-linux-openmp-applications-when-using-thread-checker</guid>
      <category>Software Products General</category>
      <category>Intel® Thread Checker for Linux* Knowledge Base</category>
    </item>
  </channel></rss>