<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Another static verification question in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Another-static-verification-question/m-p/860612#M68984</link>
    <description>Creating the issue now. Will provide entire project. Thanks</description>
    <pubDate>Thu, 24 Jan 2008 20:22:53 GMT</pubDate>
    <dc:creator>Intel_C_Intel</dc:creator>
    <dc:date>2008-01-24T20:22:53Z</dc:date>
    <item>
      <title>Another static verification question</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Another-static-verification-question/m-p/860606#M68978</link>
      <description>&lt;P&gt;I'm using the Intel Fortran compiler 10.1.011 [IA32] and just found out about the static verification capability. This was very good news to me as we were struggling to find the source of a small problem that caused very bad results. Static verification helped to very quickly find the cause of this issue. We have about 42000 lines of code and there still many errors from the static verification that I'd like to handle better. Unfortunately, I find no information explainingthe error messages much less information on how to resolve them. One of the most perplexing messages is: error #12292: [SV] "&lt;ALLOCATABLE variable=""&gt;" has wrong value for deallocation. I have these variables initially declared, then allocated to the appropriate size and at the end of the routine, I have a standard deallocate statement to release the memory, shown below:&lt;/ALLOCATABLE&gt;&lt;/P&gt;&lt;FONT color="#ff0000" size="2"&gt;
&lt;P dir="ltr" align="left"&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;B&gt;&lt;FONT color="#0000ff" size="2"&gt;DEALLOCATE&lt;/FONT&gt;&lt;/B&gt;&lt;FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; (U1,U2,WLX1,WLX2,&lt;/FONT&gt;&lt;FONT size="2"&gt;V1,V2,WLY1,WLY2)&lt;/FONT&gt;&lt;P&gt;&lt;/P&gt;
&lt;P dir="ltr" align="left"&gt;&lt;B&gt;&lt;FONT color="#0000ff" size="2"&gt;RETURN&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;&lt;FONT color="#ff0000" size="2"&gt;
&lt;P dir="ltr" align="left"&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;B&gt;&lt;FONT color="#0000ff" size="2"&gt;END SUBROUTINE&lt;/FONT&gt;&lt;/B&gt;&lt;FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; BC_CARD&lt;/FONT&gt;&lt;P&gt;&lt;/P&gt;
&lt;P dir="ltr" align="left"&gt;&lt;FONT size="2"&gt;&lt;FONT size="3"&gt;I get 8 error messages from the &lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;&lt;FONT color="#0000ff"&gt;DEALLOCATE&lt;/FONT&gt;&lt;/STRONG&gt; &lt;/FONT&gt;&lt;FONT size="3"&gt;statement and then 8 more from the &lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;&lt;FONT color="#0000ff"&gt;END SUBROUTINE&lt;/FONT&gt;&lt;/STRONG&gt; &lt;/FONT&gt;&lt;FONT size="3"&gt;line and I understand none of the reasons why. It doesn't affect all of the variables in my &lt;FONT size="2"&gt;DEALLOCATE&lt;/FONT&gt; statements, just some. Any ideas? &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P dir="ltr" align="left"&gt;&lt;FONT size="2"&gt;&lt;FONT size="3"&gt;Thanks, Mitchell Brown&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2008 15:20:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Another-static-verification-question/m-p/860606#M68978</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2008-01-24T15:20:37Z</dc:date>
    </item>
    <item>
      <title>Re: Another static verification question</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Another-static-verification-question/m-p/860607#M68979</link>
      <description>&lt;P&gt;I prefer to allocate and deallocate arrays individually. When deallocating I first check that ithasan allocatedstatus :&lt;BR /&gt;&lt;BR /&gt; if (allocated(array)) deallocate(array, stat=ierr)&lt;BR /&gt; do some test/message with ierr not equal zero&lt;BR /&gt;&lt;BR /&gt;also I tend to deallocate in reverse order to the original allocation (LIFO). I don't know if this is really necessary but it is a habit I got into early on. (Originally because someone suggested it improved garbage collection.)&lt;/P&gt;
&lt;P&gt;Then if an error occurs onan array I know which one and ierr gives the error code.&lt;BR /&gt;Finally if the allocation/deallocation are done in the same routine you could safely remove the deallocate because the arrays are automagically deallocated when they go out of scope.&lt;/P&gt;
&lt;P&gt;Les&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2008 16:49:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Another-static-verification-question/m-p/860607#M68979</guid>
      <dc:creator>Les_Neilson</dc:creator>
      <dc:date>2008-01-24T16:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: Another static verification question</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Another-static-verification-question/m-p/860608#M68980</link>
      <description>Can you show a short but complete routine that demonstrates the problem with SV? I have seen some "false alarms" with SV but not this one in particular. The messages from the end of the routine are likely due to automatic deallocation of local allocatable variables and may be incorrect too.&lt;BR /&gt;</description>
      <pubDate>Thu, 24 Jan 2008 17:26:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Another-static-verification-question/m-p/860608#M68980</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2008-01-24T17:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: Another static verification question</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Another-static-verification-question/m-p/860609#M68981</link>
      <description>&lt;P&gt;Mitchell,&lt;/P&gt;
&lt;P&gt;If you are not using IMPLICIT NONE it is possible that you are deallocating GNW (God know what). Generally, the allocatable arrays are inside a module, but in conversion of old code to new code you may have some of these arrays or dangling DIMENSIONs laying around. A third thing is if you have samed named arrays in different modules and youuse the wrong module name in one or the other places.&lt;/P&gt;
&lt;P&gt;As another poster suggested do the deallocations one at a time and conditionally.&lt;/P&gt;
&lt;P&gt;if(allocated(D1)) deallocate(D1)&lt;BR /&gt;...&lt;/P&gt;
&lt;P&gt;You may also want to insert some diagnostic code (enabled by a conditional) that asserts that the arrays to be returned are indeed allocated (as opposed to conditionally deallocating them). &lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2008 18:56:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Another-static-verification-question/m-p/860609#M68981</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2008-01-24T18:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: Another static verification question</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Another-static-verification-question/m-p/860610#M68982</link>
      <description>&lt;P&gt;See below for short, though not complete subroutine. Each of the routines having difficulty that I have gotten to so far are fairly complex. If you want the routine intact, I would prefer to send directly to you. I will attempt to allocate and deallocate separately as recommended by user above.&lt;/P&gt;
&lt;P&gt;&lt;FONT size="1"&gt; &lt;/FONT&gt;&lt;FONT size="2"&gt;SUBROUTINE BC_CARD(ICONT, HOUR, HOTFIL, DT)&lt;BR /&gt; ... (USE MODULES not displayed)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt; IMPLICIT NONE&lt;BR /&gt; ... (VARIABLE DECS not displayed)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt; REAL,ALLOCATABLE :: U1(:),U2(:),WLX1(:),WLX2(:)&lt;BR /&gt; REAL,ALLOCATABLE :: V1(:),V2(:),WLY1(:),WLY2(:)&lt;BR /&gt; &lt;BR /&gt; ALLOCATE (U1(L1),U2(L1),WLX1(L1),WLX2(L1))&lt;BR /&gt; ALLOCATE (V1(M1),V2(M1),WLY1(M1),WLY2(M1))&lt;BR /&gt; &lt;BR /&gt; IF(ICONT == 1) THEN&lt;BR /&gt; ... (portion not displayed)&lt;BR /&gt; CALL XF_READ_SCALAR_VALUES_TIMESTEP (UID1,TIMINC,L1,U1,ERROR)&lt;BR /&gt; CALL XF_READ_SCALAR_VALUES_TIMESTEP (UID2,TIMINC,L1,U2,ERROR)&lt;BR /&gt; CALL XF_READ_SCALAR_VALUES_TIMESTEP (VID1,TIMINC,M1,V1,ERROR)&lt;BR /&gt; CALL XF_READ_SCALAR_VALUES_TIMESTEP (VID2,TIMINC,M1,V2,ERROR)&lt;BR /&gt; CALL XF_READ_SCALAR_VALUES_TIMESTEP (WLXID1,TIMINC,L1,WLX1,ERROR)&lt;BR /&gt; CALL XF_READ_SCALAR_VALUES_TIMESTEP (WLXID2,TIMINC,L1,WLX2,ERROR)&lt;BR /&gt; CALL XF_READ_SCALAR_VALUES_TIMESTEP (WLYID1,TIMINC,M1,WLY1,ERROR)&lt;BR /&gt; CALL XF_READ_SCALAR_VALUES_TIMESTEP (WLYID2,TIMINC,M1,WLY2,ERROR) &lt;BR /&gt; ELSE &lt;BR /&gt; ... (portion not displayed)&lt;BR /&gt; CALL XF_WRITE_SCALAR_TIMESTEP (UID1,HOUR,L1,U1,ERROR)&lt;BR /&gt; CALL XF_WRITE_SCALAR_TIMESTEP (UID2,HOUR,L1,U2,ERROR)&lt;BR /&gt; CALL XF_WRITE_SCALAR_TIMESTEP (VID1,HOUR,M1,V1,ERROR)&lt;BR /&gt; CALL XF_WRITE_SCALAR_TIMESTEP (VID2,HOUR,M1,V2,ERROR)&lt;BR /&gt; CALL XF_WRITE_SCALAR_TIMESTEP (WLXID1,HOUR,L1,WLX1,ERROR)&lt;BR /&gt; CALL XF_WRITE_SCALAR_TIMESTEP (WLXID2,HOUR,L1,WLX2,ERROR)&lt;BR /&gt; CALL XF_WRITE_SCALAR_TIMESTEP (WLYID1,HOUR,M1,WLY1,ERROR)&lt;BR /&gt; CALL XF_WRITE_SCALAR_TIMESTEP (WLYID2,HOUR,M1,WLY2,ERROR)&lt;BR /&gt; ENDIF&lt;BR /&gt; ... (portion not displayed)&lt;BR /&gt; DEALLOCATE (U1,U2,WLX1,WLX2)&lt;BR /&gt; DEALLOCATE (V1,V2,WLY1,WLY2)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt; RETURN&lt;BR /&gt; END SUBROUTINE BC_CARD&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2008 19:34:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Another-static-verification-question/m-p/860610#M68982</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2008-01-24T19:34:08Z</dc:date>
    </item>
    <item>
      <title>Re: Another static verification question</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Another-static-verification-question/m-p/860611#M68983</link>
      <description>Please create an issue at Intel Premier Support, attach the complete source and ask that it be assigned to Steve Lionel.&lt;BR /&gt;</description>
      <pubDate>Thu, 24 Jan 2008 20:13:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Another-static-verification-question/m-p/860611#M68983</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2008-01-24T20:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: Another static verification question</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Another-static-verification-question/m-p/860612#M68984</link>
      <description>Creating the issue now. Will provide entire project. Thanks</description>
      <pubDate>Thu, 24 Jan 2008 20:22:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Another-static-verification-question/m-p/860612#M68984</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2008-01-24T20:22:53Z</dc:date>
    </item>
    <item>
      <title>Re: Another static verification question</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Another-static-verification-question/m-p/860613#M68985</link>
      <description>&lt;P&gt;Mitchell,&lt;/P&gt;
&lt;P&gt;Some suggestions while you are waiting&lt;/P&gt;
&lt;P&gt;Insert&lt;/P&gt;
&lt;P&gt;100 CONTINUE(appropriately numbered CONTINUE)&lt;/P&gt;
&lt;P&gt;In front of the 1st DEALLOCATE&lt;/P&gt;
&lt;P&gt;Place a GOTO 100 after the last ALLOCATE (goes to the first DEALLOCATE)&lt;/P&gt;
&lt;P&gt;Compile and run with Break Point at END SUBROUTINE.(Or simply place break point on IF(ICONT == 1) then use Set Next Statement to resume at the first DEALLOCATE.)&lt;/P&gt;
&lt;P&gt;See what happens.&lt;/P&gt;
&lt;P&gt;If the deallocations occure without complaint then move the GOTO 100 further down into the code (e.g. infron of the 1st CALL XF_..., both paths) and see if the deallocation complains.&lt;/P&gt;
&lt;P&gt;Keep moving the GOTO 100 downwards. You can go in leaps leaving comment trails in the code. &lt;/P&gt;
&lt;P&gt;The technique should identify where in the code that the array descriptors are getting clobbered.&lt;/P&gt;
&lt;P&gt;Jim Dempsey&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jan 2008 00:31:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Another-static-verification-question/m-p/860613#M68985</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2008-01-25T00:31:25Z</dc:date>
    </item>
  </channel>
</rss>

