- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The following code does not compile with ifx -qopenmp (2023.0.0 20221201) but it does with ifort -qopenmp (2021.8.0 20221119):
module main_mod
use iso_fortran_env, only: rp => real64
implicit none
type statevec_t
real(rp), allocatable :: data(:, :)
contains
procedure :: dof => statevec_dof
end type statevec_t
interface statevec_t
module procedure statevec_initialize
end interface statevec_t
! ========
contains
! ========
function statevec_initialize(nvars, ndofs) result(sol)
integer, intent(in) :: nvars
integer, intent(in) :: ndofs
type(statevec_t) :: sol
allocate(sol % data(nvars, ndofs))
end function statevec_initialize
function statevec_dof(this, idof) result(sol)
class(statevec_t), target, intent(in) :: this
integer, intent(in) :: idof
real(rp), pointer :: sol(:)
sol => this % data(:, idof)
end function statevec_dof
end module main_mod
!==========================================================================
!==========================================================================
program main
use main_mod, only: rp, statevec_t
implicit none
integer :: nv = 4
integer :: ndof = 6000000
type(statevec_t) :: solution
real(rp), pointer :: Qi(:)
! Initialization
! --------------
solution = statevec_t(nv, ndof)
call random_number(solution % data)
! Associate
! ---------
do concurrent (integer :: i = 1 : ndof) shared(solution)
associate(Qi => solution % dof(i)) !< Compiler error
Qi = 3.0_rp * Qi
end associate
end do
! Pointer
! -------
do concurrent (integer :: i = 1 : ndof) shared(solution) local(Qi)
Qi => solution % dof(i) !< Compiler error
Qi = 3.0_rp * Qi
end do
! Direct assignment
! -----------------
do concurrent (integer :: i = 1 : ndof) shared(solution)
solution % dof(i) = 3.0_rp * solution % dof(i) !< Compiler error
end do
end program main
Any of the three options in lines 65, 73 and 80 returns a compiler error. Note that the issue is related to the -qopenmp flag. Both compilers work fine without it.
I have read through the list in https://www.intel.com/content/www/us/en/developer/articles/technical/fortran-language-and-openmp-features-in-ifx.html and I could not find any reference to this issue (although it was implemented for sequential compilations at some point during 2022).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This issue is fixed in oneAPI 2023.2.0 that was released this week.
Please download the new release and check it out!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for reporting this. I filed a bug, CMPLRLLVM-44595.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This issue is fixed in oneAPI 2023.2.0 that was released this week.
Please download the new release and check it out!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I confirm it is fixed, at least with my setup. It also seems that the compiler is able to inline the function call in this simple case.
Thank you for the bug report and the quick response from the developers.
![](/skins/images/7FC17B7B85029576C25F1E43CE255B51/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page