<?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 Fortran modules in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Fortran-modules/m-p/770932#M22560</link>
    <description>hello&lt;BR /&gt;&lt;BR /&gt;Your modules are nested. Module_1 refers to Module_2 and needs it to be compiled and Module_2 refers to Module_1 and also needs it to be compiled. So it cannot be compiled.&lt;BR /&gt;&lt;BR /&gt;You can define your 2 types mod_1_type and mod_2_type in a new "module_type" for example and refer to it in module1 and module_2.&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 16 Aug 2011 07:46:52 GMT</pubDate>
    <dc:creator>GVautier</dc:creator>
    <dc:date>2011-08-16T07:46:52Z</dc:date>
    <item>
      <title>Fortran modules</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Fortran-modules/m-p/770931#M22559</link>
      <description>I wrote the following piece of code.&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;[bash]module module_1
   implicit none

   type :: mod_1_type
      integer(4) :: a = 10
   end type mod_1_type
   
   contains
      
   subroutine sub_mod1 (t1, t2)
     use module_2

     type (mod_1_type), intent(inout) :: t1
     type (mod_2_type), intent(inout) :: t2

     call sub_mod2 (t1, t2)        
    
   end subroutine sub_mod1

end module module_1

module module_2
   implicit none
  
   type :: mod_2_type
      integer(4) :: a = 20
   end type mod_2_type
  
   contains
   
   subroutine sub_mod2 (t1, t2)
      use module_1

      type (mod_1_type), intent(inout) :: t1
      type (mod_2_type), intent(inout) :: t2
     
   end subroutine sub_mod2
  
end module module_2

program prog
   use module_1
   use module_2
  
   type (mod_1_type) :: t1
   type (mod_2_type) :: t2
  
   call sub_mod1 (t1, t2)
    
end program prog

[/bash]&lt;/PRE&gt; &lt;BR /&gt;I can't get the code to compile (Intel Visual Fortran Compiler XE 12.0.5.221). Any helpful comments would be appreciated.&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Aug 2011 07:20:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Fortran-modules/m-p/770931#M22559</guid>
      <dc:creator>franzw82</dc:creator>
      <dc:date>2011-08-16T07:20:30Z</dc:date>
    </item>
    <item>
      <title>Fortran modules</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Fortran-modules/m-p/770932#M22560</link>
      <description>hello&lt;BR /&gt;&lt;BR /&gt;Your modules are nested. Module_1 refers to Module_2 and needs it to be compiled and Module_2 refers to Module_1 and also needs it to be compiled. So it cannot be compiled.&lt;BR /&gt;&lt;BR /&gt;You can define your 2 types mod_1_type and mod_2_type in a new "module_type" for example and refer to it in module1 and module_2.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Aug 2011 07:46:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Fortran-modules/m-p/770932#M22560</guid>
      <dc:creator>GVautier</dc:creator>
      <dc:date>2011-08-16T07:46:52Z</dc:date>
    </item>
  </channel>
</rss>

