- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The following code produces an ICE with IVF 10.1.3885.2005. This may have been fixed in newer releases, but I cannot test if it's still there - maybe it's worth checking.
If you comment the EXIT statement the ICE disappears.
Olivier
If you comment the EXIT statement the ICE disappears.
Olivier
[fortran]PROGRAM MAIN
IMPLICIT NONE
LOGICAL :: KEEP_GOING
INTEGER :: I,IMAX,J,JMAX,STATUS
KEEP_GOING = .TRUE.
IMAX = 10
JMAX = 10
DO I=1,IMAX
!$OMP PARALLEL NUM_THREADS(4) DEFAULT(SHARED) PRIVATE(J,STATUS)
!$OMP DO
DO J=1,JMAX
IF (KEEP_GOING) THEN
STATUS = I+J
IF (STATUS>10) THEN
!$OMP CRITICAL (LOCK)
KEEP_GOING = .FALSE.
!$OMP END CRITICAL (LOCK)
END IF
ELSE
EXIT
END IF
END DO
!$OMP END DO NOWAIT
!$OMP END PARALLEL
IF (.NOT.KEEP_GOING) EXIT
END DO
END PROGRAM MAIN[/fortran]
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Current version says:
t.f90(23): error #7566: A RETURN or EXIT statement is not legal in a DO loop associated with a parallel directive.
EXIT
------------^
No ICE.
t.f90(23): error #7566: A RETURN or EXIT statement is not legal in a DO loop associated with a parallel directive.
EXIT
------------^
No ICE.
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