- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would like to print stack traces when a check fails, like the ones I get with the option "-trace"
main.f90
program main
implicit none
integer :: i, a(10)
!$OMP PARALLEL DO PRIVATE(i) SHARED(a)
do i = 1, 10
a(5 - i) = i
end do
write(*,*) a
endprogram
Complied without -qopenmp I get the correct stack trace:
ifx -check -trace main.f90; ./a.out
forrtl: severe (408): fort: (3): Subscript #1 of the array A has value 0 which is less than the lower bound of 1
Image PC Routine Line Source
a.out 0000000000405228 main 8 main.f90
a.out 000000000040517D Unknown Unknown Unknown
libc.so.6 00007F5543A2A2AE Unknown Unknown Unknown
libc.so.6 00007F5543A2A379 __libc_start_main Unknown Unknown
a.out 0000000000405085 Unknown Unknown Unknown
With -qopenmp
ifx -check -trace -qopenmp main.f90; ./a.out
forrtl: severe (408): fort: (3): Subscript #1 of the array A has value -1 which is less than the lower bound of 1
forrtl: severe (408): fort: (3): Subscript #1 of the array A has value -2 which is less than the lower bound of 1
Ifx version: ifx (IFX) 2025.0.0 20241008
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks for reporting this. At the moment, I can only provide the workaround of setting OMP_NUM_THREADS=1. I am checking with the developers why this is happening for OMP_NUM_THREADS>1

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