<?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 Initialization of large derived types in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Initialization-of-large-derived-types/m-p/969301#M96685</link>
    <description>&lt;P&gt;I am working on porting some code from CVF to IVF and I am running into a problem initializing some derived types. I have a subroutine that is executed inside a loop. The subroutine has a local variable of a type I have defined. In my type definition I have initialized every field to 0, but when the subroutine is executed in the loop I don't get a reinitialized local variable like I would've in CVF. It looks like this is the effect of the /Qsave compiler option. I've done some reading and&amp;nbsp;various sources seem to indicate that intializing a variable in its type definition should override the /Qsave option, but I'm not seeing this. Is there a reason why? Is there a way to quickly reinitialize the variable? It's a very big structure&amp;nbsp;so it would take hundreds of lines to reassign everything to zero. I should note that the /Qzero option has no&amp;nbsp;affect here.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Mar 2013 15:32:56 GMT</pubDate>
    <dc:creator>Aaron_S_1</dc:creator>
    <dc:date>2013-03-12T15:32:56Z</dc:date>
    <item>
      <title>Initialization of large derived types</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Initialization-of-large-derived-types/m-p/969301#M96685</link>
      <description>&lt;P&gt;I am working on porting some code from CVF to IVF and I am running into a problem initializing some derived types. I have a subroutine that is executed inside a loop. The subroutine has a local variable of a type I have defined. In my type definition I have initialized every field to 0, but when the subroutine is executed in the loop I don't get a reinitialized local variable like I would've in CVF. It looks like this is the effect of the /Qsave compiler option. I've done some reading and&amp;nbsp;various sources seem to indicate that intializing a variable in its type definition should override the /Qsave option, but I'm not seeing this. Is there a reason why? Is there a way to quickly reinitialize the variable? It's a very big structure&amp;nbsp;so it would take hundreds of lines to reassign everything to zero. I should note that the /Qzero option has no&amp;nbsp;affect here.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2013 15:32:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Initialization-of-large-derived-types/m-p/969301#M96685</guid>
      <dc:creator>Aaron_S_1</dc:creator>
      <dc:date>2013-03-12T15:32:56Z</dc:date>
    </item>
    <item>
      <title>You could avoid the /Qsave</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Initialization-of-large-derived-types/m-p/969302#M96686</link>
      <description>&lt;P&gt;You could avoid the /Qsave from affecting your local derived type variable by making it an allocatable scaler. Each time you enter, allocate it, then deallocate on exit. Or perhaps overiding by the automatic attribute is simpler&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2013 17:21:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Initialization-of-large-derived-types/m-p/969302#M96686</guid>
      <dc:creator>Andrew_Smith</dc:creator>
      <dc:date>2013-03-12T17:21:00Z</dc:date>
    </item>
    <item>
      <title>(In the absence of some other</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Initialization-of-large-derived-types/m-p/969303#M96687</link>
      <description>&lt;P&gt;(In the absence of some other unspecified specification the behaviour of /Qsave looks like it is being consistent with the documentation.)&lt;/P&gt;
&lt;P&gt;Or... if you have default initialised every field to zero inside the type definition then you could also assign to the variable to manually initialise it.&lt;/P&gt;
&lt;P&gt;[fortran]TYPE(my_type) :: my_var&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;my_var = my_type()[/fortran]&lt;/P&gt;
&lt;P&gt;Whatever the solution, putting reasonable effort in to getting rid of the need for /Qsave would be pretty high on my list too.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2013 18:57:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Initialization-of-large-derived-types/m-p/969303#M96687</guid>
      <dc:creator>IanH</dc:creator>
      <dc:date>2013-03-12T18:57:00Z</dc:date>
    </item>
    <item>
      <title>This is exactly what I was</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Initialization-of-large-derived-types/m-p/969304#M96688</link>
      <description>&lt;P&gt;This is exactly what I was looking for. For whatever reason my internet searches didn't turn up anything like this. Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2013 19:21:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Initialization-of-large-derived-types/m-p/969304#M96688</guid>
      <dc:creator>Aaron_S_1</dc:creator>
      <dc:date>2013-03-12T19:21:23Z</dc:date>
    </item>
    <item>
      <title>Depending on what is in your</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Initialization-of-large-derived-types/m-p/969305#M96689</link>
      <description>&lt;P&gt;Depending on what is in your my_type, you may consider creating a SAVEed default variable that is initialized on first entry into subroutine&amp;nbsp;then used to copy into your working type.&lt;/P&gt;
&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2013 21:05:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Initialization-of-large-derived-types/m-p/969305#M96689</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2013-03-12T21:05:00Z</dc:date>
    </item>
  </channel>
</rss>

