<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated on Sun, 08 Nov 2009 03:42:23 -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-fortran-compiler-for-mac-os-x-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-fortran-compiler-for-mac-os-x-kb/tips-and-techniques/</link>
    <description></description>
    <language>en-us</language>
    <item>
      <title>Intel® Fortran Compiler for Linux* - Invoking the compiler</title>
      <description><![CDATA[ <!--CTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dt-->
<table border="0" cellpadding="0" cellspacing="15">
<tbody>
<tr>
<td class="bodycopy">
<p>For 11.x compilers (10.x compilers did not need an argument), enter:</p>
<p>$ source &lt;path-to-ifort-bin-dir&gt;/ifortvars.sh (bash) &lt;arg&gt;</p>
<p>% source &lt;path-to-ifort-bin-dir&gt;/ifortvars.csh (csh) &lt;arg&gt;</p>
<p>The environment script takes an argument based on architecture; valid arguments are as follows:</p>
<p>· ia32: Compilers and libraries for IA-32 architectures only.</p>
<p>· intel64: Compilers and libraries for Intel(R) 64 architectures only.</p>
<p>· ia64: Compilers and libraries for IA-64 architectures only.<br /><br />Then type <strong>ifort</strong> to invoke the Fortran Compiler.</p>
</td>
</tr>
</tbody>
</table>
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td><img width="388" src="http://software.intel.com/file/6324" height="5" /></td>
</tr>
<tr>
<td height="10"></td>
</tr>
</tbody>
</table> ]]></description>
      <link>http://software.intel.com/en-us/articles/intel-fortran-compiler-for-linux-invoking-the-compiler</link>
      <pubDate>Wed, 04 Nov 2009 11:22:37 -0800</pubDate>
      <comments>http://software.intel.com/en-us/articles/intel-fortran-compiler-for-linux-invoking-the-compiler#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/intel-fortran-compiler-for-linux-invoking-the-compiler</guid>
      <category>Intel® Fortran Compiler for Linux* Knowledge Base</category>
      <category>Intel® Fortran Compiler for Mac OS X* Knowledge Base</category>
    </item>
    <item>
      <title>Tips for using PARDISO</title>
      <description><![CDATA[ <strong><span style="text-decoration: underline;">Introduction<br /></span></strong><br />The interface to the PARDISO solver has many parameters and learning to use it for the first time can take a lot of time. The DSS interface for PARDISO was created to provide a simpler interface to the functionality, but often users still want to use the PARDISO interface. This article provides some tips for getting started and corrects some of the mistakes made by first-time users and even occasionally by experienced users.<br /><br /><br /><strong><span style="text-decoration: underline;">General tips</span></strong><br /><br /><strong>Explore the examples</strong> in the examples/solver directory of MKL. By choosing an example program that solves a problem that is close to the sort of problem you will be solving you can get to know some of the most helpful and relevant parameter settings for your case. <br /><br /><strong>Use the matrix checker: </strong>The iparm(27) parameter of PARDISO controls the input checker. By default it is turned off (iparm(27)=0), so you'll need to turn it on by setting iparm(27)=1. PARDISO will run some checks on your data structure and return an error message if it finds that something was wrong. This can help you find simple errors in your indexing as well as correct misunderstandings about how PARDISO expects your matrix to be represented and stored (e.g., a symmetric matrix should be stored in <em>upper</em> triangular form).<br /><br /><strong>Check your link line:</strong>Sometimes a program linked against Intel MKL can misbehave (crash, hang, etc.) because the program was linked against the wrong threading layer (which assumes a specific threading runtime) or wrong interface (e.g., ILP64 v. LP64; cdecl v. stdcall). The <a target="_blank" href="http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/">link line advisor </a>may be helpful if you're using the latest version of Intel MKL. For earlier versions you should consult the Intel MKL User's Guide chapter 5 on linking your application.<br /><br /><br /><strong><span style="text-decoration: underline;">Important settings</span><br /></strong><br /><strong>Use message level information</strong>: The solver prints statistical information to the screen if the input parameter msglvl = 1 and generates no output if msglvl = 0. There is no default value for this option.<br /><br /><strong>Single and double precision</strong>: Starting version 10.2 Intel® Math Kernel Library supports computations in single precision as well as double precision. To switch between single and double precision modes you should use iparm(28). The default mode of iparm(28) is 0, which corresponds to the double precision. If iparm(28) = 1 all internal computations are made in single precision. Please refer to this <a href="http://software.intel.com/en-us/articles/single-precision-real-and-complex-data-support-in-pardiso/">article</a> for more information on these options.<br /><br /><strong>Use default values</strong>: To get started quickly with PARDISO you can use the default values for each of the elements in the iparm array. Setting iparm(1) = 0 will cause PARDISO to use the default values for the rest of the array: iparm(2) and iparm(4) through iparm(64). Otherwise, you must supply all the values in the iparm array. <br /><br /><strong>Rewrite the solution</strong>: if you need to store the output solution on the right hand side of array b, choose iparm(6) = 1. <br />The default value of iparm(6)=0, which corresponds array x contains the solution.<br /><br /><strong><span style="text-decoration: underline;"><br />Other sources of information<br /></span></strong><br />If you're still having trouble and/or you suspect you've found a problem in Intel MKL, you might check the <a href="http://software.intel.com/en-us/articles/known-limitations-in-intel-mkl-10-2/">known issues article</a> in the <a href="http://software.intel.com/en-us/articles/intel-mkl-kb/all/1/">Intel MKL knowledgebase</a>. Another option is to search the <a href="http://software.intel.com/en-us/forums/intel-math-kernel-library/">Intel MKL forum </a>for other reports of a similar problem or post a question of your own. ]]></description>
      <link>http://software.intel.com/en-us/articles/pardiso-tips</link>
      <pubDate>Fri, 28 Aug 2009 16:12:50 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/pardiso-tips#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/pardiso-tips</guid>
      <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>
      <category>Intel® Visual Fortran Compiler for Windows* Knowledge Base</category>
    </item>
    <item>
      <title>How am I notified of updates for my registered products?</title>
      <description><![CDATA[ <p> </p>
<div><b>Problem : </b><br />How am I notified of updates for my registered products?<br /><br /><b>Resolution : </b><br />1) Login to the Intel® Registration Center by entering your Login ID and Password in the Registered Users Login section  of  the web page. You will see a list of all products you have subscribed;<br />2) Click on My account/Change notification preference on My products page below.<br /><br /><img src="http://software.intel.com/file/21592" alt="Notifacation+update+1.PNG" title="Notifacation+update+1.PNG" /><br /><br />3) You will be directed to the page below, check the box of <label for="ctl00_MainContentPlaceHolder_ckYesFilesNotification">Yes, I would like to receive Intel® Software Product update notifications.<br /><img src="http://software.intel.com/file/21593" alt="Notifacation+update+2.PNG" title="Notifacation+update+2.PNG" /><br /><br />4) Click Save Notification Prefences.<br /><br />You will then receive the registered product update notifications.</label></div> ]]></description>
      <link>http://software.intel.com/en-us/articles/how-notified-updates-for-products</link>
      <pubDate>Mon, 10 Aug 2009 00:40:04 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/how-notified-updates-for-products#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/how-notified-updates-for-products</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® Cluster Toolkit for Linux* Knowledge Base</category>
      <category>Intel® Cluster Toolkit 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>
      <category>Intel® Parallel Amplifier Knowledge Base</category>
      <category>Intel® Parallel Composer Knowledge Base</category>
      <category>Intel® Parallel Inspector Knowledge Base</category>
      <category>Intel® Software Development Products Registration Center Knowledge Base</category>
      <category>Intel® Visual Fortran Compiler for Windows* Knowledge Base</category>
      <category>Intel® VTune™ Performance Analyzer for Linux* Knowledge Base</category>
      <category>Intel® VTune™ Performance Analyzer for Windows* Knowledge Base</category>
    </item>
    <item>
      <title>Redistribution of Application Binaries Built for Mac OS* X </title>
      <description><![CDATA[ <a href="javascript:void(0)" onclick="ndownload('http://software.intel.com/file/21146')"></a>Applications built with 11.x Intel® Compiler Professional Editions may be installed on systems on where the Intel Compiler Professional Edition is not installed. This document provides help for application developers to build the redistribution kit. <br /><br />Beginning with 11.0, the Intel Compiler Professional Editions fully integrate the component products; in contrast, the 10.x Intel Compiler Professional Edition licenses “bundled” separate component products. <br /><br />
<ul style="padding-left: 30px;">
<li>The 11.x Intel® C++ Compiler Professional Edition for Mac OS* X products integrate the Intel® C++ Compiler, the Intel® Math Kernel Library, the Intel® Integrated Performance Primitives, and the Intel® Threading Building Blocks products. </li>
<br />
<li>The 11.x Intel® Fortran Compiler Professional Edition for Mac OS* X products integrate the Intel® Fortran Compiler with the Intel® Math Kernel Library. </li>
</ul>
<br />The attached PDF document includes information on redistributable libraries for all the component products included with the Intel Compiler Professional Editions for Mac OS* X.<br /><br /><a href="javascript:void(0)" onclick="ndownload('http://software.intel.com/file/21146')">11x_Redistribution_FAQ_MacOSX.pdf</a><br /><br /><br />Due to the many differences in redistributing applications built for Microsoft Windows* vs. Linux* vs. Mac OS* X, a separate redistribution article is provided in Intel® Software Knowledge Base for each OS for Intel Compiler Professional Edition products (Microsoft Windows*, Linux* and Mac OS* X) and for Intel® Parallel Composer. <br /><br />The Knowledge Base article at the following link includes information on redistributable libraries for all the component products included with Intel® Compiler Professional Editions for Linux*:<br /><br /><a href="http://software.intel.com/en-us/articles/redistribution-of-application-binaries-built-for-linux/">http://software.intel.com/en-us/articles/redistribution-of-application-binaries-built-for-linux/<br /></a><br />The Knowledge Base article at the following link includes information on redistributable libraries for all the component products included with Intel® Compiler Professional Editions for Microsoft Windows*:<br /><br /><a href="http://software.intel.com/en-us/articles/redistribution-of-application-binaries-built-for-microsoft-windows/">http://software.intel.com/en-us/articles/redistribution-of-application-binaries-built-for-microsoft-windows/</a><br /><br />The Knowledge Base article at the following link includes information on redistributable libraries for all the component products included with Intel® Parallel Composer:<br /><br /><a href="http://software.intel.com/en-us/articles/faq-intel-parallel-composer-redistributable-package/">http://software.intel.com/en-us/articles/faq-intel-parallel-composer-redistributable-package/<br /></a> ]]></description>
      <link>http://software.intel.com/en-us/articles/redistribution-of-application-binaries-built-for-mac-os-x</link>
      <pubDate>Fri, 10 Jul 2009 16:22:27 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/redistribution-of-application-binaries-built-for-mac-os-x#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/redistribution-of-application-binaries-built-for-mac-os-x</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>Fortran Real Literal Constants Are Single Precision</title>
      <description><![CDATA[ Fortran real literal constants are by default single precision.  It is important that care is taken when assigning a literal to a quad precision or double precision variable so that you get the expected results.<br /><br />For example, consider these two assignments to B:<br /><br />B = 3.1<br />B = 3.10000000000<br /><br />If B is defined as double or quad precision, the literal constant is not.  If you intend to B to contain or double or quad precision value, you need to write:<br /><br />B = 3.1_8 for double precision<br /><br />OR<br /><br />B = 3.1_16 for quad precision<br /><br />Alternatively to using the notation above, you can use compiler options /real-size:64 (double precision) or /real-size:128 (quad precision).  The Windows compiler options are listed.  Please see the compiler documentation for Linux* and Mac OS X* compiler options.<br /><br />These are just two of many ways to set precision of real literal contants.  For additional methods please consult a Fortran programming language reference manual.<br /> ]]></description>
      <link>http://software.intel.com/en-us/articles/fortran-real-literal-constants-are-single-precision</link>
      <pubDate>Thu, 02 Jul 2009 13:23:20 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/fortran-real-literal-constants-are-single-precision#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/fortran-real-literal-constants-are-single-precision</guid>
      <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>Intel® Fortran Compiler - Support for Fortran language standards</title>
      <description><![CDATA[ <p>Intel® Fortran is fully compliant with the ISO/IEC 1539:1997 Fortran language   standard (Fortran 95). Intel Fortran also fully supports programs that conform   to the earlier standards Fortran 90, FORTRAN 77 and FORTRAN IV (FORTRAN 66.)   In some cases, compiler options may need to be specified to enable support   of behavior that was different in earlier versions of the Fortran standard.</p>
<p>The Intel Fortran compiler supports many features that are new to the latest   revision of the Fortran standard, Fortran 2003 (ISO/IEC 1539:2004 ). Additional   Fortran 2003 features will appear in future versions. Fortran 2003 features   supported by the  version 11.1 compiler include:</p>
<ul>
<li>The Fortran character set has been extended to contain the 8-bit ASCII     characters ~ [ ] ` ^ { } | # @</li>
<li>Names of length up to 63 characters</li>
<li>Statements of up to 256 lines</li>
<li>Square brackets [ ] are permitted to delimit array constructors instead     of (/ /)</li>
<li>Structure constructors with component names and default initialization</li>
<li>Array constructors with type and character length specifications</li>
<li>A named PARAMETER constant may be part of a complex constant</li>
<li>Enumerators</li>
<li>Allocatable components of derived types</li>
<li>Allocatable scalar variables</li>
<li>Deferred-length character entities</li>
<li>PUBLIC types with PRIVATE components and PRIVATE types with PUBLIC components</li>
<li>ERRMSG   keyword for ALLOCATE and DEALLOCATE</li>
<li>SOURCE= keyword for ALLOCATE</li>
<li>Type     extension</li>
<li>CLASS declaration</li>
<li>Polymorphic entities</li>
<li>Inheritance association</li>
<li>Deferred bindings and abstract types</li>
<li>Type-bound procedures</li>
<li>TYPE CONTAINS declaration</li>
<li>ABSTRACT attribute</li>
<li>DEFERRED attribute</li>
<li>NON_OVERRIDABLE attribute</li>
<li>ASYNCHRONOUS attribute and statement</li>
<li>BIND(C) attribute and statement</li>
<li>PROTECTED attribute and statement</li>
<li>VALUE attribute and statement</li>
<li>VOLATILE attribute and statement</li>
<li>INTENT attribute for pointer objects</li>
<li>Reallocation of allocatable variables on the left hand side of an assignment     statement when the right hand side differs in shape or length (requires option "assume     realloc_lhs")</li>
<li>ASSOCIATE construct </li>
<li>SELECT TYPE construct</li>
<li>In all I/O statements, the following numeric values can be of any kind:     UNIT=, IOSTAT=</li>
<li>NAMELIST I/O is permitted on an internal file</li>
<li>Restrictions on entities in a NAMELIST group are relaxed</li>
<li>FLUSH statement</li>
<li>WAIT statement</li>
<li>ACCESS='STREAM' keyword for OPEN</li>
<li>ASYNCHRONOUS keyword for OPEN and data transfer statements</li>
<li>ID keyword for INQUIRE and data transfer statements</li>
<li>POS keyword for data transfer statements</li>
<li>PENDING keyword for INQUIRE</li>
<li>The following OPEN numeric values can be of any kind: RECL=</li>
<li>The following READ and WRITE numeric values can be of any kind: REC=, SIZE=</li>
<li>The following INQUIRE numeric values can be of any kind: NEXTREC=, NUMBER=,     RECL=, SIZE=</li>
<li>Recursive I/O is allowed in the case where the new I/O being started is     internal I/O that does not modify any internal file other than its own</li>
<li>IEEE Infinities and NaNs are displayed by formatted output as specified     by Fortran 2003</li>
<li>BLANK, DELIM, ENCODING, IOMSG, PAD, ROUND, SIGN, SIZE I/O keywords</li>
<li>DC,     DP, RD, RC, RN, RP, RU, RZ format edit descriptors</li>
<li>In an I/O format, the comma after a P edit descriptor is optional when     followed by a repeat specifier</li>
<li>Rename of user-defined operators in USE</li>
<li>INTRINSIC and NON_INTRINSIC keywords in USE</li>
<li>IMPORT statement</li>
<li>Allocatable dummy arguments</li>
<li>Allocatable function results</li>
<li>PROCEDURE declaration</li>
<li>Procedure pointers</li>
<li>ABSTRACT INTERFACE</li>
<li>PASS     and NOPASS attributes</li>
<li>Execution of a STOP statement displays a warning if an IEEE floating point exception is signaling</li>
<li>The COUNT_RATE argument to the SYSTEM_CLOCK intrinsic may be a REAL of any kind</li>
<li>COMMAND_ARGUMENT_COUNT intrinsic</li>
<li>GET_COMMAND intrinsic</li>
<li>GET_COMMAND_ARGUMENT intrinsic</li>
<li>GET_ENVIRONMENT_VARIABLE intrinsic</li>
<li>IS_IOSTAT_ END intrinsic</li>
<li>IS_IOSTAT_EOR intrinsic</li>
<li>MAX/MIN/MAXVAL/MINVAL/MAXLOC/MINLOC intrinsics allow CHARACTER arguments</li>
<li>MAXLOC or MINLOC of a zero-sized array returns zero (requires option "assume noold_maxminloc")</li>
<li>MOVE_ALLOC intrinsic</li>
<li>NEW_LINE intrinsic</li>
<li>SELECTED_CHAR_KIND intrinsic</li>
<li>The following intrinsics take an optional KIND= argument: ACHAR, COUNT,     IACHAR, ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, MAXLOC, MINLOC, SCAN, SHAPE,     SIZE, UBOUND, VERIFY</li>
<li>Type inquiry intrinsic functions</li>
<li>ISO_C_BINDING intrinsic module</li>
<li>IEEE_EXCEPTIONS, IEEE_ARITHMETIC and IEEE_FEATURES intrinsic modules</li>
<li>ISO_FORTRAN_ENV intrinsic module</li>
</ul>
<p>Please see the compiler release notes for an updated list.</p>
<p>The Intel Fortran compiler also supports some features from the draft Fortran   2008 standard. These include:</p>
<ul>
<li>Passing internal procedures as actual arguments</li>
<li>A procedure pointer can point to an internal procedure</li>
<li>In ALLOCATE, if source-object does not have a shape specified, the shape     is taken from the SOURCE= argument </li>
</ul>
<p>Intel Fortran also includes a number of extensions to Fortran 2003, as well   as command-line options that allow you to override the default actions of the   compiler.</p>
<p>In some cases, the default behavior of the Intel Fortran Compiler does not conform to Fortran 2003 semantics.  The following table lists the compiler options which are not enabled by default and which must be specified to obtain full Fortran 2003 semantics. Note that, in some cases, enabling these options may lower run-time performance.</p>
<table border="1" cellspacing="0" cellpadding="5" width="90%" summary="List of non-default compiler options required to get full Fortran 2003 semantics by the Intel Fortran Compiler.">
<caption> Non-Default Compiler Options for Fortran 2003 Semantics </caption> 
<tbody>
<tr>
<th scope="col">Windows*</th> <th scope="col">Linux* and Mac OS X* </th>
</tr>
<tr>
<td>/assume:byterecl</td>
<td>-assume byterecl</td>
</tr>
<tr>
<td>/assume:minus0</td>
<td>-assume minus0</td>
</tr>
<tr>
<td>/assume:noold_maxminloc</td>
<td>-assume noold_maxminloc</td>
</tr>
<tr>
<td>/assume:noold_unit_star</td>
<td>-assume noold_unit_star</td>
</tr>
<tr>
<td>/assume:noold_xor</td>
<td>-assume noold_xor</td>
</tr>
<tr>
<td>/assume:protect_parens</td>
<td>-assume protect_parens</td>
</tr>
<tr>
<td>/assume:realloc_lhs</td>
<td>-assume realloc_lhs</td>
</tr>
<tr>
<td>/assume:std_mod_proc_name</td>
<td>-assume std_mod_proc_name</td>
</tr>
</tbody>
</table>
<p> </p>
<p>For more information, please refer to the "Compiler Options" section of the Intel Fortran Compiler documentation.</p> ]]></description>
      <link>http://software.intel.com/en-us/articles/intel-fortran-compiler-support-for-fortran-language-standards</link>
      <pubDate>Wed, 24 Jun 2009 11:41:12 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/intel-fortran-compiler-support-for-fortran-language-standards#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/intel-fortran-compiler-support-for-fortran-language-standards</guid>
      <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>Determining Root Cause of SIGSEGV or SIGBUS errors</title>
      <description><![CDATA[ <br />
<div id="art_pre_template"><b>Problem : </b>When I run my code compiled with the Intel Fortran Compiler I get 'sigsegv' on linux (or sigbus on Mac OS X).  This code has run fine for years on &lt;insert your previous compiler/platform&gt;.  Is this a bug with the Intel Compiler?<br /><br /><br /><b>Environment : </b>linux or Mac OS* X<br /><br /><br /><b>Root Cause : </b>There are many possible causes.  A segmention fault (bus error Mac OS X) is a general fault that can have multiple causes.  We outline these potential causes below and give suggestions for avoiding the segmentation fault<br /><br /><br /><b>Possible Cause #1 Fortran Specific Stackspace Exhaustion: Solution, -heap-arrays compiler option. </b><b><br /><br /></b>The Intel Fortran Compiler use stack space to allocate a number of temporary or intermediate copies of array data.  <br /><br /><b>NON-OpenMP and NON-Auto-parallelized Applications:</b> IF your program is not using OpenMP or Auto-parallelization (-parallel compiler switch) and your compiler is newer than Linux v9.1.037 (or all Mac OS* compilers), try the -heap-arrays compiler option.  OpenMP or Auto-parallelization users and users with Linux compilers older than v9.1.037 please read ahead to <b>Possible Cause #2</b> for tips on unlimiting the stack size.<br /><br />-heap-arrays<br /><br />If this removes the sigsegv or bus error, you may STOP at this point.  You may wish to read the attached PDF presentation (link at bottom of page) to learn about when and where array temporaries are created.  With a few code changes you may be able to avoid some array temporaries, and hence reduce your application's need for temporary copies (improves performance).  Also, the -heap-arrays compiler option can take an optional argument [size] to specify the threshold size in Kbytes at which arrays larger than [size] are allocated on heap, all others on stack.  For example:<br /><br />-heap-arrays 10<br /><br />puts all automatic and temporary arrays larger than 10Kbytes on heap<br /><br /><br /><b>Cause #2 Stackspace Exhaustion.   Solution: Unlimiting Stacksize for OpenMP Applications or any Application</b>:<br />The first step is to try to increase your shell stack limit on Linux and Mac OS* X.  However, this option can have unwanted effects on data sharing with OpenMP or auto-parallelized code.  Because of this, OpenMP and auto-parallelization users are advised to not use -heap-arrays and insted try to unlimit their shell stack size limit.<br /><br />Linux, bash:    ulimit -s unlimited<br />Linux, csh/tcsh:   unlimit stacksize<br /><br />You may check your stack size limit with:<br />bash:  ulimit -a<br />csh:    limit<br />and look for 'stack size' limit for your shell environment<br /><br />Notes:  If you run your program under the control of a batch subsystem you may need to add the command above to your user startup files ( ~/.bashrc  ~/.profile  or ~/.cshrc )<br /><br />For Mac OS* X, there is a hard upper limit on the shell stacksize.  For most systems, this is:<br /><br />bash:  ulimit -s 65532<br /><br />which sets the limit to 64Mbytes.<br /><br />An alternative is to use a linker option to increase the executable's default shell stacksize, as documented here:  <a href="http://software.intel.com/en-us/articles/intel-fortran-compiler-increased-stack-usage-of-80-or-higher-compilers-causes-segmentation-fault/">http://software.intel.com/en-us/articles/intel-fortran-compiler-increased-stack-usage-of-80-or-higher-compilers-causes-segmentation-fault/</a><br /><br />Re-run your application, if this fixes the issue you may stop.  If your application still generates sigsegv or bus error, continue reading.<br /><br /><br /><b>Possible Cause #3, Stack Corruption Due to User Coding Error.</b> There are a number of user coding errors that can cause stack corruption and lead to a sigsegv or bus error at run time.  These errors are particularly hard to find since the segmentation fault may occur later in the program in a section unrelated to where the stack was initially corrupted.<br /><br />The first step is to try to isolate where in the code the fault occurs.  This is done by generating an execution 'traceback'.  Compile and link using the ifort driver and these options:<br /><br />-g -traceback<br /><br />When the code faults, you will often get a report showing the call stack when the fault occurs.  If you do not get a stack traceback, insure that you have used -g for both compilation and link and make sure that -traceback was used on the compilation.  There are cases where the seg fault occurs while the program is in kernel space and thus no user stack is available for trace back.  We are working to improve this in a future release.<br /><br />This trace back report is read from the bottom of the list upwards.  Find the uppermost subroutine or function from your code along with it's line number to isolate which instruction caused the fault.  Check for user coding errors at this statement.  If no obvious user error, continue below<br /><br /><br /><b>Possible Cause #4, exceeding Array Bound.  Solution, try -check bounds<br /><br /></b>The -check-bounds compiler option provides a run-time check of array accesses and character string expressions to insure that the indices are within the boundaries of the array.  This checking is useful to find cases where the indices go outside of the declared size of the array.  This option has a big impact on performance, the magnitude of which depends on how many array accesses are performed in the application.  Also, -check-bounds array bounds checking is not performed for arrays that are dummy arguments in which the last dimension bound is specified as * or when both upper and lower dimensions are 1.   To enable bounds checking, compile with:<br /><br />-check bounds -g <br /><br />and run your program.  The checking is performed at run time and not at compile time.  If this finds your error STOP.  ELSE keep reading.<br /><b><br /><br />Possible Cause #5</b>, <b>calling a function as a subroutine</b>, or invoking a subroutine as if it were a function.  <br /><br />These are user coding errors where a user does something similar to this:<br /><br />--- main program ---<br />...<br />call ThisIsIllegal( some_arguments )<br />...<br />--- end main program ---<br /><br />--- ThisIsIllegal ---<br />integer function ThisIsIllegal( some_arguments )<br />...<br />--- end ThisIsIllegal ---<br /><br />In the example above, the main program calls ThisIsIllegal as if it were a subroutine, however ThisIsIllegal is declared as a function.  This can cause stack corruption.  To test for these conditions, try using compiler option<br /><br />-fp-stack-check -g -traceback<br /><br />compile with these options and run.   If the stack is corrupted by something similar to the above, your code will exit and give a stack trace.<br /><br />You can check the interfaces of your procedures with a compile time check:<br /><br />-gen-interfaces -warn interfaces<br /><br />This compile time check will generate INTERFACE blocks for your procedures.  The -warn interfaces will then use these compiler-generated interfaces and check the calls to your procedures to make sure arguments and interfaces match between caller and callee.   Note that this check occurs only for Fortran source files.  This will not check interfaces in mixed language program.<br /><br /><br /><b>Possible Cause #6</b>, <b>large array temporaries caused by passing non-contiguous array sections.</b> Solution, detect with -check arg_temp_created and fix with coding change to include explicit interface and assumed shaped arrays.<br /><br />Consider this 'before' example:<br /><br />--- main program ---<br />real(8) :: f(1800,3600,1)<br />external sub<br />...<br />call sub( f(1:900,:,:) )<br />...<br />--- end main program ---<br /><br />and the "sub" subroutine is in a separately compiled source file:<br />--- external subroutine "sub" ---<br />subroutine sub( f )<br />real(8) :: f(900,3600,1)<br />...<br />--- end subroutine "sub" ---<br /><br />In this case, "sub" is expecting a contiguous array of size 900x3600x1.  However, the call is passing an array that is not contiguous in memory.  In situations such as this, the compiler will make an array temporary at the call to copy the elements of the array "f" from non-contiguous chucks into a contiguous array such as what "sub" is expecting.  This temporary is allocated on stack unless -heap-arrays is specified.  <br /><br />To check if this is occuring in your code, compile with<br />-check arg_temp_created<br /><br />and run the program.  Messages will be written when argument temporaries are created.  To work around the issue, creating a explicit interface and using an assumed shaped array in "sub" will remove the need for an array temporary:<br /><br />--- main ---<br />real(8) :: f(1800,3600,1)<br />interface<br />subroutine sub(f)<br />real(8) :: f(:,:,:)<br />end subroutine sub<br />end interface<br />...<br />call sub( f(1:900,:,:) )<br />...<br />--- end main program ---<br /><br />--- "sub" ---<br />subroutine sub( f )<br />real(8) :: f(:,:,:)<br />...<br />end subroutine sub<br /><br />Keep in mind, that although this avoids the array temporary, within "sub" the compiler is now aware that the array "f" may be non-contiguous.  Thus, some optimizations on statements using "f" may be disabled and thus affect performance.<br /><br /><br /><b>Case NONE OF THE ABOVE:  Solution, more in-depth analysis is needed</b>.  <br /><br />99% of the sigsegv or bus error cases tend to fall into the categories above.  However, there are other cases where segmentation faults can occur.  <br /><br />If your application is linking in external libraries, make sure that the library is compatible with your compiler.  Was the external library compiled with the Intel Compiler?  If so, were the major versions the same - that is, was the library compiled with Intel Fortran v9.1 but your application built with Intel Fortran v10.x or v11.x?  Intel only guarantees compatibility within major versions ( 9, 10, 11 are examples of major versions).  <br /><br />If the external library is from a software vendor or tool:  does this vendor explicitly name the Intel Compiler as compatible, and if so, with which version(s) have they verified their library?  You should only use the version(s) of the Intel Compiler certified by your vendor.  If you need an older version of the Intel Compiler, please see <a href="http://software.intel.com/en-us/articles/older-version-product/">How do I get an older version of an Intel(R) Software Development Product.</a><br /><br /><br /><b>When all else fails ....</b><br /><br />Post a note to the User Forum <a href="http://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux-and-mac-os-x/">HERE</a>.   Please include the name of your application if it a commonly available code, post a stack trace (if you can get one), compiler options used, and ideally a tarball of the entire application, input files and instructions on how to run the program.<br /><br />If you have support for your product, you can open an issue at <a href="http://premier.intel.com">http://premier.intel.com</a>.<br /><br />For more background information, try the excellent Dr. Fortran Article <a href="http://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/41911/reply/12580/">"Don't Blow Your Stack!"</a><br /><br />And read the PDF presentation attached to this article Fortran Compiler Use of Temporaries: <a onclick="ndownload('http://software.intel.com/file/20415')" href="javascript:void(0)">Stack+usage.pdf</a><br /></div> ]]></description>
      <link>http://software.intel.com/en-us/articles/determining-root-cause-of-sigsegv-or-sigbus-errors</link>
      <pubDate>Wed, 24 Jun 2009 10:57:40 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/determining-root-cause-of-sigsegv-or-sigbus-errors#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/determining-root-cause-of-sigsegv-or-sigbus-errors</guid>
      <category>Intel® Fortran Compiler for Linux* Knowledge Base</category>
      <category>Intel® Fortran Compiler for Mac OS X* Knowledge Base</category>
    </item>
    <item>
      <title>Application Configuration for Dynamic Libraries</title>
      <description><![CDATA[ When running your application that uses dynamic libraries it is necessary for the application to know where the dynamic libaries are located. Dynamic libraries can be configured via two methods.<br /><br />During application development you can use the DYLD_LIBRARY_PATH environment variable to set the path where the Intel compiler dynamic libaries are located. This environment variable is set to the appropriate directory when your source the iccvars.sh or ifortvars.sh script files.<br /><br />Once application development is complete, you may not want to require your customers to set an environment variable before running your application. You can embed the location of dynamic libraries in your application by using a tool provide by Apple called install_name_tool. Documentation is available on the Apple Developer Connection web site about this tool.  More information on <a href="http://developer.apple.com/documentation/DeveloperTools/Conceptual/MachOTopics/1-Articles/loading_code.html">dynamic shared libraries </a>is also available on the Apple Developer Connection web site.<br /><br />Here's an example usage:<br /><br />install_name_tool -change libimf.dylib @executable_path/../Frameworks/libimf.dylib MyApp<br /><br />will change all references in "MyApp" to go to "@executable_path/../Frameworks/" instead of &lt;nopath&gt;.<br /><br />At runtime, the magic string "@executable_path" is expanded to the current path ( /&lt;.....&gt;MyApp.app/Contents/MacOS/executable), so the user can drag the whole app directory anywhere they want without having to worry about where the dependent dylibs are.<br /><br />You will need to run the install_name_tool on both your application and the Intel libraries used by your application.<br /><br />For example:<br /><br />otool -L libifcore.dylib <br />libifcore.dylib:<br />     libifcore.dylib (compatibility version 0.0.0, current version 1.0.0)<br />     libimf.dylib (compatibility version 0.0.0, current version 0.0.0)<br />     libirc.dylib (compatibility version 0.0.0, current version 0.0.0)<br />     /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.2)<br /><br />So you have to do <br /><br />install_name_tool -change libifcore.dylib @executable_path/../Frameworks/libifcore.dylib libifcore.dylib <br /><br />and so on for all the cross-references in the three Intel libraries. ]]></description>
      <link>http://software.intel.com/en-us/articles/application-configuration-for-dynamic-libraries</link>
      <pubDate>Wed, 22 Apr 2009 14:20:58 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/application-configuration-for-dynamic-libraries#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/application-configuration-for-dynamic-libraries</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>Passing Linker Options with Multiple Arguments using -Xlinker,-Wl, or -Qoption,link</title>
      <description><![CDATA[ If you are using the compiler drive (icc/icpc/ifort) to link together object files, you may have a need to pass a linker option directly to ld that contains multiple parts, such as "-rpath &lt;dir&gt;".  There are several ways to do this.<br /><br />1. 
<pre name="code" class="plain:nogutter:nocontrols">-Xlinker -rpath -Xlinker &lt;dir&gt;</pre>
<br />2.
<pre name="code" class="plain:nogutter:nocontrols">-Wl,-rpath,&lt;dir&gt;</pre>
<br />3.
<pre name="code" class="plain:nogutter:nocontrols">-Qoption,link,-rpath,&lt;dir&gt;</pre> ]]></description>
      <link>http://software.intel.com/en-us/articles/passing-linker-options-with-multiple-arguments-using-xlinker-wl-or-qoptionlink</link>
      <pubDate>Mon, 16 Mar 2009 16:46:13 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/passing-linker-options-with-multiple-arguments-using-xlinker-wl-or-qoptionlink#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/passing-linker-options-with-multiple-arguments-using-xlinker-wl-or-qoptionlink</guid>
      <category>Intel® C++ Compiler for Linux* Knowledge Base</category>
      <category>Intel® C++ Compiler for Mac OS X* Knowledge Base</category>
      <category>Intel® Fortran Compiler for Linux* Knowledge Base</category>
      <category>Intel® Fortran Compiler for Mac OS X* Knowledge Base</category>
    </item>
    <item>
      <title>Disable movbe to Test Intel® Atom™ Processor Targeted Code on non-Intel® Atom™ Processor Platforms</title>
      <description><![CDATA[ <p>The Intel® Compilers 11.0 allow you to target the Intel® Atom™ processor using the /QxSSE3_ATOM or -xSSE3_ATOM compiler options.  These options enable the generation of the movbe instruction which is unique to the Intel® Atom™ processor.  However, there is sometimes a need to run such codes on a different processor such as the Intel® Pentium® III processor (for example, for validation purposes where an Intel® Atom™ processor isn't available).  In these situations, the compiler provides the /Qinstruction:nomovbe (for Windows*) and -minstruction=nomovbe (for Linux*/Mac*) options to disable the generation of this instruction.</p> ]]></description>
      <link>http://software.intel.com/en-us/articles/disable-movbe-to-test-intel-atom-targeted-code-on-non-atom-platforms</link>
      <pubDate>Fri, 20 Feb 2009 16:41:09 -0800</pubDate>
      <comments>http://software.intel.com/en-us/articles/disable-movbe-to-test-intel-atom-targeted-code-on-non-atom-platforms#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/disable-movbe-to-test-intel-atom-targeted-code-on-non-atom-platforms</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>
  </channel></rss>