<?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: OpenMP Target use_device_ptr/use_device_addr with Fortran derived types in Intel® MPI Library</title>
    <link>https://community.intel.com/t5/Intel-MPI-Library/OpenMP-Target-use-device-ptr-use-device-addr-with-Fortran/m-p/1675583#M12092</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That is not great news.&amp;nbsp; Is there a reason for the restriction in the spec?&lt;/P&gt;&lt;P&gt;Is there a way to request the feature to the the OpenMP spec committee?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For our code, it would be very cumbersome to wrap every routine where a derived type is used as a device pointer.&lt;/P&gt;&lt;P&gt;I think for our main code that uses derived types we will stick with OpenACC for now as its "host_data use_device" works with derived type arrays&amp;nbsp; (since Intel is skipping its next data-center GPU and no high-end Battlemage GPUs have been announced, we can wait for the spec to catch up).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For our other codes, we will stick with OpenMP target so we can run on Intel GPUs (check out our latest paper where we have some great Intel GPU results:&amp;nbsp;&lt;A href="https://arxiv.org/abs/2501.06377" target="_blank"&gt;https://arxiv.org/abs/2501.06377&lt;/A&gt;&amp;nbsp;Figures 9 and 10)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the info!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;-- Ron&lt;/P&gt;</description>
    <pubDate>Mon, 17 Mar 2025 16:42:20 GMT</pubDate>
    <dc:creator>caplanr</dc:creator>
    <dc:date>2025-03-17T16:42:20Z</dc:date>
    <item>
      <title>OpenMP Target use_device_ptr/use_device_addr with Fortran derived types</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/OpenMP-Target-use-device-ptr-use-device-addr-with-Fortran/m-p/1650007#M12013</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am testing a miniapp that tests multi-gpu Fortran that is used in our production code.&lt;/P&gt;&lt;P data-unlink="true"&gt;The code is located at:&amp;nbsp; &lt;A href="https://github.com/predsci/multigpu-test-code" target="_self"&gt;multigpu-test-code&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;The specific version being tested here is:&amp;nbsp; &amp;nbsp;&lt;A class="" title="psi_multigpu_test_code_stdpar_ompdata.f90" href="https://github.com/predsci/multigpu-test-code/blob/main/psi_multigpu_test_code_stdpar_ompdata.f90" target="_blank" rel="noopener"&gt;psi_multigpu_test_code_stdpar_ompdata.f90&lt;/A&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;I am testing on the Stampede3 system at TACC on the MAX 1550 GPU.&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;When I try to compile the code with:&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;mpif90 -f90=ifx -fiopenmp -fopenmp-target-do-concurrent -fopenmp-targets=spir64 -fopenmp-do-concurrent-maptype-modifier=present psi_multigpu_test_code_stdpar_ompdata.f90 -o psi_multigpu_test_code_stdpar_ompdata&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;I get the error:&lt;/P&gt;&lt;P data-unlink="true"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;psi_multigpu_test_code_stdpar_ompdata.f90(669): error #9036: A list item that appears in a use_device_ptr or use_device_addr clause must not be a component of a derived type. [R]&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;!$omp target data use_device_ptr(v%r,v%t,v%p)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;-----------------------------------^&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;Is this error due to the OpenMP Target specification, or is it a temporary limitation of the compiler?&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;The code works correctly on NVIDIA GPUs with the nvfortran compiler, implying the latter (although nvfortran is known to support the unsupported sometimes...)&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;In either case, is there a current workaround to allow passing derived type arrays into GPU-aware MPI/library calls?&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;Thanks!&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;- Ron&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2024 01:56:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/OpenMP-Target-use-device-ptr-use-device-addr-with-Fortran/m-p/1650007#M12013</guid>
      <dc:creator>caplanr</dc:creator>
      <dc:date>2024-12-17T01:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: OpenMP Target use_device_ptr/use_device_addr with Fortran derived types</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/OpenMP-Target-use-device-ptr-use-device-addr-with-Fortran/m-p/1652671#M12014</link>
      <description>&lt;P&gt;&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/265235"&gt;@caplanr&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;The restriction is removed in OpenMP 6.0, for 5.2 you may workaround the restriction with something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="fortran"&gt;program test_use_device_addr
  implicit none
  type d
     real :: a
  end type d
  type(d) :: a
  real,pointer ::a_ptr
  call assign_ptr(a%a,a_ptr)  
!$omp target data use_device_addr(a_ptr)

!$omp end target data
call wrapper(a%a)
contains
  subroutine wrapper(a)
    real :: a
    !$omp target data use_device_addr(a)                                                                                                                                                     
    !$omp end target data                                                                                                                                                                    
  end subroutine wrapper
  subroutine assign_ptr(source,ptr)
    real,target :: source
    real,pointer :: ptr
    ptr=&amp;gt;source
  end subroutine assign_ptr
end program test_use_device_ptr&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 27 Dec 2024 11:55:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/OpenMP-Target-use-device-ptr-use-device-addr-with-Fortran/m-p/1652671#M12014</guid>
      <dc:creator>TobiasK</dc:creator>
      <dc:date>2024-12-27T11:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: OpenMP Target use_device_ptr/use_device_addr with Fortran derived types</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/OpenMP-Target-use-device-ptr-use-device-addr-with-Fortran/m-p/1652725#M12017</link>
      <description>&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Will OpenMP 6.0 (at least this component of it) be implemented in the next version of IFX?&lt;/P&gt;&lt;P&gt;Any ETA on the release?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;- Ron&lt;/P&gt;</description>
      <pubDate>Fri, 27 Dec 2024 20:42:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/OpenMP-Target-use-device-ptr-use-device-addr-with-Fortran/m-p/1652725#M12017</guid>
      <dc:creator>caplanr</dc:creator>
      <dc:date>2024-12-27T20:42:17Z</dc:date>
    </item>
    <item>
      <title>Re:OpenMP Target use_device_ptr/use_device_addr with Fortran derived types</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/OpenMP-Target-use-device-ptr-use-device-addr-with-Fortran/m-p/1675120#M12086</link>
      <description>&lt;P&gt;&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/265235"&gt;@caplanr&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;sorry for the long delay here. It took me several discussions with the internal OMP team and I have to tell you that it will be out of scope for the near future. My interpretation of the standard was wrong - the note about structure components was removed but it was only removed because it was a duplicate. There will be no change regarding use_device_addr and structure components.&lt;/P&gt;&lt;P&gt;So the only way to handle this is going through a wrapper function the remove the struct or assign temporary pointers to the structure components and use them in the use_device_addr() clause.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 14 Mar 2025 18:06:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/OpenMP-Target-use-device-ptr-use-device-addr-with-Fortran/m-p/1675120#M12086</guid>
      <dc:creator>TobiasK</dc:creator>
      <dc:date>2025-03-14T18:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: OpenMP Target use_device_ptr/use_device_addr with Fortran derived types</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/OpenMP-Target-use-device-ptr-use-device-addr-with-Fortran/m-p/1675583#M12092</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That is not great news.&amp;nbsp; Is there a reason for the restriction in the spec?&lt;/P&gt;&lt;P&gt;Is there a way to request the feature to the the OpenMP spec committee?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For our code, it would be very cumbersome to wrap every routine where a derived type is used as a device pointer.&lt;/P&gt;&lt;P&gt;I think for our main code that uses derived types we will stick with OpenACC for now as its "host_data use_device" works with derived type arrays&amp;nbsp; (since Intel is skipping its next data-center GPU and no high-end Battlemage GPUs have been announced, we can wait for the spec to catch up).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For our other codes, we will stick with OpenMP target so we can run on Intel GPUs (check out our latest paper where we have some great Intel GPU results:&amp;nbsp;&lt;A href="https://arxiv.org/abs/2501.06377" target="_blank"&gt;https://arxiv.org/abs/2501.06377&lt;/A&gt;&amp;nbsp;Figures 9 and 10)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the info!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;-- Ron&lt;/P&gt;</description>
      <pubDate>Mon, 17 Mar 2025 16:42:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/OpenMP-Target-use-device-ptr-use-device-addr-with-Fortran/m-p/1675583#M12092</guid>
      <dc:creator>caplanr</dc:creator>
      <dc:date>2025-03-17T16:42:20Z</dc:date>
    </item>
  </channel>
</rss>

