- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The following small reproducer compiled with "ifx -fopenmp assoc_atomic.f90 -c" gives an ICE.
Using an explicit pointer (of type integer, dimension(:), pointer) instead of the associate block circumvents the ICE.
Recently released ifort compiles without complains.
Tested with ifx "Version 2024.0.0 Build 20231017" and ifort "Version 2021.11.0 Build 20231010_000000".
module mod
implicit none
public
contains
subroutine update(x, k, m)
integer, dimension(:,:), intent(inout) :: x
integer, intent(in) :: k, m
associate(i => x(:,1))
!$omp atomic
i(k) = min(i(k), m)
end associate
end subroutine update
end module mod
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for reporting this and including details on the compiler used. All of these reports help us improve the compiler for the entire community. We appreciate your help.
THis is fixed in our mainline branch which will go into the next update, 2024.1.0. Here is the proof using a nightly build from the main branch from yesterday
cat repro.f90
module mod
implicit none
public
contains
subroutine update(x, k, m)
integer, dimension(:,:), intent(inout) :: x
integer, intent(in) :: k, m
associate(i => x(:,1))
!$omp atomic
i(k) = min(i(k), m)
end associate
end subroutine update
end module mod
~/quad/wednesday$
~/quad/wednesday$ ifx -c -qopenmp -what -V repro.f90
Intel(R) Fortran Compiler for applications running on Intel(R) 64, Version dev.x.0 Mainline Build 20231127
Copyright (C) 1985-2023 Intel Corporation. All rights reserved.
Intel(R) Fortran 24.0-1426
~/quad/wednesday$ ls
mod.mod repro.f90 repro.o
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for reporting this and including details on the compiler used. All of these reports help us improve the compiler for the entire community. We appreciate your help.
THis is fixed in our mainline branch which will go into the next update, 2024.1.0. Here is the proof using a nightly build from the main branch from yesterday
cat repro.f90
module mod
implicit none
public
contains
subroutine update(x, k, m)
integer, dimension(:,:), intent(inout) :: x
integer, intent(in) :: k, m
associate(i => x(:,1))
!$omp atomic
i(k) = min(i(k), m)
end associate
end subroutine update
end module mod
~/quad/wednesday$
~/quad/wednesday$ ifx -c -qopenmp -what -V repro.f90
Intel(R) Fortran Compiler for applications running on Intel(R) 64, Version dev.x.0 Mainline Build 20231127
Copyright (C) 1985-2023 Intel Corporation. All rights reserved.
Intel(R) Fortran 24.0-1426
~/quad/wednesday$ ls
mod.mod repro.f90 repro.o
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for checking, that sounds great. Still cannot run ifx due to some other issues, but it is shaping up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@martinmath, when compiling with ifx (or ifort) use -qopenmp. -fopenmp is deprecated and will disappear at some point.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for pointing out. My cmake setup has indeed qopenmp, but somehow I got mixed up with gfortran options on the command line.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please report ifx issues and we will look at them and see what be done.
You do know that you can mix/match ifx and ifort object files, .mod files, and libraries. There is a CAVEAT, that doesn't work if you compile with -ipo. That may help with your use of ifx.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There seems to be one final showstopper bug, the solver already runs without qopenmp. With qopenmp there is some elusive problem with allocation, but I think I might have reduced it to a small testcase. For the other few remaining problems I have work-arounds (like for this one). Thanks for the hints.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page