- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello!
I have tried to compile the following code
subroutine example(a, n)
implicit none
integer, intent(in) :: n
real(8), intent(inout) :: a(n,n,n)
!
integer :: i, j, k
integer :: tmp
!$OMP PARALLEL DO &
!$OMP DEFAULT(NONE) SHARED(a, n) &
!$OMP PRIVATE(i,j,k,tmp)
do k = 1, n
do concurrent (i = 1:n, j = 1:n, i < j)
tmp = a(i,j,k)
a(i,j,k) = a(j,i,k)
a(j,i,k) = tmp
end do
end do
end subroutine example
I compiled it with ifx 2024.2.1 with the following command:
ifx do-concurrent.f90 -fopenmp
And it says, that it cannot compile that example with the following message:
do-concurrent.f90(13): error #6752: Since the OpenMP* DEFAULT(NONE) clause applies, the PRIVATE, SHARED, REDUCTION, FIRSTPRIVATE, or LASTPRIVATE attribute must be explicitly specified for every variable. [I]
do concurrent (i = 1:n, j = 1:n, i < j)
-------------------^
do-concurrent.f90(13): error #6752: Since the OpenMP* DEFAULT(NONE) clause applies, the PRIVATE, SHARED, REDUCTION, FIRSTPRIVATE, or LASTPRIVATE attribute must be explicitly specified for every variable. [J]
do concurrent (i = 1:n, j = 1:n, i < j)
----------------------------^
I and J variables are defined in !$OMP section in PRIVATE, but somewhat this code is not accepted.
With gfortran this code is compiling without any messages.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is a bug. The compiler is picking up the DEFAULT NONE for the DO CONCURRENT but missing the other clauses. I'll write a bug report.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page