-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Skip compiler directives between OMP PARALLEL DO and the loop #81021
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,14 @@ | |
c = c - 1 | ||
END DO outer | ||
|
||
! Accept directives between parallel do and actual loop. | ||
!$OMP PARALLEL DO | ||
!DIR$ VECTOR ALIGNED | ||
DO 20 i=1,N | ||
a = a + 0.5 | ||
20 CONTINUE | ||
!$OMP END PARALLEL DO | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: I think this needs an There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For the worksharing loop directives, the closing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't add it, because it wasn't in the other tests that do similar loops. But I agree, it's nicer to have, so I have added it now. |
||
c = 16 | ||
!ERROR: DO loop after the PARALLEL DO directive must have loop control | ||
!$omp parallel do | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm getting a warning on this line because the variable
directive
isn't used. And since I have-Werror
set, my build fails.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies for that. Neither my GCC nor my Clang builds that I run warned for this - Trivial fix here:
#81604