<?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 Size of huge allocatable array in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Size-of-huge-allocatable-array/m-p/757719#M13206</link>
    <description>May I attach the "z" elements from 1 up to Nmax during the calculation? resizing//increasing the allocatable array in order to save the memory.&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I am performing my calculation in 64-bit OS.&lt;/DIV&gt;</description>
    <pubDate>Tue, 13 Sep 2011 21:13:05 GMT</pubDate>
    <dc:creator>oleglebedev</dc:creator>
    <dc:date>2011-09-13T21:13:05Z</dc:date>
    <item>
      <title>Size of huge allocatable array</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Size-of-huge-allocatable-array/m-p/757717#M13204</link>
      <description>Hello!&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I would like to find out a size of memory which is assigned by a huge allocatable array. Every ellements of my array has a derived type like the following:&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;I&gt;&lt;B&gt;type :: my_type&lt;/B&gt;&lt;/I&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;I&gt;&lt;B&gt; double precision, dimension(:,:), allocatable :: z&lt;/B&gt;&lt;/I&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;I&gt;&lt;B&gt;end typemy_type&lt;/B&gt;&lt;/I&gt;&lt;/DIV&gt;&lt;DIV&gt;...&lt;/DIV&gt;&lt;DIV&gt;In the code I allocate&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;I&gt;&lt;B&gt;allocate( array(1:Nmax) )&lt;/B&gt;&lt;/I&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;I&gt;&lt;B&gt;do i = 1, Nmax&lt;/B&gt;&lt;/I&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;I&gt;&lt;B&gt; allocate( array(i)%z(1:arrayMax, 1:3) )&lt;/B&gt;&lt;/I&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;I&gt;&lt;B&gt;end do&lt;/B&gt;&lt;/I&gt;&lt;/DIV&gt;&lt;DIV&gt;Nmax and arrayMax are approx. equal to 17000 and 10000 respectivly. And so I warry about work station. How much Mb will I use performing this?Is there any intrinsict function estimating it?&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Oleg.&lt;/DIV&gt;</description>
      <pubDate>Tue, 13 Sep 2011 19:49:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Size-of-huge-allocatable-array/m-p/757717#M13204</guid>
      <dc:creator>oleglebedev</dc:creator>
      <dc:date>2011-09-13T19:49:20Z</dc:date>
    </item>
    <item>
      <title>Size of huge allocatable array</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Size-of-huge-allocatable-array/m-p/757718#M13205</link>
      <description>Each "z" element will have 30000 elements of 8-byte reals, or 240,000 bytes. In addition, there is the array descriptor for each z which will be something like 48 bytes. So, 17000 * 240,048 = about 4GB. You will need a 64-bit OS to allocate this much data.</description>
      <pubDate>Tue, 13 Sep 2011 20:57:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Size-of-huge-allocatable-array/m-p/757718#M13205</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2011-09-13T20:57:07Z</dc:date>
    </item>
    <item>
      <title>Size of huge allocatable array</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Size-of-huge-allocatable-array/m-p/757719#M13206</link>
      <description>May I attach the "z" elements from 1 up to Nmax during the calculation? resizing//increasing the allocatable array in order to save the memory.&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I am performing my calculation in 64-bit OS.&lt;/DIV&gt;</description>
      <pubDate>Tue, 13 Sep 2011 21:13:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Size-of-huge-allocatable-array/m-p/757719#M13206</guid>
      <dc:creator>oleglebedev</dc:creator>
      <dc:date>2011-09-13T21:13:05Z</dc:date>
    </item>
    <item>
      <title>Size of huge allocatable array</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Size-of-huge-allocatable-array/m-p/757720#M13207</link>
      <description>I am not sure I understand the question. You don't have to allocate all the z elements at once. However, there is no real support for "resizing" an allocatable array. You can do it with a three-step process:&lt;BR /&gt;&lt;BR /&gt;1. Allocate a new array to the desired size&lt;BR /&gt;2. Copy the elements from old to new&lt;BR /&gt;3. Use MOVE_ALLOC to "transfer" the allocation of the new array back to the old.&lt;BR /&gt;&lt;BR /&gt;Note that for a while you will have twice the memory allocated.</description>
      <pubDate>Tue, 13 Sep 2011 21:16:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Size-of-huge-allocatable-array/m-p/757720#M13207</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2011-09-13T21:16:57Z</dc:date>
    </item>
    <item>
      <title>Size of huge allocatable array</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Size-of-huge-allocatable-array/m-p/757721#M13208</link>
      <description>Thank you! I thought this way, too.&lt;DIV&gt;&lt;SPAN style="font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;DIV&gt;You note is important. Finaly, I will use more than 4 Gb (from 4 to 8 Gb after the half point of a calculation).&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 13 Sep 2011 21:34:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Size-of-huge-allocatable-array/m-p/757721#M13208</guid>
      <dc:creator>oleglebedev</dc:creator>
      <dc:date>2011-09-13T21:34:34Z</dc:date>
    </item>
    <item>
      <title>Size of huge allocatable array</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Size-of-huge-allocatable-array/m-p/757722#M13209</link>
      <description>In case of using selected_real_kind will the size of element change from 8-byte?</description>
      <pubDate>Wed, 14 Sep 2011 07:43:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Size-of-huge-allocatable-array/m-p/757722#M13209</guid>
      <dc:creator>oleglebedev</dc:creator>
      <dc:date>2011-09-14T07:43:20Z</dc:date>
    </item>
    <item>
      <title>Size of huge allocatable array</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Size-of-huge-allocatable-array/m-p/757723#M13210</link>
      <description>That depends on the parameters you supply to selected_real_kind. If precision and exponent range are small enough for a IEEE 754 single precision real, you will only need 4 bytes per real.</description>
      <pubDate>Wed, 14 Sep 2011 08:30:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Size-of-huge-allocatable-array/m-p/757723#M13210</guid>
      <dc:creator>tom_p</dc:creator>
      <dc:date>2011-09-14T08:30:41Z</dc:date>
    </item>
    <item>
      <title>Size of huge allocatable array</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Size-of-huge-allocatable-array/m-p/757724#M13211</link>
      <description>Be aware of the distinction between virtual and physical memory. When a chunk of memory is newly allocated that does not mean that it is instantlymapped to physical memory. That will only happen when you start writing toit.&lt;BR /&gt;So if your array is sparse, e.g. with large unused and uninitialized sections, then it will use less physical memory than you expect. With other words: It is legal to allocate more thanthe physical memory knowing that not all of it will be used. In that case you just have to avoid initializing the whole thing. In that case your workstation will freeze.</description>
      <pubDate>Thu, 15 Sep 2011 10:02:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Size-of-huge-allocatable-array/m-p/757724#M13211</guid>
      <dc:creator>mriedman</dc:creator>
      <dc:date>2011-09-15T10:02:47Z</dc:date>
    </item>
  </channel>
</rss>

