<?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 I'll look at it when I can in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/coarray-problem-with-allocatable-array-and-derived-types/m-p/1012246#M106295</link>
    <description>&lt;P&gt;I'll look at it when I can find the time.&amp;nbsp; In future please log a new forum issue for something new.&amp;nbsp; We can only attach one developer problem report to a given thread, and DPD200366587 is attached to this one.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Patrick&lt;/P&gt;</description>
    <pubDate>Thu, 19 Feb 2015 12:39:19 GMT</pubDate>
    <dc:creator>pbkenned1</dc:creator>
    <dc:date>2015-02-19T12:39:19Z</dc:date>
    <item>
      <title>coarray problem with allocatable array and derived types</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/coarray-problem-with-allocatable-array-and-derived-types/m-p/1012241#M106290</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I added some code which either segfaults or prints the wrong result (ifort 15.0.2, Intel MPI 4.1.3.049). It should work, as far as I understand the standard, so I'm assuming that it's a compiler bug.&lt;/P&gt;

&lt;P&gt;Any help is appreciated,&lt;BR /&gt;
	&lt;BR /&gt;
	John&lt;/P&gt;</description>
      <pubDate>Tue, 17 Feb 2015 12:43:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/coarray-problem-with-allocatable-array-and-derived-types/m-p/1012241#M106290</guid>
      <dc:creator>John_D_6</dc:creator>
      <dc:date>2015-02-17T12:43:19Z</dc:date>
    </item>
    <item>
      <title>Looks like a straight bug. </title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/coarray-problem-with-allocatable-array-and-derived-types/m-p/1012242#M106291</link>
      <description>&lt;P&gt;Looks like a straight bug.&amp;nbsp; Let me investigate a bit more and then I'll report to the developers.&lt;/P&gt;

&lt;P&gt;Patrick&lt;/P&gt;</description>
      <pubDate>Tue, 17 Feb 2015 17:05:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/coarray-problem-with-allocatable-array-and-derived-types/m-p/1012242#M106291</guid>
      <dc:creator>pbkenned1</dc:creator>
      <dc:date>2015-02-17T17:05:15Z</dc:date>
    </item>
    <item>
      <title>The problems have been</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/coarray-problem-with-allocatable-array-and-derived-types/m-p/1012243#M106292</link>
      <description>&lt;P&gt;The problems have been reported to the developers.&amp;nbsp; I'll keep this thread updated with any news.&lt;/P&gt;

&lt;P&gt;Internal tracking ID: DPD200366587&lt;/P&gt;

&lt;P&gt;Patrick&lt;/P&gt;</description>
      <pubDate>Tue, 17 Feb 2015 21:28:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/coarray-problem-with-allocatable-array-and-derived-types/m-p/1012243#M106292</guid>
      <dc:creator>pbkenned1</dc:creator>
      <dc:date>2015-02-17T21:28:44Z</dc:date>
    </item>
    <item>
      <title>Hi Patrick,</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/coarray-problem-with-allocatable-array-and-derived-types/m-p/1012244#M106293</link>
      <description>&lt;P&gt;Hi Patrick,&lt;/P&gt;

&lt;P&gt;thanks for picking this up.&lt;/P&gt;

&lt;P&gt;I have a slightly different, but maybe related, problem when copying derived types:&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;program coarraybug
implicit none

  type b
    real,allocatable,dimension(:) :: c
  end type

  type(b),codimension&lt;LI&gt; :: v
  integer image

  image=this_image()
  allocate(v%c(2))
  v%c=image
  print*,'image,v=',image,v
  sync all
  if (image.eq.2) then
    v=v[1]
    print*,'v=',v
  endif

end
&lt;/LI&gt;&lt;/PRE&gt;

&lt;P&gt;this program segfaults when trying to copy the coarray of derived type with an allocatable inside.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Feb 2015 12:44:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/coarray-problem-with-allocatable-array-and-derived-types/m-p/1012244#M106293</guid>
      <dc:creator>John_D_6</dc:creator>
      <dc:date>2015-02-18T12:44:22Z</dc:date>
    </item>
    <item>
      <title>Hi,</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/coarray-problem-with-allocatable-array-and-derived-types/m-p/1012245#M106294</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;could I get a confirmation that the second example is also being looked at? Otherwise, I'll create a new forum topic.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Feb 2015 06:54:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/coarray-problem-with-allocatable-array-and-derived-types/m-p/1012245#M106294</guid>
      <dc:creator>John_D_6</dc:creator>
      <dc:date>2015-02-19T06:54:32Z</dc:date>
    </item>
    <item>
      <title>I'll look at it when I can</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/coarray-problem-with-allocatable-array-and-derived-types/m-p/1012246#M106295</link>
      <description>&lt;P&gt;I'll look at it when I can find the time.&amp;nbsp; In future please log a new forum issue for something new.&amp;nbsp; We can only attach one developer problem report to a given thread, and DPD200366587 is attached to this one.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Patrick&lt;/P&gt;</description>
      <pubDate>Thu, 19 Feb 2015 12:39:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/coarray-problem-with-allocatable-array-and-derived-types/m-p/1012246#M106295</guid>
      <dc:creator>pbkenned1</dc:creator>
      <dc:date>2015-02-19T12:39:19Z</dc:date>
    </item>
    <item>
      <title>Hi Patrick,</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/coarray-problem-with-allocatable-array-and-derived-types/m-p/1012247#M106296</link>
      <description>&lt;P&gt;Hi Patrick,&lt;/P&gt;

&lt;P&gt;thanks for your reply. I'll create a new topic next time.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Feb 2015 14:28:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/coarray-problem-with-allocatable-array-and-derived-types/m-p/1012247#M106296</guid>
      <dc:creator>John_D_6</dc:creator>
      <dc:date>2015-02-19T14:28:56Z</dc:date>
    </item>
    <item>
      <title>Hi John,</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/coarray-problem-with-allocatable-array-and-derived-types/m-p/1012248#M106297</link>
      <description>&lt;P&gt;Hi John,&lt;/P&gt;

&lt;P&gt;Thanks for your understanding.&amp;nbsp; By keeping a one-to-one correspondence between forum threads and developer problem reports, it's much easier for us to properly track and resolve issues.&amp;nbsp; Otherwise, new issues reported in old threads can get lost, might not be noticed, etc.&amp;nbsp; That said, it's just our bookkeeping issue and we do appreciate bug reports, however reported.&lt;/P&gt;

&lt;P&gt;I couldn't reproduce the access violation on Windows, but the image 2 copy of image 1 data is incorrect, so I reported this new bug to the developers as well (internal tracking ID DPD200366692).&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Patrick&lt;/P&gt;

&lt;P&gt;C:\ISN_Forums\U541619\Problem2&amp;gt;ifort -Qcoarray bug2.f90 -traceback&lt;BR /&gt;
	Intel(R) Visual Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 15.0.2.179 Build 20150121&lt;BR /&gt;
	Copyright (C) 1985-2015 Intel Corporation.&amp;nbsp; All rights reserved.&lt;/P&gt;

&lt;P&gt;Microsoft (R) Incremental Linker Version 12.00.21005.1&lt;BR /&gt;
	Copyright (C) Microsoft Corporation.&amp;nbsp; All rights reserved.&lt;/P&gt;

&lt;P&gt;-out:bug2.exe&lt;BR /&gt;
	-subsystem:console&lt;BR /&gt;
	-incremental:no&lt;BR /&gt;
	bug2.obj&lt;/P&gt;

&lt;P&gt;C:\ISN_Forums\U541619\Problem2&amp;gt;bug2.exe&lt;BR /&gt;
	&amp;nbsp;image,v=&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp; 2.000000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.000000&lt;BR /&gt;
	&amp;nbsp;v=&amp;nbsp; 0.0000000E+00&amp;nbsp; 0.0000000E+00&lt;BR /&gt;
	&amp;nbsp;image,v=&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp; 1.000000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.000000&lt;BR /&gt;
	&amp;nbsp;image,v=&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp; 3.000000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3.000000&lt;BR /&gt;
	&amp;nbsp;image,v=&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp; 4.000000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.000000&lt;/P&gt;</description>
      <pubDate>Thu, 19 Feb 2015 15:04:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/coarray-problem-with-allocatable-array-and-derived-types/m-p/1012248#M106297</guid>
      <dc:creator>pbkenned1</dc:creator>
      <dc:date>2015-02-19T15:04:00Z</dc:date>
    </item>
    <item>
      <title>The original problem reported</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/coarray-problem-with-allocatable-array-and-derived-types/m-p/1012249#M106298</link>
      <description>&lt;P&gt;The original problem reported (test case bug.f90, internal tracking ID DPD200366587) exposed two problems -- one is a compiler defect, the other a user error.&amp;nbsp; Consider this code snippet from bug.f90:&lt;/P&gt;

&lt;P&gt;&amp;nbsp; image=this_image()&lt;/P&gt;

&lt;P&gt;! if the array is allocated on both images, the result is incorrect&lt;BR /&gt;
	!&amp;nbsp; allocate(CacheFields%lli%lon_deg(10))&lt;BR /&gt;
	&amp;nbsp; if (image.eq.1) then&lt;BR /&gt;
	! if the array is only allocated on image 1, the code crashes&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; allocate(CacheFields%lli%lon_deg(10))&lt;/P&gt;

&lt;P&gt;Notice that the first allocate() is commented out.&amp;nbsp; If you uncomment it, indeed the image 2 result is incorrect:&lt;/P&gt;

&lt;P&gt;[U541619]$ ./bug.f90-ifort.x&lt;BR /&gt;
	&amp;nbsp;CacheFields%lli%lon_deg(1)=&amp;nbsp; -177.0000&lt;BR /&gt;
	&amp;nbsp;CacheFields[1]%lli%lon_deg(1)=&amp;nbsp; -177.0000&lt;BR /&gt;
	&amp;nbsp; allocated(CacheFields%lli%lon_deg) was TRUE&lt;BR /&gt;
	&amp;nbsp;&lt;STRONG&gt; this is image 2&lt;/STRONG&gt;&lt;BR /&gt;
	&amp;nbsp;CacheFields[1]%lli%lon_deg(1)=&amp;nbsp;&amp;nbsp; 98.00000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; should be -177.0000&lt;BR /&gt;
	[U541619]$&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;

&lt;P&gt;This is the compiler defect, and the developers have targeted the fix for the 16.0 compiler.&lt;/P&gt;

&lt;P&gt;The user error relates to this sub-snippet:&lt;/P&gt;

&lt;P&gt;&amp;nbsp;if (image.eq.1) then&lt;BR /&gt;
	! if the array is only allocated on image 1, the code crashes&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; allocate(CacheFields%lli%lon_deg(10))&lt;/P&gt;

&lt;P&gt;The is illegal - if an allocate is done of a coarray in one image, it must be done the same way in all images.&lt;/P&gt;

&lt;P&gt;Per the F2008 standard, section 6.7.1.2, paragraph 4:&lt;/P&gt;

&lt;P&gt;'When an ALLOCATE statement is executed for which an allocate-object is a coarray, there is an implicit synchronization of all images. On each image, execution of the segment (8.5.2) following the statement is delayed until all other images have executed the same statement the same number of times.'&lt;/P&gt;

&lt;P&gt;Patrick&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 May 2015 19:01:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/coarray-problem-with-allocatable-array-and-derived-types/m-p/1012249#M106298</guid>
      <dc:creator>pbkenned1</dc:creator>
      <dc:date>2015-05-22T19:01:06Z</dc:date>
    </item>
    <item>
      <title>Hi Patrick,</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/coarray-problem-with-allocatable-array-and-derived-types/m-p/1012250#M106299</link>
      <description>&lt;P&gt;Hi Patrick,&lt;/P&gt;

&lt;P&gt;it's excellent to hear that this will be fixed in release 16.&lt;/P&gt;

&lt;P&gt;About the user error: I think that the code is correct. I'm not allocating a coarray, but I'm allocating an allocatable component of a derived type coarray. That should be possible independently on every image (and I expect without synchronization), even with varying sizes per image. I can't find an explicit mention of this in the standard, but note 6.18 in section 6.7.1.1 seems to come close. Of course, the Fortran standard is long and quite terse..&lt;/P&gt;</description>
      <pubDate>Fri, 22 May 2015 20:40:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/coarray-problem-with-allocatable-array-and-derived-types/m-p/1012250#M106299</guid>
      <dc:creator>John_D_6</dc:creator>
      <dc:date>2015-05-22T20:40:00Z</dc:date>
    </item>
    <item>
      <title>The defect reported via</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/coarray-problem-with-allocatable-array-and-derived-types/m-p/1012251#M106300</link>
      <description>&lt;P&gt;The defect reported via DPD200366587 is now fixed in the 16.0 compiler, so I am closing this ticket now.&amp;nbsp; Sorry I don't have any feedback from the developers regarding your claim there is no coding error.&amp;nbsp; The F'2008 spec. is a bit fuzzy here.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Patrick&lt;/P&gt;

&lt;P&gt;[U541619]$ ifort -V&lt;/P&gt;

&lt;P&gt;Intel(R) Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 16.0.0.109 Build 20150815&lt;BR /&gt;
	Copyright (C) 1985-2015 Intel Corporation.&amp;nbsp; All rights reserved.&lt;/P&gt;

&lt;P&gt;[U541619]$ ifort -fpp -coarray -coarray-num-images=2 bug.f90 -o bug.f90-ifort.x&lt;BR /&gt;
	[U541619]$ ./bug.f90-ifort.x&lt;BR /&gt;
	&amp;nbsp;CacheFields%lli%lon_deg(1)=&amp;nbsp; -177.0000&lt;BR /&gt;
	&amp;nbsp;CacheFields[1]%lli%lon_deg(1)=&amp;nbsp; -177.0000&lt;BR /&gt;
	&amp;nbsp; allocated(CacheFields%lli%lon_deg) was TRUE&lt;BR /&gt;
	&amp;nbsp; this is image 2&lt;BR /&gt;
	&amp;nbsp;CacheFields[1]%lli%lon_deg(1)=&amp;nbsp; -177.0000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; should be -177.0000&lt;BR /&gt;
	[U541619]$&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2015 16:44:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/coarray-problem-with-allocatable-array-and-derived-types/m-p/1012251#M106300</guid>
      <dc:creator>pbkenned1</dc:creator>
      <dc:date>2015-10-27T16:44:29Z</dc:date>
    </item>
  </channel>
</rss>

