- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
This OpenMP program compiles with Intel Visual Fortran Compiler XE 12.0.4.196
I believe it should indicate that the dummy array "thearray" lacks a sharing attribute like it complains about the "localarray" if I remove its sharing attribute.
I did expect an error like:
error #6752: Since the OpenMP* DEFAULT(NONE) clause applies, the PRIVATE, SHARED, REDUCTION, FIRSTPRIVATE, or LASTPRIVATE attribute must be explicitly specified for every variable. [thearray] Console1.f90 30
Regards,
Magnus
This OpenMP program compiles with Intel Visual Fortran Compiler XE 12.0.4.196
I believe it should indicate that the dummy array "thearray" lacks a sharing attribute like it complains about the "localarray" if I remove its sharing attribute.
I did expect an error like:
error #6752: Since the OpenMP* DEFAULT(NONE) clause applies, the PRIVATE, SHARED, REDUCTION, FIRSTPRIVATE, or LASTPRIVATE attribute must be explicitly specified for every variable. [thearray] Console1.f90 30
Regards,
Magnus
[fortran] program Console1 implicit none integer myarray(10),myscalar !$omp parallel DEFAULT(NONE) SHARED(myarray,myscalar) !$omp master CALL work(myarray,myscalar) !$omp end master !$omp end parallel end program Console1 subroutine work(thearray,thescalar) implicit none integer thearray(*),thescalar,localarray(10) !$OMP TASK DEFAULT(NONE) shared(thescalar,localarray) CALL WORKTASK(thearray,thescalar,localarray) !$OMP end TASK end subroutine work SUBROUTINE WORKTASK(thearray,thescalar,secondarray) implicit none INTEGER thearray(*),thescalar,secondarray(*) thearray(1)=thescalar end SUBROUTINE WORKTASK[/fortran]
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, we agree that an error should be given here. I'll let the developers know. Issue ID is DPD200169845. Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Further investigation shows that an error message is not warranted, but the compiler is failing to handle the case correctly.
The OpenMP 3.1 standard says:
The OpenMP 3.1 standard says:
[plain]2.9.1.1 Data-sharing Attribute Rules for Variables Referenced in a Construct 17 The data-sharing attributes of variables that are referenced in a construct may be one of 18 the following: predetermined, explicitly determined, or implicitly determined. 22 The following variables have predetermined data-sharing attributes: [/plain]and then it says, in the Fortran-specific section:
[plain]10 Assumed-size arrays are shared.[/plain]We will be fixing the compiler to handle this case properly.
in the 3.1 specification, line 15 on page 91:
2.9.1.1 Data-sharing Attribute Rules for Variables Referenced in a
16 Construct
17 The data-sharing attributes of variables that are referenced in a construct may be one of
18 the following: predetermined, explicitly determined, or implicitly determined.
22 The following variables have predetermined data-sharing attributes:
In the Fortran specific section on page 92, line 10:
10 Assumed-size arrays are shared.
![](/skins/images/C4F7392A5C68ACA60290C9576F107044/responsive_peak/images/icon_anonymous_message.png)
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