<?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 Re: Internal Compiler Error: Co-Array array and openMP offload map(to:) in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Internal-Compiler-Error-Co-Array-array-and-openMP-offload-map-to/m-p/1704888#M176404</link>
    <description>&lt;P&gt;bug ID is CMPLRLLVM-69232&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 22 Jul 2025 21:08:27 GMT</pubDate>
    <dc:creator>Ron_Green</dc:creator>
    <dc:date>2025-07-22T21:08:27Z</dc:date>
    <item>
      <title>Internal Compiler Error: Co-Array array and openMP offload map(to:)</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Internal-Compiler-Error-Co-Array-array-and-openMP-offload-map-to/m-p/1704173#M176351</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm getting an internal compiler error trying to compile some openMP Offload + co-array fortran code.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; error #5623: **Internal compiler error: internal abort**&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Specifically this comes when I try to copy the data across using a 'target data map(to:)' pragma. Below is a minimal example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="fortran"&gt;Program propgen_rewrite
  implicit none
  integer, parameter :: SP = kind(1.0)     !! Single precision scalars.
  integer, parameter :: DC = kind((1.0D0, 1.0D0)) !! Double precision complex scalars.
  ! gauge field
  integer, parameter :: ip4 = 32768
  integer, parameter :: n4 = 8
  complex(kind=dc), dimension(:,:,:,:,:), codimension[:], allocatable :: s ! ICE
  !complex(kind=dc), dimension(:,:,:,:,:), allocatable :: s ! Works
  integer, codimension[*] :: number, iseed
  real(kind=sp), codimension[*] :: beta
  ! counters
  integer :: n, i, j, mu, ls
  allocate(s(ip4, 3, 3, 4, n4)[*]) ! ICE
  ! allocate(s(ip4,3,3,4,n4)) ! Works
  read(40) (((((s(n, i, j, mu, ls), n = 1, ip4), i = 1, 3), j = 1, 3), mu = 1, 4), ls = 1, n4)
  read(40) number, beta, iseed
  !$omp target data map(to: s)
  write(*,*) 'done'
  !$omp end target data

END PROGRAM propgen_rewrite&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;This was tested with the compilation command:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="bash"&gt;ifx -g -O0 -traceback -qopenmp -coarray=shared -coarray-num-images=1 -fopenmp-offload-mandatory -fopenmp-targets=spir64 minimalExample.f90&lt;/LI-CODE&gt;&lt;P&gt;I tested using&lt;/P&gt;&lt;P&gt;ifx (IFX) 2025.1.1 20250418 with the above error:&lt;/P&gt;&lt;P&gt;ifx (IFX) 2024.2.0 20240602 and ifx (IFX) 2023.2.0 20230622 give the error&amp;nbsp;error "#5633: **Internal compiler error: segmentation violation signal raised**" instead.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The system has a&amp;nbsp;Intel(R) Xeon(R) Platinum 8480+ CPU and two&amp;nbsp;Intel(R) Data Center GPU Max 1100 (not that this is truly relevant as it is a compiler error).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not entirely sure this is the right place to post/inform the compiler team of this, but it's where I could find.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not entirely sure of the 'correct' behaviour. My desired behaviour would be for each co-array image to copy the data that it has across. (I am compiling with only 1 image though as you can see).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know if there's anything else I should do instead.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Ryan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jul 2025 15:23:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Internal-Compiler-Error-Co-Array-array-and-openMP-offload-map-to/m-p/1704173#M176351</guid>
      <dc:creator>RJaBi</dc:creator>
      <dc:date>2025-07-18T15:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Compiler Error: Co-Array array and openMP offload map(to:)</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Internal-Compiler-Error-Co-Array-array-and-openMP-offload-map-to/m-p/1704865#M176402</link>
      <description>&lt;P&gt;While this example is conformant Fortran, the use of Coarray objects in offload regions is highly discouraged.&amp;nbsp; I think you know why this should be avoided. And I understand what target systems may be more amenable to this usage and why in your perspective you would like Intel to support this usage.&amp;nbsp; Or perhaps you are comparing various multi-vendor offload implementations for a paper on CAF and it's use in GPU enabled environments.&amp;nbsp; I am not sure your intent for this example.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Still, a compiler should not ICE if code is conformant.&amp;nbsp; I can open a bug report.&amp;nbsp; &amp;nbsp;This is not a common use case nor a recommended use case.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jul 2025 17:50:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Internal-Compiler-Error-Co-Array-array-and-openMP-offload-map-to/m-p/1704865#M176402</guid>
      <dc:creator>Ron_Green</dc:creator>
      <dc:date>2025-07-22T17:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Compiler Error: Co-Array array and openMP offload map(to:)</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Internal-Compiler-Error-Co-Array-array-and-openMP-offload-map-to/m-p/1704888#M176404</link>
      <description>&lt;P&gt;bug ID is CMPLRLLVM-69232&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jul 2025 21:08:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Internal-Compiler-Error-Co-Array-array-and-openMP-offload-map-to/m-p/1704888#M176404</guid>
      <dc:creator>Ron_Green</dc:creator>
      <dc:date>2025-07-22T21:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Compiler Error: Co-Array array and openMP offload map(to:)</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Internal-Compiler-Error-Co-Array-array-and-openMP-offload-map-to/m-p/1704889#M176405</link>
      <description>&lt;P&gt;1 image is not a problem, as you state.&amp;nbsp; And if that is the extent of your testing that is probably OK.&amp;nbsp; But if you intend others to use this example or some user forgets to set&amp;nbsp;number of images to 1 there can be problems.&amp;nbsp; Another image can update 's' asynchronously.&amp;nbsp; And if the data is offloaded already when this update occurs, it gets stomped on map from.&amp;nbsp; And did the user intend to use the remote update data or the local image data a fraction of a second before the update?&amp;nbsp; You would need synchronization/barriers to prevent any data updates until the offload computation starts and ends and returns results.&amp;nbsp; Yes, can be done, but so many ways an unwary user will someday make a mistake and cause runtime race conditions.&lt;/P&gt;
&lt;P&gt;But if your intent is just to run this 1 image example I suppose it is fine.&amp;nbsp; Barriers can prevent race conditions, but then why use an inherently asynchronous programming model like CAF with a lot of barriers to try to control asynchronous updates?&amp;nbsp;Most OpenMP users think that offload of coarray objects is just asking for race condition problems.&amp;nbsp; Personally I think allowing Coarray objects in offload is just a bad idea and should not have been allowed in the OMP Standard. Just my opinion.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jul 2025 21:22:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Internal-Compiler-Error-Co-Array-array-and-openMP-offload-map-to/m-p/1704889#M176405</guid>
      <dc:creator>Ron_Green</dc:creator>
      <dc:date>2025-07-22T21:22:29Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Compiler Error: Co-Array array and openMP offload map(to:)</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Internal-Compiler-Error-Co-Array-array-and-openMP-offload-map-to/m-p/1704991#M176412</link>
      <description>&lt;P&gt;Thanks for reporting this! That's the main thing so thank you greatly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The example code above is very much a minimal example to reproduce the bug and no anything anyone should be using as a learning example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the rest of your questions:&lt;/P&gt;&lt;P&gt;We are investigating openMP offload for a production code&amp;nbsp;&lt;A href="https://gitlab.com/fastsum/NRQCD" target="_blank"&gt;https://gitlab.com/fastsum/NRQCD&lt;/A&gt;&amp;nbsp;in lattice QCD. The way to think about it is&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NT (independent) copies of a problem consisting of NT time steps of size NS^3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wanted to play around with coarrays when I updated the code from F77 to modern fortran, and so I implemented coarrays to parallelise over the NT independent copies.&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;The data `s` is required by each copy &amp;amp; time step and is constant but is read from file. I did try only having one copy on one image and accessing it from the others, but I found that access times were very slow.&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;I understand of course that coarrays are more capable than what we use them for, but really I just wanted to play around with them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have now implemented CPU openMP within each time-step - i.e. for the size NS^3. We are looking at initial explorations for openMP offload. Right now this is just with one image. Our naive thought was to just use each image to target a different device (GPU) which would avoid any question of clobbering data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jul 2025 08:31:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Internal-Compiler-Error-Co-Array-array-and-openMP-offload-map-to/m-p/1704991#M176412</guid>
      <dc:creator>RJaBi</dc:creator>
      <dc:date>2025-07-23T08:31:05Z</dc:date>
    </item>
  </channel>
</rss>

