<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated on Fri, 10 Feb 2012 10:32:25 -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-c-compiler-for-mac-os-x-kb/type/errors-diagnostics/feed/" rel="self" type="application/rss+xml" />
    <title>Intel Software Network articles Feed</title>
    <link>http://software.intel.com/en-us/articles/intel-c-compiler-for-mac-os-x-kb/type/errors-diagnostics/</link>
    <description></description>
    <language>en-us</language>
    <item>
      <title>Using the IDB Debugger under Mac OS* X 10.7 Lion</title>
      <description><![CDATA[ <br />
<div id="art_pre_template"><b>Reference Number : </b>DPD200178014<br /><br /><br /><b>Version : </b>IDB for Mac OS* X 10.7 Lion, v12.1 ( Updates 6, 7, 8, and possible future updates)<br /><br /><br /><b>Product : </b>Composer XE 2011 for Mac OS* X<br /><br /><br /><b>Operating System : </b>Mac OS* X 10.7<br /><br /><br /><b>Problem Description : </b>IDB debugger does not load default images produced by IFORT or ICC/ICPC: <b><br />"Could not start process for ...<br />No image loaded ... Recovering ... "<br /></b><br /><br /><br /><b>Resolution Status : </b><br /><br />Mac OS* X Lion, by default, defaults to building executables with Position Independent Executable (PIE) code.  However, the Intel IDB debugger does not currently (as of Composer XE 2011 Updates 6, 7, 8, and 9) support debugging of PIE executables.  <br /><br />To work around this, IFORT and ICC/ICPC can be directed to produce non-PIE executables.  The following options are required to produce an executable that IDB can process:<br /><br /><b>-g -save-temps -fpic -Wl,-no_pie</b><br /><br />This affects the Intel Composer XE 2011 compilers running on Mac OS* X 10.7 Lion ONLY.  Users of Mac OS* X 10.6 (Snow Leopard) or 10.5 (Leopard) are not affected and need only the -g -save-temps options for creation of debuggable executables.<br /><br /><br /><br /><i>[DISCLAIMER: The information on this web site is intended for hardware system manufacturers and software developers.  Intel does not warrant the accuracy, completeness or utility of any information on this site. Intel may make changes to the information or the site at any time without notice. Intel makes no commitment to update the information at this site.  ALL INFORMATION PROVIDED ON THIS WEBSITE IS PROVIDED "as is" without any express, implied, or statutory warranty of any kind including but not limited to warranties of merchantability, non-infringement of intellectual property, or fitness for any particular purpose.  Independent companies manufacture the third-party products that are mentioned on this site. Intel is not responsible for the quality or performance of third-party products and makes no representation or warranty regarding such products. The third-party supplier remains solely responsible for the design, manufacture, sale and functionality of its products. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. *Other names and brands may be claimed as the property of others.]</i></div> ]]></description>
      <link>http://software.intel.com/en-us/articles/using-the-idb-debugger-under-mac-os-x-107-lion/</link>
      <pubDate>Sun, 15 Jan 2012 23:00:00 -0800</pubDate>
      <comments>http://software.intel.com/en-us/articles/using-the-idb-debugger-under-mac-os-x-107-lion/#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/using-the-idb-debugger-under-mac-os-x-107-lion/</guid>
      <category>Intel® C++ Compiler for Mac OS X* Knowledge Base</category>
      <category>Intel® Fortran Compiler for Mac OS X* Knowledge Base</category>
    </item>
    <item>
      <title>-staticlib option bug in Intel Compiler version 12.1.1.246 aka Update 7</title>
      <description><![CDATA[ <b>Afffected compilers:</b> Intel C++ and Fortran Composer XE 2011 for Mac OS X Update 7, aka version 12.1.1.246<br /><br /><b>Background:</b> The Intel Composer XE 2011 compilers for Mac OS X support the option -staticlib for compatibility with gcc.  This option allows creation of a static library in one-step, taking a source file as input and producing a .a static library as output.  This option worked in the Composer XE 2011 Update 6 compilers.<br /><br /><b>Scope:</b> This option is ONLY supported on the Mac OS X platform.  Thus, this bug is limited in scope to the Mac OS X compilers.  this affects both the Intel C++ and Intel Fortran compilers for Mac OS X.<br /><br /><b>Symptom:</b> Compiling with -staticlib causes the error:<br /><br />Undefined symbols for architecture x86_64:<br /> "_main", referenced from:<br /> start in crt1.10.6.o<br />ld: symbol(s) not found for architecture x86_64<br /><br />Examples:<br /><br />C/C++:  <br />cat foo.c<br /><br />extern double pow(double, double);<br /><br />double foo(double x, double y)<br />{<br /> return pow(x, y);<br />}<br /><br />$ icc -staticlib foo.c -o foo.a<br />Undefined symbols for architecture x86_64:<br /> "_main", referenced from:<br /> start in crt1.10.6.o<br />ld: symbol(s) not found for architecture x86_64<br /><br /><br />Fortran:<br />cat subrout.f90<br /><br />subroutine pow( x, y)<br />real (8) :: x,y<br /> y = 2*x<br />end subroutine pow<br /> <br /> $ ifort -staticlib subrout.f90 -o subrout.a<br />Undefined symbols for architecture x86_64:<br /> "_MAIN__", referenced from:<br /> _main in for_main.o<br />ld: symbol(s) not found for architecture x86_64<br /><br /><br /><b>ISSUE ID:</b> DPD200175631 ]]></description>
      <link>http://software.intel.com/en-us/articles/staticlib-option-bug-in-intel-compiler-version-1211246-aka-update-7/</link>
      <pubDate>Sun, 06 Nov 2011 23:00:00 -0800</pubDate>
      <comments>http://software.intel.com/en-us/articles/staticlib-option-bug-in-intel-compiler-version-1211246-aka-update-7/#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/staticlib-option-bug-in-intel-compiler-version-1211246-aka-update-7/</guid>
      <category>Intel® C++ Compiler for Mac OS X* Knowledge Base</category>
      <category>Intel® Fortran Compiler for Mac OS X* Knowledge Base</category>
    </item>
    <item>
      <title>Don&amp;#39;t use the OpenMP THREADPRIVATE &amp;#39;compatibility&amp;#39; option when everything is compiled by Intel</title>
      <description><![CDATA[ <br />
<div id="art_pre_template"><strong>Introduction :</strong> The Intel C++ and Fortran compilers for Windows* and Linux* provide 'legacy' and 'compatibility' implementations of the OpenMP THREADPRIVATE directive (-Qopenmp-threadprivate:[compat | legacy], -openmp-threadprivate [compat | legacy]).  The 'compat' option should not be used when everything is compiled by Intel compilers. Doing some may result in application crashes or incorrect results. In this case, the 'legacy' option (which is the default) should be used.  The 'compat' option should only be used when some of the objects in an application have been compiled by a compatible Microsoft* or GNU* compiler.<br /><br /><strong>Version :</strong> 11.x, 12.x<br /><br /><br /><strong>Application Notes :</strong> -Qopenmp-threadprivate:legacy (-openmp-threadprivate legacy) is the default when -Qopenmp (-openmp) is specified.  This setting does not provide compatibility with the THREADPRIVATE implementation used by other compilers. -Qopenmp-threadprivate:compat (-openmp-threadprivate compat) can be used when some of the objects in an application have been compiled by a compatible Microsoft* or GNU* compiler.  This setting provides compatibility with the implementation provided by the Microsoft* and GNU* compilers.<br /><br /><br /><strong>Building the Application :</strong> -Qopenmp (-openmp) must be given when using -Qopenmp-threadprivate (-openmp-threadprivate), or the compiler will not recognize the OpenMP THREADPRIVATE directive (warning #161: unrecognized #pragma).<br /><br /><br /><strong>Known Issues or Limitations : </strong>On Mac OS* X systems, 'legacy' is the only type of THREADPRIVATE implementation supported. Option '-openmp-threadprivate' is not recognized by the compiler.<br /><br /><br /><br /></div> ]]></description>
      <link>http://software.intel.com/en-us/articles/dont-use-the-openmp-threadprivate-compatibility-option-when-everything-is-compiled-by-intel/</link>
      <pubDate>Mon, 22 Aug 2011 23:00:00 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/dont-use-the-openmp-threadprivate-compatibility-option-when-everything-is-compiled-by-intel/#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/dont-use-the-openmp-threadprivate-compatibility-option-when-everything-is-compiled-by-intel/</guid>
      <category>Intel® C++ Compiler for Linux* Knowledge Base</category>
      <category>Intel® C++ Compiler for Mac OS X* Knowledge Base</category>
      <category>Intel® C++ Compiler for Windows* Knowledge Base</category>
      <category>Intel® Fortran Compiler for Linux* Knowledge Base</category>
      <category>Intel® Fortran Compiler for Mac OS X* Knowledge Base</category>
      <category>Intel® Visual Fortran Compiler for Windows* Knowledge Base</category>
    </item>
    <item>
      <title>Running an Intel-compiled binary on older Mac OS X system gives dyld:  unknown required load command 0x80000022</title>
      <description><![CDATA[ <br />
<div id="art_pre_template"><b>Problem : </b>I compile a program on a Mac OS X 10.6 system, but run the binary on an older Mac OS X system such as 10.5 or 10.4.  The program aborts immediately without starting with error "dyld:  unknown required load command 0x80000022"<br /><br /><br /><b>Environment : </b>Mac OS X, mixed OS versions.  Intel Fortran Compiler for Mac OS X, Intel C++ Compiler for Mac OS X<br /><br /><br /><b>Root Cause : </b><br />Generally, if you are targeting your applicaiton to run on multiple versions of Mac OS X, you should use the 'least common denominator' approach of developing on the older OS version.  This is because newer version may have extended the base OS API but generally newer versions will maintain backwards compatibility.<br /><br /><b>Resolution : </b><br />Although there is no guarantee for backwards compatibility, if you have a newer version of Mac OS X as your development platform, follow these guidelines:<br /><br />compile and link with option   -static-intel   ( for older compilers, -i-static )<br />Pass linker option:     -Wl,-macosx_version_min,10.4<br /> so<br />ifort -static-intel -Wl,-macosx_version_min,10.4   ...other options...<br />icc -static-intel -Wl,-macosx_version_min,10.4   ...other options...<br />icpc -static-intel -Wl,-macosx_version_min,10.4   ...other options...<br /><br />The -static-intel will statically link all Intel compiler runtime libraries into your executable so that you will not need these DYLD libraries on the target computer.<br /><br />The -Wl,-macosx_version_min,10.4  passes the argument  -macosx_version_min 10.4<br /><br />to your ld linker.  This tells the linker to create headers and sections for the executable that are backwards compatible to Mac OS X 10.4.  Another option might be 10.5.  Please read your 'ld' man page or documentation for allowed options.<br /><br />EXCEPTION:  the linker provided with Xcode 4.0.1 on Snow Leopard is rejecting the -macosx_version_min option, although it is documented in the 'ld' man page.  We believe this is a recent bug in the Apple linker and hope that it is addressed shortly ( Apr 2011 )<br /><br /></div> ]]></description>
      <link>http://software.intel.com/en-us/articles/running-an-intel-compiled-binary-on-older-mac-os-x-system-gives-dyld-unknown-required-load-command-0x80000022/</link>
      <pubDate>Thu, 28 Apr 2011 23:00:00 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/running-an-intel-compiled-binary-on-older-mac-os-x-system-gives-dyld-unknown-required-load-command-0x80000022/#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/running-an-intel-compiled-binary-on-older-mac-os-x-system-gives-dyld-unknown-required-load-command-0x80000022/</guid>
      <category>Intel® C++ Compiler for Mac OS X* Knowledge Base</category>
      <category>Intel® Fortran Compiler for Mac OS X* Knowledge Base</category>
    </item>
    <item>
      <title>Description of PARDISO errors and messages</title>
      <description><![CDATA[ <p class="MsoNormal"><span lang="EN-US" >See the table below for the description of the error indicator.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" ><o:p></o:p></span></p>
<table cellpadding="0" cellspacing="0" border="1" class="MsoTableGrid" >
<tbody>
<tr >
<td width="111" valign="top" >
<p class="MsoNormal"><b><i><span lang="EN-US" >Error </span></i></b><i><span lang="EN-US" >( Integer)</span></i><span lang="EN-US" ><o:p></o:p></span></p>
</td>
<td width="527" valign="top" >
<p class="MsoNormal"><b><span lang="EN-US" >Information</span></b><span lang="EN-US" ><o:p></o:p></span></p>
</td>
</tr>
<tr >
<td width="111" valign="top" >
<p class="MsoNormal"><span lang="EN-US" >0</span><span lang="EN-US" ><o:p></o:p></span></p>
</td>
<td width="527" valign="top" >
<p class="MsoNormal"><span lang="EN-US" >no error</span><span lang="EN-US" ><o:p></o:p></span></p>
</td>
</tr>
<tr >
<td width="111" valign="top" >
<p class="MsoNormal"><span lang="EN-US" >-1</span><span lang="EN-US" ><o:p></o:p></span></p>
</td>
<td width="527" valign="top" >
<p class="MsoNormal"><span lang="EN-US" >input inconsistency<o:p></o:p></span></p>
</td>
</tr>
<tr >
<td width="111" valign="top" >
<p class="MsoNormal"><span lang="EN-US" >-2</span><span lang="EN-US" ><o:p></o:p></span></p>
</td>
<td width="527" valign="top" >
<p class="MsoNormal"><span lang="EN-US" >not enough memory<o:p></o:p></span></p>
</td>
</tr>
<tr >
<td width="111" valign="top" >
<p class="MsoNormal"><span lang="EN-US" >-3</span><span lang="EN-US" ><o:p></o:p></span></p>
</td>
<td width="527" valign="top" >
<p class="MsoNormal"><span lang="EN-US" >reordering problem<o:p></o:p></span></p>
</td>
</tr>
<tr >
<td width="111" valign="top" >
<p class="MsoNormal"><span lang="EN-US" >-4<o:p></o:p></span></p>
</td>
<td width="527" valign="top" >
<p class="MsoNormal"><span lang="EN-US" >zero pivot, numerical factorization or<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" >iterative refinement problem</span><span lang="EN-US" ><o:p></o:p></span></p>
</td>
</tr>
<tr >
<td width="111" valign="top" >
<p class="MsoNormal"><span lang="EN-US" >-5</span><span lang="EN-US" ><o:p></o:p></span></p>
</td>
<td width="527" valign="top" >
<p class="MsoNormal"><span lang="EN-US" >unclassified (internal) error<o:p></o:p></span></p>
</td>
</tr>
<tr >
<td width="111" valign="top" >
<p class="MsoNormal"><span lang="EN-US" >-6</span><span lang="EN-US" ><o:p></o:p></span></p>
</td>
<td width="527" valign="top" >
<p class="MsoNormal"><span lang="EN-US" >preordering failed (matrix types 11, 13 only)<o:p></o:p></span></p>
</td>
</tr>
<tr >
<td width="111" valign="top" >
<p class="MsoNormal"><span lang="EN-US" >-7<o:p></o:p></span></p>
</td>
<td width="527" valign="top" >
<p class="MsoNormal"><span lang="EN-US" >diagonal matrix is singular<o:p></o:p></span></p>
</td>
</tr>
<tr >
<td width="111" valign="top" >
<p class="MsoNormal"><span lang="EN-US" >-8<o:p></o:p></span></p>
</td>
<td width="527" valign="top" >
<p class="MsoNormal"><span lang="EN-US" >32-bit integer overflow problem<o:p></o:p></span></p>
</td>
</tr>
<tr >
<td width="111" valign="top" >
<p class="MsoNormal"><span lang="EN-US" >-9<o:p></o:p></span></p>
</td>
<td width="527" valign="top" >
<p class="MsoNormal"><span lang="EN-US" >not enough memory for OOC<o:p></o:p></span></p>
</td>
</tr>
<tr >
<td width="111" valign="top" >
<p class="MsoNormal"><span lang="EN-US" >-10<o:p></o:p></span></p>
</td>
<td width="527" valign="top" >
<p class="MsoNormal"><span lang="EN-US" >problems with opening OOC temporary files<o:p></o:p></span></p>
</td>
</tr>
<tr >
<td width="111" valign="top" >
<p class="MsoNormal"><span lang="EN-US" >-11<o:p></o:p></span></p>
</td>
<td width="527" valign="top" >
<p class="MsoNormal"><span lang="EN-US" >read/write problems with the OOC data file<o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><span lang="EN-US" ><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" ><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" >Below each error is described in details:<o:p></o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" ><o:p></o:p></span></b></p>
<p class="MsoNormal"><b ><i ><span lang="EN-US" ><span ></span>0: <span ></span></span></i></b><b ><i ><span lang="EN-US" >no error</span></i></b><b ><i ><span lang="EN-US" ><o:p></o:p></span></i></b></p>
<p class="MsoNormal"><b ><i ><span lang="EN-US" ><o:p></o:p></span></i></b></p>
<p class="MsoNormal"><b ><i ><span lang="EN-US" ><span ></span>-1: <span ></span></span></i></b><b ><i ><span lang="EN-US" >Input inconsistency</span></i></b></p>
<p class="MsoNormal"><span lang="EN-US" ><o:p></o:p></span></p>
<span >This error can appear in the following situations:</span><br />
<ul>
</ul>
<p class="MsoNormal"><span lang="EN-US" ><o:p></o:p></span></p>
<ul>
<li>
<div class="MsoListParagraphCxSpFirst"><span lang="EN-US" >Incorrect stage number for PARDISO was called.<o:p></o:p></span></div>
</li>
<li>
<div class="MsoListParagraphCxSpMiddle"><span lang="EN-US" >Incorrect PARDISO calling sequence, e.g. run stage &gt; 1 without initialization results in error reporting.<o:p></o:p></span></div>
</li>
<li><span lang="EN-US" >Incorrect number of matrices to be solved was set (PARDISO can be used for solving several matrices with the same sparsity structure at once, taking into account that their maximum number was defined previously. Setting the number of matrices to be solved outside the range of <b>1</b></span><b><samp><span lang="EN-US">≤</span></samp><span lang="EN-US" > … </span><samp><span lang="EN-US">≤</span></samp></b><span lang="EN-US" ><b>maxfct</b> results in error).</span></li>
<li>
<div class="MsoListParagraphCxSpLast"><span lang="EN-US" >PARDISO checks the parameters at each stage for consistency with the parameters at the previous stages. Every disagreement results in error reporting.<o:p></o:p></span></div>
</li>
</ul>
<p class="MsoNormal"><span lang="EN-US" ><o:p></o:p></span></p>
<p class="MsoNormal"><b ><i ><span lang="EN-US" ><span ></span></span></i></b><b ><i ><span lang="EN-US" >-2: <span ></span></span></i></b><b ><i ><span lang="EN-US" >not enough memory</span></i></b><span lang="EN-US" > <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" ><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" >This error value is returned in the case of any problem with memory allocation inside PARDISO.<o:p></o:p></span></p>
<p class="MsoNormal"><i ><span ><span lang="EN-US" >PARDISO messages:<o:p></o:p></span></span></i></p>
<p class="MsoNormal"><span lang="EN-US" ><span ></span><i >"*** Error in PARDISO memory allocation: [STRUCTURE NAME], size to allocate: %d bytes"<o:p></o:p></i></span></p>
<p class="MsoNormal"><i ><span lang="EN-US" >"total memory wanted here: %d kbyte"<o:p></o:p></span></i></p>
<p class="MsoNormal"><i ><span lang="EN-US" >"symbolic (max): %d symbolic (permanent): %d"<o:p></o:p></span></i></p>
<p class="MsoNormal"><i ><span lang="EN-US" >"real(including 1 factor): %d"<o:p></o:p></span></i></p>
<p class="MsoNormal"><i ><span lang="EN-US" ><o:p></o:p></span></i></p>
<p class="MsoNormal"><span >It describes the issue that arises on allocation of STRUCTURE_NAME inside PARDISO. A additional information about current memory usages is also printed.</span></p>
<p class="MsoNormal"><span lang="EN-US" ><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" ><o:p></o:p></span></p>
<p class="MsoNormal"><b ><i ><span lang="EN-US" ><span ></span></span></i></b><b ><i ><span lang="EN-US" >-3</span></i></b><b ><i ><span lang="EN-US" >: </span></i></b><b ><i ><span lang="EN-US" ><span ></span></span></i></b><b ><i ><span lang="EN-US" >reordering problem</span></i></b><span lang="EN-US" > <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" ><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" >Returned for any problem on a reordering stage (phase 11)<o:p></o:p></span></p>
<p class="MsoNormal"><i ><span ><span lang="EN-US" >PARDISO messages:<o:p></o:p></span></span></i></p>
<p class="MsoNormal"><span lang="EN-US" ><span ></span><i >"*** error PARDISO: reordering, symbolic factorization"<o:p></o:p></i></span></p>
<p class="MsoNormal"><span lang="EN-US" ><o:p></o:p></span></p>
<p class="MsoNormal"><b ><i ><span lang="EN-US" ><span ></span></span></i></b><b ><i ><span lang="EN-US" >-4: <span ></span></span></i></b><b ><i ><span lang="EN-US" >zero pivot, numerical factorization or iterative refinement problem</span></i></b><span lang="EN-US" > <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" ><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" >Let us start with a citation of the Intel MKL manual:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" ><o:p></o:p></span></p>
<p class="MsoNormal"><i ><span lang="EN-US" >Using </span></i><i><span lang="EN-US" >phase </span></i><i ><span lang="EN-US" >=33 </span></i><i ><span lang="EN-US" >results in an error message (</span></i><b ><i><span lang="EN-US" >error </span></i></b><b ><i ><span lang="EN-US" >=4, should be -4 *</span></i></b><b ><i ><span lang="EN-US" > </span></i></b><i ><span lang="EN-US" >) <span ></span>if the stopping criteria for the Krylow-Subspace iteration cannot be reached. <o:p></o:p></span></i></p>
<p class="MsoNormal"><span lang="EN-US" ><o:p></o:p></span></p>
<p class="MsoNormal"><i ><span lang="EN-US" >If </span></i><i><span lang="EN-US" >phase</span></i><i ><span lang="EN-US" >= 23</span></i><i ><span lang="EN-US" >, then the factors </span></i><i><span lang="EN-US" >L</span></i><i ><span lang="EN-US" >, </span></i><i><span lang="EN-US" >U </span></i><i ><span lang="EN-US" >are recomputed for the matrix </span></i><i><span lang="EN-US" >A </span></i><i ><span lang="EN-US" >and the error flag </span></i><b ><i><span lang="EN-US" >error</span></i></b><b ><i ><span lang="EN-US" >=0 </span></i></b><i ><span lang="EN-US" >in case of a successful factorization. If </span></i><i><span lang="EN-US" >phase </span></i><i ><span lang="EN-US" >=33</span></i><i ><span lang="EN-US" >, then </span></i><b ><i><span lang="EN-US" >error </span></i></b><b ><i ><span lang="EN-US" >= -4</span></i></b><i ><span lang="EN-US" > </span></i><i ><span lang="EN-US" >signals the failure<o:p></o:p></span></i></p>
<p class="MsoNormal"><i ><span lang="EN-US" >If the solver detects a zero or negative pivot for these matrix types, the factorization is stopped, PARDISO returns immediately with an error (</span></i><b ><i><span lang="EN-US" >error </span></i></b><b ><i ><span lang="EN-US" >= -4</span></i></b><i ><span lang="EN-US" >) and </span></i><i><span lang="EN-US" >iparm</span></i><i ><span lang="EN-US" >(30) </span></i><i ><span lang="EN-US" >contains the number of the equation where the first zero or negative pivot is detected.</span></i><span lang="EN-US" ><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" ><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" >The error returned in the case of any problem at the factorization stage (phase 22) or at the iterative refinement stage of solution. <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" ><o:p></o:p></span></p>
<p class="MsoNormal"><i ><span ><span lang="EN-US" >PARDISO messages:<o:p></o:p></span></span></i></p>
<p class="MsoNormal"><i ><span lang="EN-US" >"*** Error in PARDISO: cgs error iparam(20) %d"</span></i><span lang="EN-US" > – prints iparm(20) – see CG / CGS diagnostics in the Intel MKL manual<o:p></o:p></span></p>
<p class="MsoNormal"><i ><span lang="EN-US" ><o:p></o:p></span></i></p>
<p class="MsoNormal"><i ><span lang="EN-US" >"*** error PARDISO: iterative refinement"<o:p></o:p></span></i></p>
<p class="MsoNormal"><span ><span lang="EN-US" ><i>" contraction rate is greater than 0.9, interrupt" – </i>rate of contraction is too small <i><o:p></o:p></i></span></span></p>
<p class="MsoNormal"><i ><span lang="EN-US" ><o:p></o:p></span></i></p>
<p class="MsoNormal"><i ><span lang="EN-US" >"*** error PARDISO: iterative refinement"<o:p></o:p></span></i></p>
<p class="MsoNormal"><i ><span lang="EN-US" >" exceeds max. iteration number %d"<span > </span></span></i><span lang="EN-US" >- prints abs(iparm(8))<o:p></o:p></span></p>
<p class="MsoNormal"><i ><span lang="EN-US" ><o:p></o:p></span></i></p>
<p class="MsoNormal"><i ><span lang="EN-US" >"*** Error in PARDISO: internal error, insufficient memory factorization" – </span></i><span lang="EN-US" >looks like a problem at the factorization stage except for pivoting issues (see errors below)<o:p></o:p></span></p>
<p class="MsoNormal"><i ><span lang="EN-US" ><o:p></o:p></span></i></p>
<p class="MsoNormal"><i ><span lang="EN-US" >"*** Error in PARDISO: zero or negative pivot, A is not SPD-matrix" – </span></i><span lang="EN-US" >original matrix (almost) not SPD one (probably due to computer arithmetic inaccuracies)<o:p></o:p></span></p>
<p class="MsoNormal"><i ><span lang="EN-US" ><o:p></o:p></span></i></p>
<p class="MsoNormal"><i ><span lang="EN-US" >"*** Error in PARDISO: zero pivot" – </span></i><span lang="EN-US" >the same as above but for other matrix types<i ><o:p></o:p></i></span></p>
<p class="MsoNormal"><span lang="EN-US" ><o:p></o:p></span></p>
<p class="MsoNormal"><b ><i ><span lang="EN-US" ><span ></span>-5</span></i></b><b ><i ><span lang="EN-US" >: </span></i></b><b ><i ><span lang="EN-US" ><span ></span></span></i></b><b ><i ><span lang="EN-US" >unclassified (internal) error</span></i></b><b ><i ><span lang="EN-US" ><o:p></o:p></span></i></b></p>
<p class="MsoNormal"><span lang="EN-US" ><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" >This error value is not used currently and is reserved for the future use.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" ><o:p></o:p></span></p>
<p class="MsoNormal"><b ><i ><span lang="EN-US" ><span ></span></span></i></b><b ><i ><span lang="EN-US" >-6: <span ></span></span></i></b><b ><i ><span lang="EN-US" >preordering failed (matrix types 11, 13 only)</span></i></b><span lang="EN-US" > <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" ><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" >This error value is returned in the case of any problem at the stage of preparation for reordering (in matching algorithm).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" ><o:p></o:p></span></p>
<p class="MsoNormal"><i ><span ><span lang="EN-US" >PARDISO messages:<o:p></o:p></span></span></i></p>
<p class="MsoNormal"><span lang="EN-US" ><span ></span><i >"*** Error in PARDISO: preordering failed after %d neqns out of %d"<o:p></o:p></i></span></p>
<p class="MsoNormal"><i ><span lang="EN-US" >"structure singular or input/parameter problem (matrix type 11,13)"<o:p></o:p></span></i></p>
<p class="MsoNormal"><span lang="EN-US" ><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" >Looks like the message provides no meaningful information.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" ><o:p></o:p></span></p>
<p class="MsoNormal"><b ><i ><span lang="EN-US" ><span ></span>-7: <span ></span></span></i></b><b ><i ><span lang="EN-US" >diagonal matrix problem</span></i></b><span lang="EN-US" > <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" ><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" >PARDISO prints no messages. <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" ><o:p></o:p></span></p>
<p class="MsoNormal"><b ><i ><span lang="EN-US" ><span ></span></span></i></b><b ><i ><span lang="EN-US" >-8: <span ></span></span></i></b><b ><i ><span lang="EN-US" >32-bit integer overflow problem</span></i></b><span lang="EN-US" > <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" ><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" >This error value is returned on 32-bit architecture for big matrices when indices become greater than the maximal integer value on this platform. <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" ><o:p></o:p></span></p>
<p class="MsoNormal"><i ><span ><span lang="EN-US" >PARDISO messages:<o:p></o:p></span></span></i></p>
<p class="MsoNormal"><span lang="EN-US" ><span ></span><i >"*** error PARDISO: reordering, symbolic factorization"</i><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" ><o:p></o:p></span></p>
<p class="MsoNormal"><b ><i ><span lang="EN-US" >-9: </span></i></b><b ><i ><span lang="EN-US" >not enough memory for OOC</span></i></b><span lang="EN-US" > <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" ><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" >Let us start with a citation of the Intel MKL manual:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" ><o:p></o:p></span></p>
<p class="MsoNormal"><i ><span lang="EN-US" >Note that if </span></i><i><span lang="EN-US" >iparm</span></i><i ><span lang="EN-US" >(60) </span></i><i ><span lang="EN-US" >is equal to 1 or 2, and the total peak memory needed for strong local arrays is more than </span></i><i ><span lang="EN-US" >MKL_PARDISO_OOC_MAX_CORE_SIZE</span></i><i ><span lang="EN-US" >, the program stops with <b >error -9</b>. In this case, increase of </span></i><i ><span lang="EN-US" >MKL_PARDISO_OOC_MAX_CORE_SIZE </span></i><i ><span lang="EN-US" >is recommended.</span></i><i ><span lang="EN-US" ><o:p></o:p></span></i></p>
<p class="MsoNormal"><span lang="EN-US" ><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" >This error value is returned when amount of memory available for PARDISO (defined by MKL_PARDISO_OOC_MAX_CORE_SIZE, by default 2000 Mb) is not enough to solve the current matrix. The issue can be resolved by increasing the value for available memory.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" ><o:p></o:p></span></p>
<p class="MsoNormal"><b ><i ><span lang="EN-US" >-10: </span></i></b><b ><i ><span lang="EN-US" >problems with opening OOC temporary files</span></i></b><span lang="EN-US" > <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" ><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" >This error value is returned when PARDISO can’t create / open temporary files for storing OOC arrays, e.g. in the case of wrong permissions or when files were removed or blocked or not released after the previous steps.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" ><o:p></o:p></span></p>
<p class="MsoNormal"><b ><i ><span lang="EN-US" >-11: </span></i></b><b ><i ><span lang="EN-US" >read/write problems with the OOC data file</span></i></b><b ><i ><span lang="EN-US" ><o:p></o:p></span></i></b></p>
<p class="MsoNormal"><span lang="EN-US" ><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" ><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" >This error value is returned when some problems appear in the process of working with files, e.g. in the case of no space left on device or problems with read / write operations because of algorithm issues. <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" ><o:p></o:p></span></p>
<p class="MsoNormal"><i><span lang="EN-US" >* - the documentation error. Will be fixed in the version 10.3 Update3.</span></i><span lang="EN-US" ><o:p></o:p></span></p>
<p class="MsoNormal"><i><span lang="EN-US" >** - available memory means the RAM system's memory which is available at the moment of starting the calculations</span></i><i><span lang="EN-US" >.</span></i><span lang="EN-US" ><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" ><o:p></o:p></span></p> ]]></description>
      <link>http://software.intel.com/en-us/articles/description-of-pardiso-errors-and-messages/</link>
      <pubDate>Fri, 14 Jan 2011 11:30:00 -0800</pubDate>
      <comments>http://software.intel.com/en-us/articles/description-of-pardiso-errors-and-messages/#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/description-of-pardiso-errors-and-messages/</guid>
      <category>Intel® C++ Compiler for Linux* Knowledge Base</category>
      <category>Intel® C++ Compiler for Mac OS X* Knowledge Base</category>
      <category>Intel® C++ Compiler for Windows* Knowledge Base</category>
      <category>Intel® Fortran Compiler for Linux* Knowledge Base</category>
      <category>Intel® Fortran Compiler for Mac OS X* Knowledge Base</category>
      <category>Intel® Math Kernel Library Knowledge Base</category>
    </item>
    <item>
      <title>Don&amp;#39;t optimize when using -ftrapuv for uninitialized variable detection</title>
      <description><![CDATA[ <br />
<div id="art_pre_template"><strong>Reference Number :</strong> dpd200139115,  dpd200138937  (documentation).<br /><br /><br /><strong>Version :</strong> 2011, (compiler version 12);  compiler pro versions 10 and 11 <br /><br /><br /><strong>Product : </strong>Intel(R) Composer XE; Intel(R) Compiler Pro<br /><br /><br /><strong>Operating System :</strong> Windows*, Linux*, Mac OS* X<br /><br /><b>Problem Description : </b><br />If the switch /Qftrapuv (-ftrapuv) for run-time detection of uninitialized local scalar variables is used in conjunction with optimization flags such as /O2 (-O2), it may lead to unexpected floating-point exceptions that are not related to uninitialized variables.<br /><br /><b>Explanation : </b><br />The switch /Qftrapuv (-ftrapuv)  sets local, scalar variables that are not otherwise initialized to an "unusual" initial value such as 0xCCCCCCCC. When the main program is compiled with this switch, it also unmasks the "INVALID" floating-point exception. so that exceptions may be raised when the "unusual" values are used in floating-point operations. The switch also changes the default optimization level from /O2 to /Od (from -O2 to -O0). This is so that exceptions will not be raised as a result of speculated floating-point operations or other optimizations. If the new default optimization level of /Od (-O0) is explicitly overridden, optimizations such as floating-point speculation associated with masked vector operations may result in INVALID exceptions that would not otherwise have been raised.<br /><br /><br /><strong>Solution</strong>:<br /><strong>Either</strong>:  Do not override the default /Od (-O0) optimization level when using /Qtrapuv (-ftrapuv).   (Sometimes, it may be sufficient to use /Qfp-speculation:safe (-fp-speculation safe) in conjunction with -O2).<br /><strong>or (Fortran only)</strong>:   Use the switch /check:uninit (-check uninit)  in preference to /Qtrapuv (-ftrapuv) for the run-time detection of uninitialized, local scalar variables. This uses a different mechanism for uninitialized variable detection that is less likely to produce unrelated floating-point exceptions.<br /><br />Intel(R) Inspector XE, a component of Intel(R) Parallel Studio XE,  may also be used for the detection of some instances of uninitialized variables.<br /><br /><br /><br /><i>[DISCLAIMER: The information on this web site is intended for hardware system manufacturers and software developers. Intel does not warrant the accuracy, completeness or utility of any information on this site. Intel may make changes to the information or the site at any time without notice. Intel makes no commitment to update the information at this site. ALL INFORMATION PROVIDED ON THIS WEBSITE IS PROVIDED "as is" without any express, implied, or statutory warranty of any kind including but not limited to warranties of merchantability, non-infringement of intellectual property, or fitness for any particular purpose. Independent companies manufacture the third-party products that are mentioned on this site. Intel is not responsible for the quality or performance of third-party products and makes no representation or warranty regarding such products. The third-party supplier remains solely responsible for the design, manufacture, sale and functionality of its products. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. *Other names and brands may be claimed as the property of others.]</i></div> ]]></description>
      <link>http://software.intel.com/en-us/articles/dont-optimize-when-using-ftrapuv-for-uninitialized-variable-detection/</link>
      <pubDate>Wed, 22 Dec 2010 21:00:00 -0800</pubDate>
      <comments>http://software.intel.com/en-us/articles/dont-optimize-when-using-ftrapuv-for-uninitialized-variable-detection/#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/dont-optimize-when-using-ftrapuv-for-uninitialized-variable-detection/</guid>
      <category>Intel® C++ Compiler for Linux* Knowledge Base</category>
      <category>Intel® C++ Compiler for Mac OS X* Knowledge Base</category>
      <category>Intel® C++ Compiler for Windows* Knowledge Base</category>
      <category>Intel® Fortran Compiler for Linux* Knowledge Base</category>
      <category>Intel® Fortran Compiler for Mac OS X* Knowledge Base</category>
      <category>Intel® Parallel Composer Knowledge Base</category>
      <category>Intel® Visual Fortran Compiler for Windows* Knowledge Base</category>
    </item>
    <item>
      <title>GAP Message - remark #30526: (PAR) To parallelize the loop, annotate the routine &amp;#34;foo&amp;#34; with &amp;#34;&amp;#34;__declspec(const)&amp;#34;</title>
      <description><![CDATA[ <br />
<div id="art_pre_template">
<p><b>Message</b></p>
<p>To parallelize the loop at line 123, annotate the routine "foo" with "__declspec(const)". [VERIFY] Make sure the routine satisfies the semantics of this annotation. [ALTERNATIVE] A weaker annotation that can achieve a similar effect is "__declspec(concurrency_safe(profitable))". [VERIFY] Make sure the routine satisfies the semantics of this annotation.</p>
<p><b>Description</b></p>
<p>If the loop contains a call to a function, the compiler cannot parallelize the loop without more information about the function being called.</p>
<p>However, if the function being called in the loop is a const function (C/C++), or an elemental function (F2003), or a concurrency-safe function, then the call does not inhibit parallelization of the loop.</p>
<p>This message advises you to provide information about the functions being called that helps parallelization.</p>
<p><strong>Example (in C language)</strong></p>
<pre name="code" class="cpp">#define N 10000
double A[N], B[N];
int bar(int);
void foo(){
  int i;
  for (i=0;i&lt;N;i++){
    A[i] = B[i] * bar(i);
  }
}
</pre>
<p>In this case, the compiler does not parallelize the loop because it is not safe to do so without further information about routine bar being called. The C/C++ compiler generates a message of this form:</p>
<blockquote>
<p>id30526.c(6): remark #30526: (PAR) To parallelize the loop at line 6, annotate the routine "bar" with "__declspec(const)". [VERIFY] Make sure that the routine satisfies the semantics of this annotation. [ALTERNATIVE] A weaker annotation that can achieve a similar effect is "__declspec(concurrency_safe(profitable))". [VERIFY] Make sure that the routine satisfies the semantics of this annotation.</p>
</blockquote>
<p>If you decide it is safe, the src-code can be modified as follows:</p>
<pre name="code" class="cpp">#define N 10000
double A[N], B[N];
__declspec(const) int bar(int);
void foo(){
  int i;
  for (i=0;i&lt;N;i++){
    A[i] = B[i] * bar(i);
  }
}
</pre>
<p>The following is another way the code can be modified if it is safe to do so:</p>
<pre name="code" class="cpp">#define N 10000
double A[N], B[N];
__declspec(concurrency_safe(profitable)) int bar(int);
void foo(){
  int i;
  for (i=0;i&lt;N;i++){
    A[i] = B[i] * bar(i);
  }
}
</pre>
<p><b>Verify</b></p>
<p>Make sure the routine satisfies the semantics of this annotation. A weaker annotation that can achieve a similar effect is __declspec(concurrency_safe(profitable)).</p>
</div> ]]></description>
      <link>http://software.intel.com/en-us/articles/gap-message-diagnostic-id-30526/</link>
      <pubDate>Fri, 15 Oct 2010 05:00:00 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/gap-message-diagnostic-id-30526/#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/gap-message-diagnostic-id-30526/</guid>
      <category>Intel® Parallel Composer</category>
      <category>Intel® C++ Compiler for Linux* Knowledge Base</category>
      <category>Intel® C++ Compiler for Mac OS X* Knowledge Base</category>
      <category>Intel® C++ Compiler for Windows* Knowledge Base</category>
      <category>Intel® Fortran Compiler for Linux* Knowledge Base</category>
      <category>Intel® Fortran Compiler for Mac OS X* Knowledge Base</category>
      <category>Intel® Visual Fortran Compiler for Windows* Knowledge Base</category>
    </item>
    <item>
      <title>GAP Message - remark #30528: (PAR) Add &amp;#34;&amp;#34;__declspec(const)&amp;#34; to the declaration of routine &amp;#34;foo&amp;#34; in order to parallelize the loop at line 123</title>
      <description><![CDATA[ <br />
<div id="art_pre_template">
<p><b>Message</b></p>
<p>Add "__declspec(const)" to the declaration of routine "foo" in order to parallelize the loop at line 123. Alternatively, adding "__declspec(concurrency_safe(profitable))" achieves a similar effect. [VERIFY] Make sure that the routine satisfies the semantics of this declaration. [ALTERNATIVE] Yet another way to help the loop being parallelized is to inline the routine with "#pragma forceinline recursive". This method does not guarantee parallelization.</p>
<p><b>Description</b></p>
<p>Make sure that the routine specified is indeed a const function or a concurrency-safe function before following the advice to add the annotation.</p>
<p>If the routine is not one of these kinds of functions, then another thing you can try is to inline it with #pragma forceinline recursive. This action may or may not be beneficial.</p>
<p><strong>Example (in C language)</strong></p>
<pre name="code" class="cpp">#define N 10000
double A[N], B[N];
int bar(int);
void foo(){
  int i;
  for (i=0;i&lt;N;i++){
    A[i] = B[i] * bar(i);
  }
}
</pre>
<p>In this case, the compiler does not parallelize the loop because it is not safe to do so without further information about routine bar, which is being called. The compiler generates a message of this form:</p>
<blockquote>
<p>id30528.c(6): remark #30528: (PAR) Add "__declspec(const)" to the declaration of routine "bar" in order to parallelize the loop at line 6. Alternatively, adding "__declspec(concurrency_safe(profitable))" achieves a similar effect. [VERIFY] Make sure that the routine satisfies the semantics of this declaration. [ALTERNATIVE] Yet another way to help the loop being parallelized is to inline the routine with "#pragma forceinline recursive". This method does not guarantee parallelization.</p>
</blockquote>
<p>If you determine it is safe to do so, you can add the pragma as follows:</p>
<pre name="code" class="cpp">#define N 10000
double A[N], B[N];
void foo(){
  int i;
#pragma forceinline recursive
  for (i=0;i&lt;N;i++){
    A[i] = B[i] * bar(i);
  }
}
</pre>
<p><b>Verify</b></p>
<p>Make sure that the routine satisfies the semantics of this declaration. Another way to help the loop being parallelized is to inline the routine with the forceinline recursive pragma, but this method does not guarantee parallelization.</p>
</div> ]]></description>
      <link>http://software.intel.com/en-us/articles/gap-message-diagnostic-id-30528/</link>
      <pubDate>Fri, 15 Oct 2010 05:00:00 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/gap-message-diagnostic-id-30528/#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/gap-message-diagnostic-id-30528/</guid>
      <category>Intel® Parallel Composer</category>
      <category>Intel® C++ Compiler for Linux* Knowledge Base</category>
      <category>Intel® C++ Compiler for Mac OS X* Knowledge Base</category>
      <category>Intel® C++ Compiler for Windows* Knowledge Base</category>
      <category>Intel® Fortran Compiler for Linux* Knowledge Base</category>
      <category>Intel® Fortran Compiler for Mac OS X* Knowledge Base</category>
      <category>Intel® Visual Fortran Compiler for Windows* Knowledge Base</category>
    </item>
    <item>
      <title>GAP Message - remark #30532: (LOOP) Store the value of the upper-bound expression (foo-&gt;len) of the loop at line 123 into a temporary local variable...</title>
      <description><![CDATA[ <br />
<div id="art_pre_template">
<p><b>Message</b></p>
<p>Store the value of the upper-bound expression (foo-&gt;len) of the loop at line 123 into a temporary local variable, and use this variable as the new upper-bound expression of the loop. To do this, insert a statement of the form "temp = foo-&gt;len" right before the loop, where "temp" is the newly created local variable. Make sure to choose a variable name that is unique. Then replace the loop's original upper-bound expression with "temp". [VERIFY] Make sure that the value of the upper-bound expression does not change throughout the entire execution of the loop.</p>
<p><b>Description</b></p>
<p>This message advises you to use a local-variable for the loop upper-bound if the upper-bound does not change during the execution of the loop. This enables the compiler to recognize the loop as a proper counted doloop which in turn enables various loop optimizations including vectorization and parallelization.</p>
<p>This message appears when the compiler can output the exact upper-bound variable to be replaced.</p>
<p><strong>Example (in C/C++ language)</strong></p>
<pre name="code" class="cpp">typedef struct
{
    float*      data;
} Vector;

typedef struct
{
    int         len;
} NetEnv;

// This one does not vectorize
void
mul(
    NetEnv*     ne,
    Vector*     rslt,
    Vector*     den,
    Vector*     num)
{
    float*      r;
    float*      d;
    float*      n;
    int i;

    r = rslt-&gt;data;
    d = den-&gt;data;
    n = num-&gt;data;

    for (i = 0; i &lt; ne-&gt;len; ++i)
    {
        r[i] = n[i] * d[i];
    }
    return;
}
</pre>
<p>In this case, the compiler is unable to vectorize the loop at /O2, the default. Adding the /Qguide option produces the following message:</p>
<blockquote>
<p>id30532.c(28): remark #30532: (LOOP) Store the value of the upper-bound expression (ne-&gt;len) of the loop at line 28 into a temporary local variable, and use this variable as the new upper-bound expression of the loop. To do this, insert a statement of the form "temp = ne-&gt;len" right before the loop, where "temp" is the newly created local variable. Make sure to choose a variable name that is unique. Then replace the loop's original upper-bound expression with "temp". [VERIFY] Make sure that the value of the upper-bound expression does not change throughout the entire execution of the loop.</p>
</blockquote>
<p>If you determine it is safe to do so, you can modify the program code as follows:</p>
<pre name="code" class="cpp">typedef struct
{
    float*      data;
} Vector;

typedef struct
{
    int         len;
} NetEnv;

// This one vectorizes
void
mul(
    NetEnv*     ne,
    Vector*     rslt,
    Vector*     den,
    Vector*     num)
{
    float*      r;
    float*      d;
    float*      n;
    int i, local_len;

    r = rslt-&gt;data;
    d = den-&gt;data;
    n = num-&gt;data;

    local_len = ne-&gt;len;
    for (i = 0; i &lt; local_len; ++i)
    {
        r[i] = n[i] * d[i];
    }
    return;
}
</pre>
</div> ]]></description>
      <link>http://software.intel.com/en-us/articles/gap-message-diagnostic-id-30532/</link>
      <pubDate>Fri, 15 Oct 2010 05:00:00 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/gap-message-diagnostic-id-30532/#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/gap-message-diagnostic-id-30532/</guid>
      <category>Intel® Parallel Composer</category>
      <category>Intel® C++ Compiler for Linux* Knowledge Base</category>
      <category>Intel® C++ Compiler for Mac OS X* Knowledge Base</category>
      <category>Intel® C++ Compiler for Windows* Knowledge Base</category>
      <category>Intel® Fortran Compiler for Linux* Knowledge Base</category>
      <category>Intel® Fortran Compiler for Mac OS X* Knowledge Base</category>
      <category>Intel® Visual Fortran Compiler for Windows* Knowledge Base</category>
    </item>
    <item>
      <title>GAP Message - remark #30531: (LOOP) Store the value of the upper-bound expression of the loop into a temporary local variable...</title>
      <description><![CDATA[ <br />
<div id="art_pre_template">
<p><b>Message</b></p>
<p>Store the value of the upper-bound expression of the loop at line 123 into a temporary local variable, and use this variable as the new upper-bound expression of the loop. To do this, insert a statement of the form "temp = upper-bound of loop" right before the loop, where "temp" is the newly created local variable. Make sure to choose a variable name that is unique. Then, replace the loop's original upper-bound expression with "temp". [VERIFY] Make sure that the value of the upper-bound expression does not change throughout the entire execution of the loop.</p>
<p><b>Description</b></p>
<p>This message advises you to use a local-variable for the loop upper-bound if the upper-bound does not change during the execution of the loop. This enables the compiler to recognize the loop as a proper counted doloop which in turn enables various loop optimizations including vectorization and parallelization.</p>
<p>This message appears when the compiler cannot output the exact upper-bound variable to be replaced.</p>
<p><strong>Example (in C/C++ language)</strong></p>
<pre name="code" class="cpp">class FooClass  {
public:
    const int getValue() { return m_numTimeSteps;}
        void Foo2(double*  vec);
private:
        int m_numTimeSteps;
};
void FooClass::Foo2(double*  vec)
{
        // this will not vectorize
        for (int k=0; k &lt; m_numTimeSteps; k++)
                vec[k] = 0.0;
 
        // this will not vectorize
        for (int k=0; k &lt; getValue(); k++)
                vec[k] = 0.0;
 
        // this will vectorize
        int ub1 = m_numTimeSteps;
        for (int k=0; k &lt; ub1; k++)
                vec[k] = 0.0;
 
        // this will vectorize
        int ub2 = getValue();
        for (int k=0; k &lt; ub2; k++)
                vec[k] = 0.0;
}
</pre>
<p><b>Verify</b></p>
<p>Make sure that the value of the upper-bound expression does not change throughout the entire execution of the loop.</p>
</div> ]]></description>
      <link>http://software.intel.com/en-us/articles/gap-message-diagnostic-id-30531/</link>
      <pubDate>Thu, 14 Oct 2010 05:00:00 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/gap-message-diagnostic-id-30531/#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/gap-message-diagnostic-id-30531/</guid>
      <category>Intel® Parallel Composer</category>
      <category>Intel® C++ Compiler for Linux* Knowledge Base</category>
      <category>Intel® C++ Compiler for Mac OS X* Knowledge Base</category>
      <category>Intel® C++ Compiler for Windows* Knowledge Base</category>
      <category>Intel® Fortran Compiler for Linux* Knowledge Base</category>
      <category>Intel® Fortran Compiler for Mac OS X* Knowledge Base</category>
      <category>Intel® Visual Fortran Compiler for Windows* Knowledge Base</category>
    </item>
  </channel></rss>
