<?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 Quote:Adrian F. wrote: in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-use-another-module/m-p/929374#M87408</link>
    <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Adrian F. wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;To prevent duplication, I tried to let Module B USE module A.&amp;nbsp; However the link fails as the compiler compiles file B.F90 before A.F90 and therefore cannot find A.MOD.&amp;nbsp; Of course I could just link twice, but I don't want to do that.&amp;nbsp; Is there a better way to do this?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;The link step fails because one of the .OBJ files it needs is not present. That situation, in turn, is caused by the compiler's not finding a .MOD file that it needed in compiling B.F90.&lt;/P&gt;

&lt;P&gt;Linking twice will not solve the problem, because the problem is a compile-time problem.&lt;/P&gt;

&lt;P&gt;The basic rule to remember is that before the compiler encounters the program unit containing the USE statement&amp;nbsp;the corresponding .MOD file should have been created . How to go about enforcing the compilation order depends on whether you are using a makefile or the IDE.&lt;/P&gt;</description>
    <pubDate>Thu, 27 Feb 2014 14:05:00 GMT</pubDate>
    <dc:creator>mecej4</dc:creator>
    <dc:date>2014-02-27T14:05:00Z</dc:date>
    <item>
      <title>Module use another module?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-use-another-module/m-p/929373#M87407</link>
      <description>&lt;P&gt;I am consolidating parameter duplication in our code and have defined a parameter SDENW now in one module only, say module A.&amp;nbsp; However this variable exists in module B too (not just as a parameter definition, which I have removed, but also on the right hand side of other parameter definitions).&lt;/P&gt;

&lt;P&gt;To prevent duplication, I tried to let Module B USE module A.&amp;nbsp; However the link fails as the compiler compiles file B.F90 before A.F90 and therefore cannot find A.MOD.&amp;nbsp; Of course I could just link twice, but I don't want to do that.&amp;nbsp; Is there a better way to do this?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2014 13:55:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-use-another-module/m-p/929373#M87407</guid>
      <dc:creator>Adrian_F_1</dc:creator>
      <dc:date>2014-02-27T13:55:26Z</dc:date>
    </item>
    <item>
      <title>Quote:Adrian F. wrote:</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-use-another-module/m-p/929374#M87408</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Adrian F. wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;To prevent duplication, I tried to let Module B USE module A.&amp;nbsp; However the link fails as the compiler compiles file B.F90 before A.F90 and therefore cannot find A.MOD.&amp;nbsp; Of course I could just link twice, but I don't want to do that.&amp;nbsp; Is there a better way to do this?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;The link step fails because one of the .OBJ files it needs is not present. That situation, in turn, is caused by the compiler's not finding a .MOD file that it needed in compiling B.F90.&lt;/P&gt;

&lt;P&gt;Linking twice will not solve the problem, because the problem is a compile-time problem.&lt;/P&gt;

&lt;P&gt;The basic rule to remember is that before the compiler encounters the program unit containing the USE statement&amp;nbsp;the corresponding .MOD file should have been created . How to go about enforcing the compilation order depends on whether you are using a makefile or the IDE.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2014 14:05:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-use-another-module/m-p/929374#M87408</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2014-02-27T14:05:00Z</dc:date>
    </item>
    <item>
      <title>Quote:mecej4 wrote:</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-use-another-module/m-p/929375#M87409</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;mecej4 wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;The link step fails because one of the .OBJ files it needs is not present. That situation, in turn, is caused by the compiler's not finding a .MOD file that it needed in compiling B.F90.&lt;/P&gt;

&lt;P&gt;Linking twice will not solve the problem, because the problem is a compile-time problem.&lt;/P&gt;

&lt;P&gt;The basic rule to remember is that before the compiler encounters the program unit containing the USE statement&amp;nbsp;the corresponding .MOD file should have been created . How to go about enforcing the compilation order depends on whether you are using a makefile or the IDE.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;I am using Visual Studio 2010 with Intel Fortran Composer 13.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2014 14:33:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-use-another-module/m-p/929375#M87409</guid>
      <dc:creator>Adrian_F_1</dc:creator>
      <dc:date>2014-02-27T14:33:17Z</dc:date>
    </item>
    <item>
      <title>Quote:Adrian F. wrote:</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-use-another-module/m-p/929376#M87410</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Adrian F. wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;..&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;I am using Visual Studio 2010 with Intel Fortran Composer 13.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;So if you're using Visual Studio, then&amp;nbsp;most of the module dependency&amp;nbsp;stuff is automatically taken care of assuming you've configured your solution properly.&amp;nbsp; Have you looked at the Help Viewer in Visual Studio and reviewed Intel's Fortran guide and examples to make sure you're configuration is proper?&lt;/P&gt;

&lt;P&gt;Otherwise, you will need to&amp;nbsp;provide your Visual Studio configuration details, preferably a zip of your solution (sln file) and Fortran project(s) (vfproj file(s)) so someone can look and guide you.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2014 14:55:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-use-another-module/m-p/929376#M87410</guid>
      <dc:creator>FortranFan</dc:creator>
      <dc:date>2014-02-27T14:55:58Z</dc:date>
    </item>
    <item>
      <title>Quote:FortranFan wrote:</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-use-another-module/m-p/929377#M87411</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;FortranFan wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;So if you're using Visual Studio, then&amp;nbsp;most of the module dependency&amp;nbsp;stuff is automatically taken care of assuming you've configured your solution properly.&amp;nbsp; Have you looked at the Help Viewer in Visual Studio and reviewed Intel's Fortran guide and examples to make sure you're configuration is proper?&lt;/P&gt;

&lt;P&gt;Otherwise, you will need to&amp;nbsp;provide your Visual Studio configuration details, preferably a zip of your solution (sln file) and Fortran project(s) (vfproj file(s)) so someone can look and guide you.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;No problem, it works fine... I had misspelt the module name in the USE statement!&amp;nbsp; sorry.&amp;nbsp; It builds correctly.&amp;nbsp; Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2014 17:25:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Module-use-another-module/m-p/929377#M87411</guid>
      <dc:creator>Adrian_F_1</dc:creator>
      <dc:date>2014-02-27T17:25:38Z</dc:date>
    </item>
  </channel>
</rss>

