- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The Intel Fortran compiler does not compile programs when variable names used within OpenMP copyprivate clauses start with 'do'
However, from the OpenMP standard, I see no reason why such variable names should be forbidden?!
Example:
program test
real :: dot
!$omp parallel private(dot)
!$omp single
dot = 1.0
!$omp end single copyprivate(dot)
!$omp end parallel
end program test
Compilation aborts with:
omp_copyprivate_syntax.F90(9): error #5082: Syntax error, found 'DO' when expecting one of: /
!$omp end single copyprivate(dot)
-----------------------------^
omp_copyprivate_syntax.F90(9): error #7982: Variables in the COPYPRIVATE list must be PRIVATE in the enclosing parallel region.
!$omp end single copyprivate(dot)
-------------------------------^
The trivial work-around is to rename the variable.
However, from the OpenMP standard, I see no reason why such variable names should be forbidden?!
Example:
program test
real :: dot
!$omp parallel private(dot)
!$omp single
dot = 1.0
!$omp end single copyprivate(dot)
!$omp end parallel
end program test
Compilation aborts with:
omp_copyprivate_syntax.F90(9): error #5082: Syntax error, found 'DO' when expecting one of:
!$omp end single copyprivate(dot)
-----------------------------^
omp_copyprivate_syntax.F90(9): error #7982: Variables in the COPYPRIVATE list must be PRIVATE in the enclosing parallel region.
!$omp end single copyprivate(dot)
-------------------------------^
The trivial work-around is to rename the variable.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for reporting the error. I have filed a bug report (Tracking ID: DPD200162297) and will keep you posted on its status.
Thanks,
Xiaoping Duan
Intel Customer Support
Thanks,
Xiaoping Duan
Intel Customer Support

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