<?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 question with my arguments and compilers in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/question-with-my-arguments-and-compilers/m-p/895093#M79389</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I have come into a problem with the arguments and the compiler. When I call subroutine B in subroutine A and pass the arguments, there are always some errors like below. But if I copy the code and paste in a new project, everything is fine. I am using the IVF version 10, which is the trial version. And when I use the version 9 to compile the code, there is no error. I don't understand what's the problem. How can two compilers have different results and creating a new project can eliminate the errors?&lt;BR /&gt;&lt;BR /&gt;Error: The type of the actual argument differs from the type of the dummy argument&lt;BR /&gt;Error: The shape matching rules of actual arguments and dummy arguments have been violated. &lt;X&gt;&lt;BR /&gt;Error: If the actual argument is scalar, the corresponding dummy argument shall be scalar unless the actual argument is an element of an array that is not an assumed-shape or pointer array, or a substring of such an element. &lt;W&gt;&lt;BR /&gt;&lt;/W&gt;&lt;/X&gt;</description>
    <pubDate>Fri, 29 Aug 2008 04:43:38 GMT</pubDate>
    <dc:creator>carlos8410</dc:creator>
    <dc:date>2008-08-29T04:43:38Z</dc:date>
    <item>
      <title>question with my arguments and compilers</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/question-with-my-arguments-and-compilers/m-p/895093#M79389</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I have come into a problem with the arguments and the compiler. When I call subroutine B in subroutine A and pass the arguments, there are always some errors like below. But if I copy the code and paste in a new project, everything is fine. I am using the IVF version 10, which is the trial version. And when I use the version 9 to compile the code, there is no error. I don't understand what's the problem. How can two compilers have different results and creating a new project can eliminate the errors?&lt;BR /&gt;&lt;BR /&gt;Error: The type of the actual argument differs from the type of the dummy argument&lt;BR /&gt;Error: The shape matching rules of actual arguments and dummy arguments have been violated. &lt;X&gt;&lt;BR /&gt;Error: If the actual argument is scalar, the corresponding dummy argument shall be scalar unless the actual argument is an element of an array that is not an assumed-shape or pointer array, or a substring of such an element. &lt;W&gt;&lt;BR /&gt;&lt;/W&gt;&lt;/X&gt;</description>
      <pubDate>Fri, 29 Aug 2008 04:43:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/question-with-my-arguments-and-compilers/m-p/895093#M79389</guid>
      <dc:creator>carlos8410</dc:creator>
      <dc:date>2008-08-29T04:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: question with my arguments and compilers</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/question-with-my-arguments-and-compilers/m-p/895094#M79390</link>
      <description>Carlos,&lt;BR /&gt;If you can post the actual lines of code, I could tell you exactly what is wromg. However, it is clear that you have one or two errors here, something like:&lt;BR /&gt;Program Main&lt;BR /&gt;Real :: X&lt;BR /&gt;Call Sub (X)&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;Subroutine Sub(X)&lt;BR /&gt;Real :: X(2)&lt;BR /&gt;or even &lt;BR /&gt;Integer :: X(2)&lt;BR /&gt;&lt;BR /&gt;The first error - difference is type is where the type in the calling program (i.e. real in my example) is different from in the subroutine (e.g. integer).&lt;BR /&gt;the second &amp;amp; third error messages are where the calling argument is a scalar (e.g. X in my main program) and the subroutine is expecting an array, e.g. X(2)&lt;BR /&gt;&lt;BR /&gt;Hope this helps, if not post some code.&lt;BR /&gt;&lt;BR /&gt;David&lt;BR /&gt;</description>
      <pubDate>Fri, 29 Aug 2008 11:31:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/question-with-my-arguments-and-compilers/m-p/895094#M79390</guid>
      <dc:creator>DavidWhite</dc:creator>
      <dc:date>2008-08-29T11:31:02Z</dc:date>
    </item>
    <item>
      <title>Re: question with my arguments and compilers</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/question-with-my-arguments-and-compilers/m-p/895095#M79391</link>
      <description>The reason you do not see these errors in version 9 is that version 10 enables "generated interface checking" by default for new projects - this feature was new in version 9.1 but was not on by default. See David's reply for good advice.&lt;BR /&gt;</description>
      <pubDate>Fri, 29 Aug 2008 13:24:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/question-with-my-arguments-and-compilers/m-p/895095#M79391</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2008-08-29T13:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: question with my arguments and compilers</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/question-with-my-arguments-and-compilers/m-p/895096#M79392</link>
      <description>Hi, Steve and David&lt;BR /&gt;&lt;BR /&gt;Thank you for your suggestion.&lt;BR /&gt;I check the previous post and I think I get your point.&lt;BR /&gt;So after I change the arguments, I delete all the mod in debug folder and compiler the code. And no error happens. &lt;BR /&gt;I guess there would be no error happen if I deleter all the old mod after I change the arguments and then compiler.&lt;BR /&gt;&lt;BR /&gt;Below is my code, the original code is too large to post here, so I just copy the definition part and skip the other part. I&lt;BR /&gt;don't know if there is any error hidden in it. &lt;BR /&gt;&lt;BR /&gt;************************************************************&lt;BR /&gt;SUBROUTINE SUB_A (N,NPT,X,RHOBEG, ... ,XPT,W)&lt;BR /&gt; &lt;BR /&gt; IMPLICIT REAL*8 (A-H,O-Z)&lt;BR /&gt; DIMENSION X(*),XPT(NPT,*),W(*)&lt;BR /&gt; ...&lt;BR /&gt; CALL ITERATION (N,NPT,RHOENDX, ... ,W,XPT)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;SUBROUTINE ITERATION (N,NPT,RHOENDX, ... ,W,XPT)&lt;BR /&gt; IMPLICIT REAL*8 (A-H,O-Z)&lt;BR /&gt; DIMENSION X(*),W(*),XPT(NPT,*)&lt;BR /&gt; ...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 29 Aug 2008 14:54:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/question-with-my-arguments-and-compilers/m-p/895096#M79392</guid>
      <dc:creator>carlos8410</dc:creator>
      <dc:date>2008-08-29T14:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: question with my arguments and compilers</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/question-with-my-arguments-and-compilers/m-p/895097#M79393</link>
      <description>Yes, there can be a problem if you compile your sources, edit them so that the arguments to a routine change, and then do a "build". In some cases, the generated module for the old version of your routines will not be updated and you can get these errors. A Rebuild will fix that or delete all the .mod files.&lt;BR /&gt;</description>
      <pubDate>Fri, 29 Aug 2008 15:28:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/question-with-my-arguments-and-compilers/m-p/895097#M79393</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2008-08-29T15:28:31Z</dc:date>
    </item>
  </channel>
</rss>

