<?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: ifx and ifort comparison for do concurrent in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/ifx-and-ifort-comparison-for-do-concurrent/m-p/1621550#M173200</link>
    <description>&lt;P&gt;I used task manager and confirmed that without using the /Qopenmp flag, DO CONCURRENT does not produce parallel code.&lt;/P&gt;&lt;P&gt;I had to up the stack size when using /Qopenmp, no idea why as the thread data should be small as only scalar variable are declared as LOCAL&lt;BR /&gt;&lt;BR /&gt;These are my results:&lt;/P&gt;&lt;TABLE width="243"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="64"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="115"&gt;Serial&lt;/TD&gt;&lt;TD width="64"&gt;Parallel (/Qopenmp)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;IFX&lt;/TD&gt;&lt;TD&gt;2.707999945&lt;/TD&gt;&lt;TD&gt;4.796&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;IFORT&lt;/TD&gt;&lt;TD&gt;2.092999935&lt;/TD&gt;&lt;TD&gt;0.81&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;Task manager confirmed that the IFX parallel version did not run in parallel but the IFORT version did.&lt;/P&gt;</description>
    <pubDate>Wed, 07 Aug 2024 14:18:25 GMT</pubDate>
    <dc:creator>Andrew_Smith</dc:creator>
    <dc:date>2024-08-07T14:18:25Z</dc:date>
    <item>
      <title>ifx and ifort comparison for do concurrent</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/ifx-and-ifort-comparison-for-do-concurrent/m-p/1621036#M173180</link>
      <description>&lt;P&gt;below is my &lt;STRONG&gt;do concurrent&lt;/STRONG&gt; code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Question 1) &lt;/STRONG&gt;Why the code does not run in parallel with ifx? Apparently, I do not see any error or warning !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;program dc_test
  implicit none
  
  !====
  integer(4),parameter::Nx=300,Ny=300
  real(8) :: x=0.03d0,y=0.03d0,t_final
  real(8), parameter :: one=1.0,two=2.0,four=4.0,half=0.5
  integer(4) ::steps,i,j,ip,im,jp,jm,t_start,t_end,rate
  real(8):: dt=1.0d-4,tau=0.0003d0,ep=0.01d0,ka=1.8d0,seed=5.0d0,ppo,t1,t2,th,m
  real(8):: del=0.02d0,an=6.0d0,al=0.9d0,ga=10.0d0,te=1.0d0,t0=0.2d0,pix=four*atan(one)
  real(8),dimension(Nx,Ny) :: pp,tt,lpp,ltt,ppx,ppy,eps,deps
  
  !====
  pp = 0.0
  tt = 0.0
  
  do i = 1, Nx
    do j = 1, Ny
      if ((i-Nx/two)*(i-Nx/two)+(j-Ny/two)*(j-Ny/two)&amp;lt;seed)pp(i,j)=one
    end do
  end do
  
  !====
  call system_clock (count=t_start, count_rate=rate)
  
  do steps = 1,1000
    
    do concurrent (integer::j=1:Ny,i=1:Nx) default (none)             &amp;amp;
      local ( ip,im,jp,jm,th )                                        &amp;amp;
      shared ( x,y,lpp,ltt,pp,tt,ppx,ppy,eps,deps,t0,an,del,ep )              
      
      jp = j + 1
      jm = j - 1
      ip = i + 1
      im = i - 1
      
      if ( im == 0 ) im = Nx
      if ( ip == ( Nx + 1) ) ip = 1
      if ( jm == 0 ) jm = Ny
      if ( jp == ( Ny + 1) ) jp = 1
      
      lpp(i,j) = (pp(ip,j)+pp(im,j)+pp(i,jm)+pp(i,jp)-four*pp(i,j))/(x*y)
      ltt(i,j) = (tt(ip,j)+tt(im,j)+tt(i,jm)+tt(i,jp)-four*tt(i,j))/(x*y)
      
      ppx(i,j) = (pp(ip,j) - pp(im,j))/x
      ppy(i,j) = (pp(i,jp) - pp(i,jm))/y
      
      th  = atan2( ppy(i,j),ppx(i,j) )
      
      eps(i,j)  =  ep*(one+del*cos(an*(th-t0)))
      deps(i,j) = -ep*an*del*sin(an*(th-t0))
      
    end do
    
    do concurrent (integer::j=1:Ny,i=1:Nx) default (none)            &amp;amp;
      local( i,j,ip,im,jp,jm,ppo,t1,t2,m)                                 &amp;amp;
      shared(x,y,pp,tt,eps,deps,ppx,ppy,lpp,ltt,al,pix,te,ga,dt,tau,ka)
      
      jp = j + 1
      jm = j - 1
      ip = i + 1
      im = i - 1
      
      if ( im == 0 ) im = Nx
      if ( ip == ( Nx + 1) ) ip = 1
      if ( jm == 0 ) jm = Ny
      if ( jp == ( Ny + 1) ) jp = 1
      
      ppo = pp(i,j)
      
      t1 =  ( eps(i,jp)*deps(i,jp)*ppx(i,jp) - eps(i,jm)*deps(i,jm)*ppx(i,jm) ) / y
      t2 = -( eps(ip,j)*deps(ip,j)*ppy(ip,j) - eps(im,j)*deps(im,j)*ppy(im,j) ) / x
      
      m = al/pix*atan(ga*(te-tt(i,j)))
      
      pp(i,j) = pp(i,j)+(dt/tau)*(t1+t2+eps(i,j)**2*lpp(i,j) ) &amp;amp;
      +  ppo*(one-ppo)*(ppo-half+m)
      tt(i,j) = tt(i,j)+dt*ltt(i,j)+ka*(pp(i,j)-ppo)
      
    end do  
    
  end do
  
  call system_clock (count=t_end)
  t_final = real(max(t_end-t_start,1_8))/real(rate)
  
  print*, t_final  
end program dc_test&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;&lt;U&gt;&lt;STRONG&gt;ifx test&lt;/STRONG&gt;&lt;/U&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;No parallelization to be seen with the output time&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;gt;ifx main_dc.f90 /Qopenmp /F500000000
Intel(R) Fortran Compiler for applications running on Intel(R) 64, Version 2024.2.0 Build 20240602
Copyright (C) 1985-2024 Intel Corporation. All rights reserved.

Microsoft (R) Incremental Linker Version 14.32.31332.0
Copyright (C) Microsoft Corporation.  All rights reserved.

-out:main_dc.exe
-subsystem:console
-stack:500000000
-defaultlib:libiomp5md.lib
-nodefaultlib:vcomp.lib
-nodefaultlib:vcompd.lib
main_dc.obj

&amp;gt;main_dc
   4.00899982452393&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;&lt;U&gt;&lt;STRONG&gt;ifort test&lt;/STRONG&gt;&lt;/U&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;parallelization can be confirmed with the output time&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;gt;ifort main_dc.f90 /Qopenmp /F500000000
Intel(R) Fortran Intel(R) 64 Compiler Classic for applications running on Intel(R) 64, Version 2021.13.0 Build 20240602_000000
Copyright (C) 1985-2024 Intel Corporation. All rights reserved.

ifort: remark #10448: Intel(R) Fortran Compiler Classic (ifort) is now deprecated and will be discontinued late 2024. Intel recommends that customers transition now to using the LLVM-based Intel(R) Fortran Compiler (ifx) for continued Windows* and Linux* support, new language support, new language features, and optimizations. Use '/Qdiag-disable:10448' to disable this message.
Microsoft (R) Incremental Linker Version 14.32.31332.0
Copyright (C) Microsoft Corporation. All rights reserved.

-out:main_dc.exe
-subsystem:console
-stack:500000000
-defaultlib:libiomp5md.lib
-nodefaultlib:vcomp.lib
-nodefaultlib:vcompd.lib
main_dc.obj

&amp;gt;main_dc
0.282000005245209&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Question 2)&lt;/STRONG&gt; According to the intel documentation,&amp;nbsp;&lt;U&gt;rules for&amp;nbsp;variable-name&amp;nbsp;in a&amp;nbsp;locality-spec:&lt;/U&gt;&amp;nbsp;&lt;FONT color="#B24501"&gt;"variable-name can not be the same as index-name of the same do concurrent statement."&lt;/FONT&gt; So the code is expected to show error or warning because in the concurrent statement&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;      do concurrent (integer::j=1:Ny,i=1:Nx) default (none) &amp;amp;
      local( i,j,ip,im,jp,jm,ppo,t1,t2,m) 
      ...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;i&lt;/EM&gt; and &lt;EM&gt;j&lt;/EM&gt; are index-name, I think.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Question 3) &lt;/STRONG&gt;&amp;nbsp;The option &lt;FONT color="#C81326"&gt;/Qopt-report-phase:openmp&lt;/FONT&gt; does not work with ifx but with ifort. So how to get the report&amp;nbsp;to check if&amp;nbsp;&lt;FONT size="5"&gt;ifx&lt;/FONT&gt; has successfully parallelized the code?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2024 06:01:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/ifx-and-ifort-comparison-for-do-concurrent/m-p/1621036#M173180</guid>
      <dc:creator>Fortran10</dc:creator>
      <dc:date>2024-08-06T06:01:10Z</dc:date>
    </item>
    <item>
      <title>Re: ifx and ifort comparison for do concurrent</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/ifx-and-ifort-comparison-for-do-concurrent/m-p/1621323#M173190</link>
      <description>&lt;P&gt;The amount of work inside the do concurrent loop is probably too small compared the overhead of parallel running so it actually runs slower. You did not show comparative times for serial and parallel to prove your assumption&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2024 22:06:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/ifx-and-ifort-comparison-for-do-concurrent/m-p/1621323#M173190</guid>
      <dc:creator>Andrew_Smith</dc:creator>
      <dc:date>2024-08-06T22:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: ifx and ifort comparison for do concurrent</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/ifx-and-ifort-comparison-for-do-concurrent/m-p/1621365#M173192</link>
      <description>&lt;P&gt;The output shows the time for both tests. It is the last line in the output.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here I it write again&lt;/P&gt;&lt;P&gt;ifort time =&amp;nbsp;&lt;SPAN&gt;0.282000005245209&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;ifx time&amp;nbsp; &amp;nbsp; =&amp;nbsp;&lt;SPAN&gt;4.00899982452393&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2024 01:05:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/ifx-and-ifort-comparison-for-do-concurrent/m-p/1621365#M173192</guid>
      <dc:creator>Fortran10</dc:creator>
      <dc:date>2024-08-07T01:05:18Z</dc:date>
    </item>
    <item>
      <title>Re: ifx and ifort comparison for do concurrent</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/ifx-and-ifort-comparison-for-do-concurrent/m-p/1621550#M173200</link>
      <description>&lt;P&gt;I used task manager and confirmed that without using the /Qopenmp flag, DO CONCURRENT does not produce parallel code.&lt;/P&gt;&lt;P&gt;I had to up the stack size when using /Qopenmp, no idea why as the thread data should be small as only scalar variable are declared as LOCAL&lt;BR /&gt;&lt;BR /&gt;These are my results:&lt;/P&gt;&lt;TABLE width="243"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="64"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="115"&gt;Serial&lt;/TD&gt;&lt;TD width="64"&gt;Parallel (/Qopenmp)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;IFX&lt;/TD&gt;&lt;TD&gt;2.707999945&lt;/TD&gt;&lt;TD&gt;4.796&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;IFORT&lt;/TD&gt;&lt;TD&gt;2.092999935&lt;/TD&gt;&lt;TD&gt;0.81&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;Task manager confirmed that the IFX parallel version did not run in parallel but the IFORT version did.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2024 14:18:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/ifx-and-ifort-comparison-for-do-concurrent/m-p/1621550#M173200</guid>
      <dc:creator>Andrew_Smith</dc:creator>
      <dc:date>2024-08-07T14:18:25Z</dc:date>
    </item>
    <item>
      <title>Re: ifx and ifort comparison for do concurrent</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/ifx-and-ifort-comparison-for-do-concurrent/m-p/1621602#M173201</link>
      <description>&lt;P&gt;For Question # 3 &lt;BR /&gt;See&amp;nbsp;&amp;nbsp;&lt;A href="https://www.intel.com/content/www/us/en/developer/articles/guide/porting-guide-for-ifort-to-ifx.html#inpage-nav-1-10" target="_blank" rel="noopener"&gt;the Intel Fortran Compiler Porting Guide &lt;/A&gt;&lt;/P&gt;
&lt;P&gt;As well as other useful information on ifx.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2024 17:34:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/ifx-and-ifort-comparison-for-do-concurrent/m-p/1621602#M173201</guid>
      <dc:creator>Devorah_H_Intel</dc:creator>
      <dc:date>2024-08-07T17:34:43Z</dc:date>
    </item>
  </channel>
</rss>

