- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I believe that the code shown below (built with ifx 2026.0.0 on Windows 11) is standard-compliant; however, it crashes with the message: "forrtl: severe (153): allocatable array or pointer is not allocated".
PROGRAM P
IMPLICIT NONE (TYPE, EXTERNAL)
CHARACTER(LEN = :), ALLOCATABLE :: S
S = '' ! The code will work if this line is commented out.
!$OMP PARALLEL PRIVATE(S)
S = 'Hi!'
WRITE(*, *) S
!$OMP END PARALLEL
END PROGRAM PSimilar codes, where the allocatable variable is an integer array, do not exhibit the same behavior. It seems the bug is limited to the automatic lhs allocation of S on line 8.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It runs on latest ONEAPI, but throws the errors and then performs ok
You cannot debug it, it sticks on line 6.
PROGRAM P IMPLICIT NONE (TYPE, EXTERNAL) CHARACTER(:), ALLOCATABLE :: S !S = 'A' ! The code will work if this line is commented out. !$OMP PARALLEL PRIVATE(S) S = 'Hi!' WRITE(*, *) S !$OMP END PARALLEL END PROGRAM P
But this runs, remove the null assignment of S, why do you need it, as you note? The standard Intel note does not have LEN =
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