<?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 Problem with OPTIONAL in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-OPTIONAL/m-p/767558#M20922</link>
    <description>&lt;P&gt;c:\V55IVF64\sinda33\models&amp;gt;ifort test.f90&lt;/P&gt;&lt;P&gt;Intel Visual Fortran Intel 64 Compiler Professional for applications running on Intel 64, Version 11.1 Build 20100414 Package ID: w_cprof_p_11.1.065&lt;/P&gt;&lt;P&gt;Copyright (C) 1985-2010 Intel Corporation. All rights reserved.&lt;/P&gt;&lt;P&gt;Microsoft  Incremental Linker Version 9.00.30729.01&lt;/P&gt;&lt;P&gt;Copyright (C) Microsoft Corporation. All rights reserved.&lt;/P&gt;&lt;P&gt;-out:test.exe&lt;/P&gt;&lt;P&gt;-subsystem:console&lt;/P&gt;&lt;P&gt;test.obj&lt;/P&gt;&lt;P&gt;c:\V55IVF64\sinda33\models&amp;gt;test&lt;/P&gt;&lt;P&gt;the logical T&lt;/P&gt;&lt;P&gt;forrtl: severe (157): Program Exception - access violation&lt;/P&gt;&lt;P&gt;Image PC Routine Line Source&lt;/P&gt;&lt;P&gt;test.exe 000000014003D7A3 Unknown Unknown Unknown&lt;/P&gt;&lt;P&gt;test.exe 0000000140001D4B Unknown Unknown Unknown&lt;/P&gt;&lt;P&gt;test.exe 0000000140001154 Unknown Unknown Unknown&lt;/P&gt;&lt;P&gt;test.exe 000000014005670C Unknown Unknown Unknown&lt;/P&gt;&lt;P&gt;test.exe 000000014003CDAB Unknown Unknown Unknown&lt;/P&gt;&lt;P&gt;kernel32.dll 000000007725F33D Unknown Unknown Unknown&lt;/P&gt;&lt;P&gt;ntdll.dll 0000000077392CC1 Unknown Unknown Unknown&lt;/P&gt;</description>
    <pubDate>Tue, 03 Jan 2012 21:51:31 GMT</pubDate>
    <dc:creator>dajum</dc:creator>
    <dc:date>2012-01-03T21:51:31Z</dc:date>
    <item>
      <title>Problem with OPTIONAL</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-OPTIONAL/m-p/767552#M20916</link>
      <description>Can anyone tell me why the PRESENT function is returning TRUE for this even though there is no argument for the last 3 OPTIONAL arguments? I'm using 11.1.065, but seems the same in 12.1 as well.&lt;BR /&gt;&lt;BR /&gt;&lt;P&gt;Program test&lt;/P&gt;&lt;P&gt;integer m,nl(3)&lt;/P&gt;&lt;P&gt;Character*256 fname,modnam,arg2&lt;/P&gt;&lt;P&gt;arg2=' something'&lt;/P&gt;&lt;P&gt;modnam = 'all'&lt;/P&gt;&lt;P&gt;fname = 'test.me'&lt;/P&gt;&lt;P&gt;m = 1&lt;/P&gt;&lt;P&gt;nl(1)=2&lt;/P&gt;&lt;P&gt;call fluidic(m,arg2,fname,nl,modnam)&lt;/P&gt;&lt;P&gt;stop&lt;/P&gt;&lt;P&gt;end&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUBROUTINE FLUIDIC(MREC,NF,F1,N1,MODNAMIN,&lt;/P&gt;&lt;P&gt;x F2,N2,MODNAMIN2)&lt;/P&gt;&lt;P&gt;C&lt;/P&gt;&lt;P&gt;OPTIONAL F2&lt;/P&gt;&lt;P&gt;OPTIONAL N2&lt;/P&gt;&lt;P&gt;OPTIONAL MODNAMIN2&lt;/P&gt;&lt;P&gt;Character*32 F1(1),MODNAM,F2(1),MODNAM2&lt;/P&gt;&lt;P&gt;Character*(*) NF,MODNAMIN,MODNAMIN2&lt;/P&gt;&lt;P&gt;INTEGER N1(1),N2(1),MREC&lt;/P&gt;&lt;P&gt;LOGICAL DOPATHS&lt;/P&gt;&lt;P&gt;C&lt;/P&gt;&lt;P&gt;C&lt;/P&gt;&lt;P&gt;MODNAM = MODNAMIN(1:min(32,(3)))&lt;/P&gt;&lt;P&gt;DOPATHS = PRESENT(MODNAMIN2)&lt;/P&gt;&lt;P&gt;write(*,*)' the logical ',dopaths&lt;/P&gt;&lt;P&gt;IF( PRESENT(MODNAMIN2) ) THEN&lt;/P&gt;&lt;P&gt;MODNAM2 = MODNAMIN2(1:min(32,(3)))&lt;/P&gt;&lt;P&gt;DOPATHS = .TRUE.&lt;/P&gt;&lt;P&gt;ELSE&lt;/P&gt;&lt;P&gt;DOPATHS = .FALSE.&lt;/P&gt;&lt;P&gt;ENDIF&lt;/P&gt;&lt;P&gt;return&lt;/P&gt;&lt;P&gt;end&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Dave&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jan 2012 20:35:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-OPTIONAL/m-p/767552#M20916</guid>
      <dc:creator>dajum</dc:creator>
      <dc:date>2012-01-03T20:35:10Z</dc:date>
    </item>
    <item>
      <title>Problem with OPTIONAL</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-OPTIONAL/m-p/767553#M20917</link>
      <description>I get false.&lt;BR /&gt;&lt;BR /&gt;(after modifying it a bit for free format f90)&lt;BR /&gt;</description>
      <pubDate>Tue, 03 Jan 2012 20:42:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-OPTIONAL/m-p/767553#M20917</guid>
      <dc:creator>lklawrie</dc:creator>
      <dc:date>2012-01-03T20:42:06Z</dc:date>
    </item>
    <item>
      <title>Problem with OPTIONAL</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-OPTIONAL/m-p/767554#M20918</link>
      <description>I used a test.for file so I have fixed formating. I get TRUE. Every time. Maybe I will see if the formating makes a difference for me. Formatting didin't make a difference. f90 input still gets true.&lt;BR /&gt;</description>
      <pubDate>Tue, 03 Jan 2012 20:52:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-OPTIONAL/m-p/767554#M20918</guid>
      <dc:creator>dajum</dc:creator>
      <dc:date>2012-01-03T20:52:48Z</dc:date>
    </item>
    <item>
      <title>Problem with OPTIONAL</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-OPTIONAL/m-p/767555#M20919</link>
      <description>if it makes a difference i was using v12.&lt;BR /&gt;&lt;BR /&gt;attached here. added pause so that i could see results from inside the ide.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 03 Jan 2012 21:35:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-OPTIONAL/m-p/767555#M20919</guid>
      <dc:creator>lklawrie</dc:creator>
      <dc:date>2012-01-03T21:35:18Z</dc:date>
    </item>
    <item>
      <title>Problem with OPTIONAL</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-OPTIONAL/m-p/767556#M20920</link>
      <description>&lt;P&gt;I am getting false as well. I tried it with both 11.1.064 and 12.1 update 8. &lt;/P&gt;&lt;P&gt;What compiler flags are you using?&lt;/P&gt;&lt;P&gt;Annalee&lt;/P&gt;&lt;P&gt;Intel Developer Support&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jan 2012 21:45:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-OPTIONAL/m-p/767556#M20920</guid>
      <dc:creator>Anonymous66</dc:creator>
      <dc:date>2012-01-03T21:45:25Z</dc:date>
    </item>
    <item>
      <title>Problem with OPTIONAL</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-OPTIONAL/m-p/767557#M20921</link>
      <description>No flags. just "ifort test.f90" or "test.for" for the fixed source version. Both give F and crash for me. &lt;BR /&gt;&lt;BR /&gt;Dave</description>
      <pubDate>Tue, 03 Jan 2012 21:50:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-OPTIONAL/m-p/767557#M20921</guid>
      <dc:creator>dajum</dc:creator>
      <dc:date>2012-01-03T21:50:00Z</dc:date>
    </item>
    <item>
      <title>Problem with OPTIONAL</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-OPTIONAL/m-p/767558#M20922</link>
      <description>&lt;P&gt;c:\V55IVF64\sinda33\models&amp;gt;ifort test.f90&lt;/P&gt;&lt;P&gt;Intel Visual Fortran Intel 64 Compiler Professional for applications running on Intel 64, Version 11.1 Build 20100414 Package ID: w_cprof_p_11.1.065&lt;/P&gt;&lt;P&gt;Copyright (C) 1985-2010 Intel Corporation. All rights reserved.&lt;/P&gt;&lt;P&gt;Microsoft  Incremental Linker Version 9.00.30729.01&lt;/P&gt;&lt;P&gt;Copyright (C) Microsoft Corporation. All rights reserved.&lt;/P&gt;&lt;P&gt;-out:test.exe&lt;/P&gt;&lt;P&gt;-subsystem:console&lt;/P&gt;&lt;P&gt;test.obj&lt;/P&gt;&lt;P&gt;c:\V55IVF64\sinda33\models&amp;gt;test&lt;/P&gt;&lt;P&gt;the logical T&lt;/P&gt;&lt;P&gt;forrtl: severe (157): Program Exception - access violation&lt;/P&gt;&lt;P&gt;Image PC Routine Line Source&lt;/P&gt;&lt;P&gt;test.exe 000000014003D7A3 Unknown Unknown Unknown&lt;/P&gt;&lt;P&gt;test.exe 0000000140001D4B Unknown Unknown Unknown&lt;/P&gt;&lt;P&gt;test.exe 0000000140001154 Unknown Unknown Unknown&lt;/P&gt;&lt;P&gt;test.exe 000000014005670C Unknown Unknown Unknown&lt;/P&gt;&lt;P&gt;test.exe 000000014003CDAB Unknown Unknown Unknown&lt;/P&gt;&lt;P&gt;kernel32.dll 000000007725F33D Unknown Unknown Unknown&lt;/P&gt;&lt;P&gt;ntdll.dll 0000000077392CC1 Unknown Unknown Unknown&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jan 2012 21:51:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-OPTIONAL/m-p/767558#M20922</guid>
      <dc:creator>dajum</dc:creator>
      <dc:date>2012-01-03T21:51:31Z</dc:date>
    </item>
    <item>
      <title>Problem with OPTIONAL</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-OPTIONAL/m-p/767559#M20923</link>
      <description>An explicit interface is required here. Read &lt;A href="http://software.intel.com/en-us/forums/showpost.php?p=12903"&gt;this&lt;/A&gt;.</description>
      <pubDate>Tue, 03 Jan 2012 21:56:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-OPTIONAL/m-p/767559#M20923</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2012-01-03T21:56:53Z</dc:date>
    </item>
    <item>
      <title>Problem with OPTIONAL</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-OPTIONAL/m-p/767560#M20924</link>
      <description>Thanks! I missed that in the examples. But now it works fine for me.&lt;BR /&gt;&lt;BR /&gt;Dave</description>
      <pubDate>Tue, 03 Jan 2012 22:04:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-OPTIONAL/m-p/767560#M20924</guid>
      <dc:creator>dajum</dc:creator>
      <dc:date>2012-01-03T22:04:52Z</dc:date>
    </item>
    <item>
      <title>Problem with OPTIONAL</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-OPTIONAL/m-p/767561#M20925</link>
      <description>And worked for me because I have it generate interfaces in the debug compile (or it does it by default):&lt;BR /&gt;&lt;BR /&gt;!COMPILER-GENERATED INTERFACE MODULE: Tue Jan 03 13:41:12 2012&lt;BR /&gt; MODULE FLUIDIC__genmod&lt;BR /&gt; INTERFACE &lt;BR /&gt; SUBROUTINE FLUIDIC(MREC,NF,F1,N1,MODNAMIN,F2,N2,MODNAMIN2)&lt;BR /&gt; INTEGER(KIND=4) :: MREC&lt;BR /&gt; CHARACTER(*) :: NF&lt;BR /&gt; CHARACTER(LEN=32) :: F1(1)&lt;BR /&gt; INTEGER(KIND=4) :: N1(1)&lt;BR /&gt; CHARACTER(*) :: MODNAMIN&lt;BR /&gt; CHARACTER(LEN=32) ,OPTIONAL :: F2(1)&lt;BR /&gt; INTEGER(KIND=4) ,OPTIONAL :: N2(1)&lt;BR /&gt; CHARACTER(*) ,OPTIONAL :: MODNAMIN2&lt;BR /&gt; END SUBROUTINE FLUIDIC&lt;BR /&gt; END INTERFACE &lt;BR /&gt; END MODULE FLUIDIC__genmod&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 04 Jan 2012 14:43:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-OPTIONAL/m-p/767561#M20925</guid>
      <dc:creator>lklawrie</dc:creator>
      <dc:date>2012-01-04T14:43:59Z</dc:date>
    </item>
    <item>
      <title>Problem with OPTIONAL</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-OPTIONAL/m-p/767562#M20926</link>
      <description>Generated interfaces are not (supposed to be) used as a substitute for a required explicit interface - they are for diagnostic purposes only. However, we have had bugs in the past where the compiler went ahead and used the generated interface to change the code, and it looks like this is another one. I will report it to the developers.&lt;BR /&gt;</description>
      <pubDate>Wed, 04 Jan 2012 15:35:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-OPTIONAL/m-p/767562#M20926</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2012-01-04T15:35:47Z</dc:date>
    </item>
    <item>
      <title>Problem with OPTIONAL</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-OPTIONAL/m-p/767563#M20927</link>
      <description>The interface would not be necessary if the subroutine was "contained" in the program. Correct? Then it becomes part of that module?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 04 Jan 2012 15:55:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-OPTIONAL/m-p/767563#M20927</guid>
      <dc:creator>lklawrie</dc:creator>
      <dc:date>2012-01-04T15:55:28Z</dc:date>
    </item>
    <item>
      <title>Problem with OPTIONAL</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-OPTIONAL/m-p/767564#M20928</link>
      <description>Correct. If the subroutine were in a module or was contained in the calling program, that would create the explicit interface. My general advice is that if you feel you have to write an INTERFACE block for Fortran code, you're doing it wrong, though I can appreciate that there are circumstances, such as updating old code, where this might be reasonable.</description>
      <pubDate>Wed, 04 Jan 2012 16:17:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-OPTIONAL/m-p/767564#M20928</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2012-01-04T16:17:26Z</dc:date>
    </item>
    <item>
      <title>Problem with OPTIONAL</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-OPTIONAL/m-p/767565#M20929</link>
      <description>In general, I agree with that statement:&lt;BR /&gt;&lt;BR /&gt;"My general advice is that if you feel you have to write an INTERFACE 
block for Fortran code, you're doing it wrong, though I can appreciate 
that there are circumstances, such as updating old code, where this 
might be reasonable."&lt;BR /&gt;&lt;BR /&gt;I do like the ability to have a generic routine that in actuality spawns to other specific routines based on argument type.&lt;BR /&gt;</description>
      <pubDate>Wed, 04 Jan 2012 16:24:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-OPTIONAL/m-p/767565#M20929</guid>
      <dc:creator>lklawrie</dc:creator>
      <dc:date>2012-01-04T16:24:07Z</dc:date>
    </item>
    <item>
      <title>Problem with OPTIONAL</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-OPTIONAL/m-p/767566#M20930</link>
      <description>Generic interfaces are fine. It's when you write a specific interface that declares all the arguments, duplicating the declarations in the actuasl routine, where you can make trouble for yourself.</description>
      <pubDate>Wed, 04 Jan 2012 16:31:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-OPTIONAL/m-p/767566#M20930</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2012-01-04T16:31:29Z</dc:date>
    </item>
    <item>
      <title>Problem with OPTIONAL</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-OPTIONAL/m-p/767567#M20931</link>
      <description>I'd like to know if there is a better way to do this, but I'm not sure I follow what you are suggesting. This routine is in a library that get called and linked by the users. So the main program and the code calling it can't contain it it. Is there some way besides an interface spec to do this?</description>
      <pubDate>Wed, 04 Jan 2012 16:47:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-OPTIONAL/m-p/767567#M20931</guid>
      <dc:creator>dajum</dc:creator>
      <dc:date>2012-01-04T16:47:38Z</dc:date>
    </item>
    <item>
      <title>Problem with OPTIONAL</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-OPTIONAL/m-p/767568#M20932</link>
      <description>The better way is to put the subroutines in a module. Supply the users with the .mod and the .lib. The .mod provides the declarations and makes sure the routines are always called correctly.</description>
      <pubDate>Wed, 04 Jan 2012 19:11:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-OPTIONAL/m-p/767568#M20932</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2012-01-04T19:11:08Z</dc:date>
    </item>
    <item>
      <title>Problem with OPTIONAL</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-OPTIONAL/m-p/767569#M20933</link>
      <description>The reported problem has been fixed for a release later this year.</description>
      <pubDate>Mon, 12 Mar 2012 16:00:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problem-with-OPTIONAL/m-p/767569#M20933</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2012-03-12T16:00:11Z</dc:date>
    </item>
  </channel>
</rss>

