<?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 Great, thanks for the follow in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Bounds-remapping-error-on-derived-type-component/m-p/1019200#M107765</link>
    <description>&lt;P&gt;Great, thanks for the follow-up Steve.&lt;/P&gt;</description>
    <pubDate>Tue, 21 Jul 2015 17:56:32 GMT</pubDate>
    <dc:creator>Wukie__Nathan</dc:creator>
    <dc:date>2015-07-21T17:56:32Z</dc:date>
    <item>
      <title>Bounds remapping error on derived type component</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Bounds-remapping-error-on-derived-type-component/m-p/1019197#M107762</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;I am experiencing what appears to be incorrect behavior when attempting to remap the bounds of an array within a derived type. Given an allocatable array of components(elements), within a 'mesh' type, I am trying to remap the rank-1 'elems' array within a 'mesh' type to a rank-3 view. Unfortunately I have not yet had luck trying to produce a minimum working example so the following code is just to convey the concept here.&lt;/SPAN&gt;&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;type :: element_t
   integer :: ielem
end type

type :: mesh_t
  type(element_t), allocatable :: elems(:)
end type

type :: domain_t
 type(mesh_t) :: mesh
end type&lt;/PRE&gt;

&lt;P&gt;I encounter the behavior in a situation like the following, where I have a domain%mesh%elems component that I would like to remap as a matrix:&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;type(domain_t)           :: domain
type(element_t), pointer :: elems_m(:,:,:)

% Domain is initialized with 2 elements

elems_m(1:2,1:1,1:1) =&amp;gt; domain%mesh%elems(1:2)&lt;/PRE&gt;

&lt;P&gt;&lt;BR /&gt;
	When I access the elements of elems_m(1,1,1) and elems_m(2,1,1), they both point to domain%mesh%elems(1).&lt;BR /&gt;
	&lt;BR /&gt;
	I am using ifort 15.0.3 on OS X. I have observed gfortran 4.9.2 produces the expected results of elems_m(1,1,1) =&amp;gt; elems(1) and elems_m(2,1,1) =&amp;gt; elems(2).&lt;BR /&gt;
	&lt;BR /&gt;
	I did find a work around via an entry on&amp;nbsp;&lt;A href="https://wiki.ucar.edu/display/ccsm/Fortran+Compiler+Bug+List"&gt;https://wiki.ucar.edu/display/ccsm/Fortran+Compiler+Bug+List&lt;/A&gt;&amp;nbsp;with regards to the NAG compiler. In the workaround, I first create a temporary rank-1 pointer and associate it with the rank-1 derived-type component. I then remap the bounds using the temporary pointer as follows:&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;type(domain_t)           :: domain
type(element_t), pointer :: elems_m(:,:,:)
type(element_t), pointer :: temp(:)

% Initialize domain%mesh with 2 elements

temp =&amp;gt; domain%mesh%elems

elems_m(1:2,1:1,1:1) =&amp;gt; temp(1:2)&lt;/PRE&gt;

&lt;P&gt;Now, accessing the components of elems_m produces the expected results as elems_m(1,1,1) =&amp;gt; elems(1) and elems_m(2,1,1) =&amp;gt; elems(2)&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2015 01:30:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Bounds-remapping-error-on-derived-type-component/m-p/1019197#M107762</guid>
      <dc:creator>Wukie__Nathan</dc:creator>
      <dc:date>2015-07-21T01:30:38Z</dc:date>
    </item>
    <item>
      <title>Thanks, I'll see if I can</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Bounds-remapping-error-on-derived-type-component/m-p/1019198#M107763</link>
      <description>&lt;P&gt;Thanks, I'll see if I can take your snippets and construct a reproducer.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2015 15:26:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Bounds-remapping-error-on-derived-type-component/m-p/1019198#M107763</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2015-07-21T15:26:55Z</dc:date>
    </item>
    <item>
      <title>I was able to reproduce the</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Bounds-remapping-error-on-derived-type-component/m-p/1019199#M107764</link>
      <description>&lt;P&gt;I was able to reproduce the problem in 15.0.4, but not in 16.0. The 16.0 compiler will be released in August.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2015 17:39:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Bounds-remapping-error-on-derived-type-component/m-p/1019199#M107764</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2015-07-21T17:39:48Z</dc:date>
    </item>
    <item>
      <title>Great, thanks for the follow</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Bounds-remapping-error-on-derived-type-component/m-p/1019200#M107765</link>
      <description>&lt;P&gt;Great, thanks for the follow-up Steve.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2015 17:56:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Bounds-remapping-error-on-derived-type-component/m-p/1019200#M107765</guid>
      <dc:creator>Wukie__Nathan</dc:creator>
      <dc:date>2015-07-21T17:56:32Z</dc:date>
    </item>
  </channel>
</rss>

