<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Compiler Does Not Detect Undesired Memory Change Bug in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-Does-Not-Detect-Undesired-Memory-Change-Bug/m-p/745409#M3568</link>
    <description>Steve,&lt;BR /&gt;&lt;BR /&gt;-warn interface did not offer any new information&lt;BR /&gt;&lt;BR /&gt;I have checked the data type and size of this array and everything seems fine. Is it possible that it is something completely unrelated to this particular array that is causing it, or should I be looking for something that has a relation to this array? Thanks&lt;BR /&gt;&lt;BR /&gt;~Roman</description>
    <pubDate>Mon, 05 Apr 2010 22:33:22 GMT</pubDate>
    <dc:creator>iomega15</dc:creator>
    <dc:date>2010-04-05T22:33:22Z</dc:date>
    <item>
      <title>Compiler Does Not Detect Undesired Memory Change Bug</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-Does-Not-Detect-Undesired-Memory-Change-Bug/m-p/745407#M3566</link>
      <description>I have a subroutine (lets call it subroutine 1) which sets the values of an array and then the array is passed into a different subroutine(lets call it subroutine 2). Somewhere in subroutine 1, after the values of the array are set, but before it gets passed into subroutine 2, the array's values are changed to zero. There are NO calls to modify the array before it gets passed to subroutine 2, so this should not happen. Also the array is not passed into or out of any other subroutines, prior to being passed to subroutine 2, so there is absolutely nothing that should be changing its value...&lt;BR /&gt;&lt;BR /&gt;The code is written in fortran and uses MPI on lonestar.tacc.utexas.edu. I have tried running with:&lt;BR /&gt;&lt;BR /&gt;Intel Fortran Compiler for Intel EM64T-based applications, Version 9.1 Build 20061101 Package ID: &lt;BR /&gt;&lt;BR /&gt;and with &lt;BR /&gt;&lt;BR /&gt;Intel Fortran Compiler for applications running on Intel 64, Version 10.1 Build 20080602&lt;BR /&gt;&lt;BR /&gt;with the following compiler options "-C -fpe0 -traceback -xT -shared-intel"&lt;BR /&gt;&lt;BR /&gt;and also on&lt;BR /&gt;&lt;BR /&gt;sooner.oscer.ou.edu &lt;BR /&gt;with the PGI compiler and the options "-g -gopt -Mbounds -Mchkptr -fastsse -tp=core2-64"&lt;BR /&gt;&lt;BR /&gt;none of these compilers report any errors. &lt;BR /&gt;&lt;BR /&gt;I have also tried setting the values of the array outside of subroutine 1 and then passing it into subroutine 1 with INTENT(IN). In this case, the array becomes protected from modifications and its values are successfully passed into subroutine 2. Although this workaround makes my code work, it makes me feel uneasy about an undetected bug being present in my code.&lt;BR /&gt;&lt;BR /&gt;Please help me debug this! Thanks&lt;BR /&gt;&lt;BR /&gt;~Roman&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 05 Apr 2010 21:45:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-Does-Not-Detect-Undesired-Memory-Change-Bug/m-p/745407#M3566</guid>
      <dc:creator>iomega15</dc:creator>
      <dc:date>2010-04-05T21:45:05Z</dc:date>
    </item>
    <item>
      <title>Compiler Does Not Detect Undesired Memory Change Bug</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-Does-Not-Detect-Undesired-Memory-Change-Bug/m-p/745408#M3567</link>
      <description>This is usually caused by a programming error due to array bounds or data type mismatches. You already have -C so that helps with some kinds of array bounds errors, but not if you use * bounds or misdeclare the bounds. Try adding:&lt;BR /&gt;&lt;BR /&gt;-warn interface&lt;BR /&gt;&lt;BR /&gt;and see if anything shows up there. Otherwise, you might try running under the debugger and breaking at various points in the execution to see where the values change. Since you are using MPI, it may be that one of your MPI calls is passing a scalar instead of an array, or the wrong array size.</description>
      <pubDate>Mon, 05 Apr 2010 21:54:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-Does-Not-Detect-Undesired-Memory-Change-Bug/m-p/745408#M3567</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2010-04-05T21:54:36Z</dc:date>
    </item>
    <item>
      <title>Compiler Does Not Detect Undesired Memory Change Bug</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-Does-Not-Detect-Undesired-Memory-Change-Bug/m-p/745409#M3568</link>
      <description>Steve,&lt;BR /&gt;&lt;BR /&gt;-warn interface did not offer any new information&lt;BR /&gt;&lt;BR /&gt;I have checked the data type and size of this array and everything seems fine. Is it possible that it is something completely unrelated to this particular array that is causing it, or should I be looking for something that has a relation to this array? Thanks&lt;BR /&gt;&lt;BR /&gt;~Roman</description>
      <pubDate>Mon, 05 Apr 2010 22:33:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-Does-Not-Detect-Undesired-Memory-Change-Bug/m-p/745409#M3568</guid>
      <dc:creator>iomega15</dc:creator>
      <dc:date>2010-04-05T22:33:22Z</dc:date>
    </item>
    <item>
      <title>Compiler Does Not Detect Undesired Memory Change Bug</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-Does-Not-Detect-Undesired-Memory-Change-Bug/m-p/745410#M3569</link>
      <description>also, can i protect this array somehow from being changed, after i've set its values (besides putting it outside of subroutine 1, which is not something that i want to do)?</description>
      <pubDate>Mon, 05 Apr 2010 22:43:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-Does-Not-Detect-Undesired-Memory-Change-Bug/m-p/745410#M3569</guid>
      <dc:creator>iomega15</dc:creator>
      <dc:date>2010-04-05T22:43:52Z</dc:date>
    </item>
    <item>
      <title>Compiler Does Not Detect Undesired Memory Change Bug</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-Does-Not-Detect-Undesired-Memory-Change-Bug/m-p/745411#M3570</link>
      <description>No, you cannot protect the array. Something has an address and is using that to stomp on your array. I am not familiar with debugging on Linux, but perhaps it offers the option to "watch" a memory location and notify you of where that location was changed.</description>
      <pubDate>Mon, 05 Apr 2010 22:51:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-Does-Not-Detect-Undesired-Memory-Change-Bug/m-p/745411#M3570</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2010-04-05T22:51:37Z</dc:date>
    </item>
    <item>
      <title>Compiler Does Not Detect Undesired Memory Change Bug</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-Does-Not-Detect-Undesired-Memory-Change-Bug/m-p/745412#M3571</link>
      <description>Yes, you can protect entire memory pages using the mprotect() call, see &lt;A href="http://linux.die.net/man/2/mprotect"&gt;http://linux.die.net/man/2/mprotect&lt;/A&gt;. You can set it up to generate a SIGSEGV if the specified pages are written to.&lt;BR /&gt;There is no granularity smaller then pages. So if you work with large arrays thiscan be a usable mechanism as large arrays (&amp;gt; 1MB)are usually allocated through mmap(). &lt;BR /&gt;&lt;BR /&gt;If you work with scalars then it's difficult unless you insert unused space such that each page contains a single scalar only. And don't forget to enforce mmap()allocation through mallopt(). You want to do all this only if you're _really_ desparate.&lt;BR /&gt;&lt;BR /&gt;Using watchpoints within a debugger might be the easier first choice. However watchpoints can awfully slow down your application. And there are huge differences w.r.t. the quality and functionality of the watchpointimplementation.Try totalview if it's available to you - Good luck !&lt;BR /&gt;&lt;BR /&gt;michael&lt;BR /&gt;</description>
      <pubDate>Tue, 06 Apr 2010 13:30:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-Does-Not-Detect-Undesired-Memory-Change-Bug/m-p/745412#M3571</guid>
      <dc:creator>mriedman</dc:creator>
      <dc:date>2010-04-06T13:30:15Z</dc:date>
    </item>
    <item>
      <title>Compiler Does Not Detect Undesired Memory Change Bug</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-Does-Not-Detect-Undesired-Memory-Change-Bug/m-p/745413#M3572</link>
      <description>Thanks. I have resolved the problem. &lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-family: monospace;"&gt;The problem was 
that three unrelated arrays were being returned to subroutine 1 from a 
completely unrelated subroutine, and their size did not agree with the 
size that they were declared with in subroutine
1. I found the offending subroutine by putting in write statements throughout subroutine 1 in order to monitor at which point the original array's value got changed.&lt;BR /&gt;

&lt;BR /&gt;I also found a 
subroutine to which the number of arguments passed did not agree with 
the number of arguments that it was expecting... the compilers did not 
pick this up either (I expected them to check things that are so basic!).... though this one was not the initial cause of the error, since this subroutine was not executed until I started to debug the code and trying different conditions&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Anyways, thanks for your help!</description>
      <pubDate>Wed, 07 Apr 2010 00:32:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-Does-Not-Detect-Undesired-Memory-Change-Bug/m-p/745413#M3572</guid>
      <dc:creator>iomega15</dc:creator>
      <dc:date>2010-04-07T00:32:23Z</dc:date>
    </item>
    <item>
      <title>Compiler Does Not Detect Undesired Memory Change Bug</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-Does-Not-Detect-Undesired-Memory-Change-Bug/m-p/745414#M3573</link>
      <description>I would have expected -warn interface to pick up the mismatch in number of arguments, but it might not depending on the order of compilatiion. Traditional Fortran with independent routines does not lend itself well to this sort of checking - if you had used modules then it would have been caught.</description>
      <pubDate>Wed, 07 Apr 2010 14:23:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Compiler-Does-Not-Detect-Undesired-Memory-Change-Bug/m-p/745414#M3573</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2010-04-07T14:23:35Z</dc:date>
    </item>
  </channel>
</rss>

