<?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: FORTRAN Debugger in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/fortran-debugger/m-p/3718014#M33387</link>
    <description>Right, but than you have to give expiclit boundaries in the calls top up2:&lt;BR /&gt;&lt;BR /&gt;CALL up2(1,a(i1:i2,1))&lt;BR /&gt;CALL up2(2,a(i1:i2,2))&lt;BR /&gt;&lt;BR /&gt;Also in this case the warning is gone.&lt;BR /&gt;But this is rather tricky since you are not allowed to assume that i1 and i2 are not changed during processing of up2. (which makes optimizing rather difficult, when the routines become more complicated than this example)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 30 Jan 2006 05:41:41 GMT</pubDate>
    <dc:creator>Jansen_8</dc:creator>
    <dc:date>2006-01-30T05:41:41Z</dc:date>
    <item>
      <title>FORTRAN Debugger</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/fortran-debugger/m-p/3718010#M33383</link>
      <description>OVMS 7.3-2, OVMS Alpha Debug64 Version V7.3-200, FORTRAN V8.0-104655-48F7C&lt;BR /&gt;&lt;BR /&gt;When compiling with /DEBUG/NOOPT/CHECK=ALL&lt;BR /&gt;I get&lt;BR /&gt;%FOR-W-DIAGNOSTIC, fort:(1): In call to UP2, an array temporary was created for argument #2&lt;BR /&gt;break on unhandled exception preceding SHARE$LIBRTL_CODE0+460948&lt;BR /&gt;&lt;BR /&gt;The 2. argument for up2 is column 1 and 2 of a matrix, so continues storage and both subroutines are interal procedures:&lt;BR /&gt;&lt;BR /&gt;      PROGRAM a&lt;BR /&gt;      IMPLICIT NONE&lt;BR /&gt;      INTEGER*4 i1,i2&lt;BR /&gt;      READ (5,*) i1,i2&lt;BR /&gt;      CALL up1&lt;BR /&gt;&lt;BR /&gt;      CONTAINS&lt;BR /&gt;&lt;BR /&gt;      SUBROUTINE up1&lt;BR /&gt;      INTEGER*4 :: a(i1:i2,2)&lt;BR /&gt;      PRINT *,'up1',shape(a),lbound(a),ubound(a)&lt;BR /&gt;      CALL up2(1,a(:,1))&lt;BR /&gt;      CALL up2(2,a(:,2))&lt;BR /&gt;      PRINT *,a&lt;BR /&gt;      END SUBROUTINE up1&lt;BR /&gt;&lt;BR /&gt;      SUBROUTINE up2(j,w)&lt;BR /&gt;      INTEGER*4, INTENT(IN) :: j&lt;BR /&gt;      INTEGER*4, INTENT(OUT) :: w(i1:i2)&lt;BR /&gt;      INTEGER*4 :: i&lt;BR /&gt;      PRINT *,'up2',shape(w),lbound(w),ubound(w)&lt;BR /&gt;      DO i = i1,i2&lt;BR /&gt;         w(i) = i*j&lt;BR /&gt;      END DO&lt;BR /&gt;      PRINT *,w&lt;BR /&gt;      END SUBROUTINE up2&lt;BR /&gt;&lt;BR /&gt;      END&lt;BR /&gt;&lt;BR /&gt;Input: i1=2, i2=4&lt;BR /&gt;&lt;BR /&gt;If I change the definition of w in up2 to&lt;BR /&gt;&lt;BR /&gt;INTEGER*4, INTENT(OUT) :: w(:)&lt;BR /&gt;&lt;BR /&gt;the bounds of w become 1 and 3 and the DO-loop will fail.&lt;BR /&gt;&lt;BR /&gt;Does the compiler generate a temporary array only when /DEBUG/NOOPT/CHECK=ALL or in all cases, even when compiling with&lt;BR /&gt;/NODEBUG/OPT/LEVEL=5?&lt;BR /&gt;How can  I get informed from the compiler to have generated temporay files?</description>
      <pubDate>Thu, 26 Jan 2006 10:54:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/fortran-debugger/m-p/3718010#M33383</guid>
      <dc:creator>Michael Menge</dc:creator>
      <dc:date>2006-01-26T10:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: FORTRAN Debugger</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/fortran-debugger/m-p/3718011#M33384</link>
      <description>Michael,&lt;BR /&gt;&lt;BR /&gt;I have Fortran V7.5-1961-48BCD on OVMS 7.3-1 and I tried your program.  I get the diagnostic at run-time only, but otherwise seem to have the same results as you.  I put in some calls to a subroutine to print the addresses of the arrays as seen by up1 and up2 and found that the temporary array is created with either&lt;BR /&gt;&lt;BR /&gt;/DEBUG/NOOPT/CHECK=ALL&lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;BR /&gt;/NODEBUG/OPT/LEVEL=5&lt;BR /&gt;&lt;BR /&gt;There was no temporary array when I used your &lt;BR /&gt;&lt;BR /&gt;INTEGER*4, INTENT(OUT) :: w(:)&lt;BR /&gt;&lt;BR /&gt;I don't know the impact of temporary arrays, but when I compile with&lt;BR /&gt;&lt;BR /&gt;/CHECK=(ALL,NOAR)&lt;BR /&gt;&lt;BR /&gt;then I at least do not see the diagnostic message.&lt;BR /&gt;&lt;BR /&gt;--Travis Craig</description>
      <pubDate>Thu, 26 Jan 2006 13:17:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/fortran-debugger/m-p/3718011#M33384</guid>
      <dc:creator>Travis Craig</dc:creator>
      <dc:date>2006-01-26T13:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: FORTRAN Debugger</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/fortran-debugger/m-p/3718012#M33385</link>
      <description>It is a warning for "inefficient" code.&lt;BR /&gt;The declartion of a in up2 can be better done&lt;BR /&gt;by an "allocatable" array (in fact what you &lt;BR /&gt;implicitly do. Change your code the the code below and the run-time warning is gone (at least on my VMS8.2 machine with the same compiler you use&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; PROGRAM a&lt;BR /&gt;IMPLICIT NONE&lt;BR /&gt;INTEGER*4 i1,i2&lt;BR /&gt;READ (5,*) i1,i2&lt;BR /&gt;CALL up1&lt;BR /&gt;&lt;BR /&gt;CONTAINS&lt;BR /&gt;&lt;BR /&gt;SUBROUTINE up1&lt;BR /&gt;INTEGER*4 , allocatable :: a(: , :)&lt;BR /&gt;allocate( a( i1:i2 , 2 ) )&lt;BR /&gt;PRINT *,'up1',shape(a),lbound(a),ubound(a)&lt;BR /&gt;CALL up2(1,a(:,1))&lt;BR /&gt;CALL up2(2,a(:,2))&lt;BR /&gt;PRINT *,a&lt;BR /&gt;END SUBROUTINE up1&lt;BR /&gt;&lt;BR /&gt;SUBROUTINE up2(j,w)&lt;BR /&gt;INTEGER*4, INTENT(IN) :: j&lt;BR /&gt;INTEGER*4, INTENT(OUT) :: w(i1:i2)&lt;BR /&gt;INTEGER*4 :: i&lt;BR /&gt;PRINT *,'up2',shape(w),lbound(w),ubound(w)&lt;BR /&gt;DO i = i1,i2&lt;BR /&gt;w(i) = i*j&lt;BR /&gt;END DO&lt;BR /&gt;PRINT *,w&lt;BR /&gt;END SUBROUTINE up2&lt;BR /&gt;&lt;BR /&gt;END&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 27 Jan 2006 04:24:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/fortran-debugger/m-p/3718012#M33385</guid>
      <dc:creator>Jansen_8</dc:creator>
      <dc:date>2006-01-27T04:24:20Z</dc:date>
    </item>
    <item>
      <title>Re: FORTRAN Debugger</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/fortran-debugger/m-p/3718013#M33386</link>
      <description>But why does the compiler handle an automatic and an allocatable array differently in this situation?&lt;BR /&gt;An automatic array has fixed boundaries throughout the live of subroutine up1 and could therefor better optimized than an allocatable array, the bounds of which could change during a subroutine call.&lt;BR /&gt;The allocate-statement would be extra in up1 whereas an automatic array gets storage from the stack. Another point is, that the columns of a are transfered by descriptor and why should an automatic array have other bounds than an allocatable?</description>
      <pubDate>Fri, 27 Jan 2006 07:25:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/fortran-debugger/m-p/3718013#M33386</guid>
      <dc:creator>Michael Menge</dc:creator>
      <dc:date>2006-01-27T07:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: FORTRAN Debugger</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/fortran-debugger/m-p/3718014#M33387</link>
      <description>Right, but than you have to give expiclit boundaries in the calls top up2:&lt;BR /&gt;&lt;BR /&gt;CALL up2(1,a(i1:i2,1))&lt;BR /&gt;CALL up2(2,a(i1:i2,2))&lt;BR /&gt;&lt;BR /&gt;Also in this case the warning is gone.&lt;BR /&gt;But this is rather tricky since you are not allowed to assume that i1 and i2 are not changed during processing of up2. (which makes optimizing rather difficult, when the routines become more complicated than this example)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 30 Jan 2006 05:41:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/fortran-debugger/m-p/3718014#M33387</guid>
      <dc:creator>Jansen_8</dc:creator>
      <dc:date>2006-01-30T05:41:41Z</dc:date>
    </item>
  </channel>
</rss>

