[Flang][OpenMP] Add frontend support for directives involving master (#113893)
Issue deprecation warning for these directives. Lowering currently supports parallel master, for all other combined or composite directives involving master, issue TODO errors. Note: The first commit changes the formatting and generalizes the deprecation message emission for reuse in the second commit. I can pull it out into a separate commit if required.
This commit is contained in:
committed by
GitHub
parent
f447cf15b2
commit
092a819e94
@@ -210,6 +210,7 @@ static const OmpDirectiveSet blockConstructSet{
|
||||
Directive::OMPD_ordered,
|
||||
Directive::OMPD_parallel,
|
||||
Directive::OMPD_parallel_masked,
|
||||
Directive::OMPD_parallel_master,
|
||||
Directive::OMPD_parallel_workshare,
|
||||
Directive::OMPD_scope,
|
||||
Directive::OMPD_single,
|
||||
|
||||
@@ -583,12 +583,19 @@ TYPE_PARSER(sourced(construct<OmpLoopDirective>(first(
|
||||
"MASKED TASKLOOP SIMD" >>
|
||||
pure(llvm::omp::Directive::OMPD_masked_taskloop_simd),
|
||||
"MASKED TASKLOOP" >> pure(llvm::omp::Directive::OMPD_masked_taskloop),
|
||||
"MASTER TASKLOOP SIMD" >>
|
||||
pure(llvm::omp::Directive::OMPD_master_taskloop_simd),
|
||||
"MASTER TASKLOOP" >> pure(llvm::omp::Directive::OMPD_master_taskloop),
|
||||
"PARALLEL DO SIMD" >> pure(llvm::omp::Directive::OMPD_parallel_do_simd),
|
||||
"PARALLEL DO" >> pure(llvm::omp::Directive::OMPD_parallel_do),
|
||||
"PARALLEL MASKED TASKLOOP SIMD" >>
|
||||
pure(llvm::omp::Directive::OMPD_parallel_masked_taskloop_simd),
|
||||
"PARALLEL MASKED TASKLOOP" >>
|
||||
pure(llvm::omp::Directive::OMPD_parallel_masked_taskloop),
|
||||
"PARALLEL MASTER TASKLOOP SIMD" >>
|
||||
pure(llvm::omp::Directive::OMPD_parallel_master_taskloop_simd),
|
||||
"PARALLEL MASTER TASKLOOP" >>
|
||||
pure(llvm::omp::Directive::OMPD_parallel_master_taskloop),
|
||||
"SIMD" >> pure(llvm::omp::Directive::OMPD_simd),
|
||||
"TARGET LOOP" >> pure(llvm::omp::Directive::OMPD_target_loop),
|
||||
"TARGET PARALLEL DO SIMD" >>
|
||||
@@ -706,6 +713,7 @@ TYPE_PARSER(construct<OmpBlockDirective>(first(
|
||||
"MASTER" >> pure(llvm::omp::Directive::OMPD_master),
|
||||
"ORDERED" >> pure(llvm::omp::Directive::OMPD_ordered),
|
||||
"PARALLEL MASKED" >> pure(llvm::omp::Directive::OMPD_parallel_masked),
|
||||
"PARALLEL MASTER" >> pure(llvm::omp::Directive::OMPD_parallel_master),
|
||||
"PARALLEL WORKSHARE" >> pure(llvm::omp::Directive::OMPD_parallel_workshare),
|
||||
"PARALLEL" >> pure(llvm::omp::Directive::OMPD_parallel),
|
||||
"SCOPE" >> pure(llvm::omp::Directive::OMPD_scope),
|
||||
|
||||
@@ -2274,6 +2274,12 @@ public:
|
||||
case llvm::omp::Directive::OMPD_masked_taskloop:
|
||||
Word("MASKED TASKLOOP");
|
||||
break;
|
||||
case llvm::omp::Directive::OMPD_master_taskloop_simd:
|
||||
Word("MASTER TASKLOOP SIMD");
|
||||
break;
|
||||
case llvm::omp::Directive::OMPD_master_taskloop:
|
||||
Word("MASTER TASKLOOP");
|
||||
break;
|
||||
case llvm::omp::Directive::OMPD_parallel_do:
|
||||
Word("PARALLEL DO ");
|
||||
break;
|
||||
@@ -2286,6 +2292,12 @@ public:
|
||||
case llvm::omp::Directive::OMPD_parallel_masked_taskloop:
|
||||
Word("PARALLEL MASKED TASKLOOP");
|
||||
break;
|
||||
case llvm::omp::Directive::OMPD_parallel_master_taskloop_simd:
|
||||
Word("PARALLEL MASTER TASKLOOP SIMD");
|
||||
break;
|
||||
case llvm::omp::Directive::OMPD_parallel_master_taskloop:
|
||||
Word("PARALLEL MASTER TASKLOOP");
|
||||
break;
|
||||
case llvm::omp::Directive::OMPD_simd:
|
||||
Word("SIMD ");
|
||||
break;
|
||||
@@ -2390,6 +2402,9 @@ public:
|
||||
case llvm::omp::Directive::OMPD_parallel_masked:
|
||||
Word("PARALLEL MASKED");
|
||||
break;
|
||||
case llvm::omp::Directive::OMPD_parallel_master:
|
||||
Word("PARALLEL MASTER");
|
||||
break;
|
||||
case llvm::omp::Directive::OMPD_parallel_workshare:
|
||||
Word("PARALLEL WORKSHARE ");
|
||||
break;
|
||||
|
||||
@@ -1531,6 +1531,7 @@ bool OmpAttributeVisitor::Pre(const parser::OpenMPBlockConstruct &x) {
|
||||
case llvm::omp::Directive::OMPD_masked:
|
||||
case llvm::omp::Directive::OMPD_parallel_masked:
|
||||
case llvm::omp::Directive::OMPD_master:
|
||||
case llvm::omp::Directive::OMPD_parallel_master:
|
||||
case llvm::omp::Directive::OMPD_ordered:
|
||||
case llvm::omp::Directive::OMPD_parallel:
|
||||
case llvm::omp::Directive::OMPD_scope:
|
||||
@@ -1550,7 +1551,8 @@ bool OmpAttributeVisitor::Pre(const parser::OpenMPBlockConstruct &x) {
|
||||
// TODO others
|
||||
break;
|
||||
}
|
||||
if (beginDir.v == llvm::omp::Directive::OMPD_master)
|
||||
if (beginDir.v == llvm::omp::Directive::OMPD_master ||
|
||||
beginDir.v == llvm::omp::Directive::OMPD_parallel_master)
|
||||
IssueNonConformanceWarning(beginDir.v, beginDir.source);
|
||||
ClearDataSharingAttributeObjects();
|
||||
ClearPrivateDataSharingAttributeObjects();
|
||||
@@ -1563,7 +1565,9 @@ void OmpAttributeVisitor::Post(const parser::OpenMPBlockConstruct &x) {
|
||||
const auto &beginDir{std::get<parser::OmpBlockDirective>(beginBlockDir.t)};
|
||||
switch (beginDir.v) {
|
||||
case llvm::omp::Directive::OMPD_masked:
|
||||
case llvm::omp::Directive::OMPD_master:
|
||||
case llvm::omp::Directive::OMPD_parallel_masked:
|
||||
case llvm::omp::Directive::OMPD_parallel_master:
|
||||
case llvm::omp::Directive::OMPD_parallel:
|
||||
case llvm::omp::Directive::OMPD_scope:
|
||||
case llvm::omp::Directive::OMPD_single:
|
||||
@@ -1634,10 +1638,14 @@ bool OmpAttributeVisitor::Pre(const parser::OpenMPLoopConstruct &x) {
|
||||
case llvm::omp::Directive::OMPD_loop:
|
||||
case llvm::omp::Directive::OMPD_masked_taskloop_simd:
|
||||
case llvm::omp::Directive::OMPD_masked_taskloop:
|
||||
case llvm::omp::Directive::OMPD_master_taskloop_simd:
|
||||
case llvm::omp::Directive::OMPD_master_taskloop:
|
||||
case llvm::omp::Directive::OMPD_parallel_do:
|
||||
case llvm::omp::Directive::OMPD_parallel_do_simd:
|
||||
case llvm::omp::Directive::OMPD_parallel_masked_taskloop_simd:
|
||||
case llvm::omp::Directive::OMPD_parallel_masked_taskloop:
|
||||
case llvm::omp::Directive::OMPD_parallel_master_taskloop_simd:
|
||||
case llvm::omp::Directive::OMPD_parallel_master_taskloop:
|
||||
case llvm::omp::Directive::OMPD_simd:
|
||||
case llvm::omp::Directive::OMPD_target_loop:
|
||||
case llvm::omp::Directive::OMPD_target_parallel_do:
|
||||
@@ -1662,7 +1670,11 @@ bool OmpAttributeVisitor::Pre(const parser::OpenMPLoopConstruct &x) {
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (beginDir.v == llvm::omp::Directive::OMPD_target_loop)
|
||||
if (beginDir.v == llvm::omp::OMPD_master_taskloop ||
|
||||
beginDir.v == llvm::omp::OMPD_master_taskloop_simd ||
|
||||
beginDir.v == llvm::omp::OMPD_parallel_master_taskloop ||
|
||||
beginDir.v == llvm::omp::OMPD_parallel_master_taskloop_simd ||
|
||||
beginDir.v == llvm::omp::Directive::OMPD_target_loop)
|
||||
IssueNonConformanceWarning(beginDir.v, beginDir.source);
|
||||
ClearDataSharingAttributeObjects();
|
||||
SetContextAssociatedLoopLevel(GetAssociatedLoopLevelFromClauses(clauseList));
|
||||
@@ -2891,18 +2903,39 @@ void OmpAttributeVisitor::AddOmpRequiresToScope(Scope &scope,
|
||||
|
||||
void OmpAttributeVisitor::IssueNonConformanceWarning(
|
||||
llvm::omp::Directive D, parser::CharBlock source) {
|
||||
std::string warnStr = "";
|
||||
std::string dirName = llvm::omp::getOpenMPDirectiveName(D).str();
|
||||
std::string warnStr;
|
||||
llvm::raw_string_ostream warnStrOS(warnStr);
|
||||
warnStrOS << "OpenMP directive "
|
||||
<< parser::ToUpperCaseLetters(
|
||||
llvm::omp::getOpenMPDirectiveName(D).str())
|
||||
<< " has been deprecated";
|
||||
|
||||
auto setAlternativeStr = [&warnStrOS](llvm::StringRef alt) {
|
||||
warnStrOS << ", please use " << alt << " instead.";
|
||||
};
|
||||
switch (D) {
|
||||
case llvm::omp::OMPD_master:
|
||||
warnStr = "OpenMP directive '" + dirName +
|
||||
"' has been deprecated, please use 'masked' instead.";
|
||||
setAlternativeStr("MASKED");
|
||||
break;
|
||||
case llvm::omp::OMPD_master_taskloop:
|
||||
setAlternativeStr("MASKED TASKLOOP");
|
||||
break;
|
||||
case llvm::omp::OMPD_master_taskloop_simd:
|
||||
setAlternativeStr("MASKED TASKLOOP SIMD");
|
||||
break;
|
||||
case llvm::omp::OMPD_parallel_master:
|
||||
setAlternativeStr("PARALLEL MASKED");
|
||||
break;
|
||||
case llvm::omp::OMPD_parallel_master_taskloop:
|
||||
setAlternativeStr("PARALLEL MASKED TASKLOOP");
|
||||
break;
|
||||
case llvm::omp::OMPD_parallel_master_taskloop_simd:
|
||||
setAlternativeStr("PARALLEL_MASKED TASKLOOP SIMD");
|
||||
break;
|
||||
case llvm::omp::OMPD_target_loop:
|
||||
default:
|
||||
warnStr = "OpenMP directive '" + dirName + "' has been deprecated.";
|
||||
default:;
|
||||
}
|
||||
context_.Warn(
|
||||
common::UsageWarning::OpenMPUsage, source, "%s"_warn_en_US, warnStr);
|
||||
context_.Warn(common::UsageWarning::OpenMPUsage, source, "%s"_warn_en_US,
|
||||
warnStrOS.str());
|
||||
}
|
||||
} // namespace Fortran::semantics
|
||||
|
||||
14
flang/test/Lower/OpenMP/master_taskloop.f90
Normal file
14
flang/test/Lower/OpenMP/master_taskloop.f90
Normal file
@@ -0,0 +1,14 @@
|
||||
! This test checks lowering of OpenMP master taskloop Directive.
|
||||
|
||||
! RUN: %not_todo_cmd bbc -emit-fir -fopenmp -o - %s 2>&1 | FileCheck %s
|
||||
! RUN: %not_todo_cmd %flang_fc1 -emit-fir -fopenmp -o - %s 2>&1 | FileCheck %s
|
||||
|
||||
subroutine test_master_taskloop
|
||||
integer :: i, j = 1
|
||||
!CHECK: not yet implemented: Taskloop construct
|
||||
!$omp master taskloop
|
||||
do i=1,10
|
||||
j = j + 1
|
||||
end do
|
||||
!$omp end master taskloop
|
||||
end subroutine
|
||||
14
flang/test/Lower/OpenMP/master_taskloop_simd.f90
Normal file
14
flang/test/Lower/OpenMP/master_taskloop_simd.f90
Normal file
@@ -0,0 +1,14 @@
|
||||
! This test checks lowering of OpenMP master taskloop simd Directive.
|
||||
|
||||
! RUN: %not_todo_cmd bbc -emit-fir -fopenmp -o - %s 2>&1 | FileCheck %s
|
||||
! RUN: %not_todo_cmd %flang_fc1 -emit-fir -fopenmp -o - %s 2>&1 | FileCheck %s
|
||||
|
||||
subroutine test_master_taskloop_simd()
|
||||
integer :: i, j = 1
|
||||
!CHECK: not yet implemented: Composite TASKLOOP SIMD
|
||||
!$omp master taskloop simd
|
||||
do i=1,10
|
||||
j = j + 1
|
||||
end do
|
||||
!$omp end master taskloop simd
|
||||
end subroutine
|
||||
14
flang/test/Lower/OpenMP/parallel-master-taskloop-simd.f90
Normal file
14
flang/test/Lower/OpenMP/parallel-master-taskloop-simd.f90
Normal file
@@ -0,0 +1,14 @@
|
||||
! This test checks lowering of OpenMP parallel master taskloop simd Directive.
|
||||
|
||||
! RUN: %not_todo_cmd bbc -emit-fir -fopenmp -o - %s 2>&1 | FileCheck %s
|
||||
! RUN: %not_todo_cmd %flang_fc1 -emit-fir -fopenmp -o - %s 2>&1 | FileCheck %s
|
||||
|
||||
subroutine test_parallel_master_taskloop_simd
|
||||
integer :: i, j = 1
|
||||
!CHECK: not yet implemented: Composite TASKLOOP SIMD
|
||||
!$omp parallel master taskloop simd
|
||||
do i=1,10
|
||||
j = j + 1
|
||||
end do
|
||||
!$omp end parallel master taskloop simd
|
||||
end subroutine
|
||||
14
flang/test/Lower/OpenMP/parallel-master-taskloop.f90
Normal file
14
flang/test/Lower/OpenMP/parallel-master-taskloop.f90
Normal file
@@ -0,0 +1,14 @@
|
||||
! This test checks lowering of OpenMP parallel master taskloop Directive.
|
||||
|
||||
! RUN: %not_todo_cmd bbc -emit-fir -fopenmp -o - %s 2>&1 | FileCheck %s
|
||||
! RUN: %not_todo_cmd %flang_fc1 -emit-fir -fopenmp -o - %s 2>&1 | FileCheck %s
|
||||
|
||||
subroutine test_parallel_master_taskloop
|
||||
integer :: i, j = 1
|
||||
!CHECK: not yet implemented: Taskloop construct
|
||||
!$omp parallel master taskloop
|
||||
do i=1,10
|
||||
j = j + 1
|
||||
end do
|
||||
!$omp end parallel master taskloop
|
||||
end subroutine
|
||||
16
flang/test/Lower/OpenMP/parallel-master.f90
Normal file
16
flang/test/Lower/OpenMP/parallel-master.f90
Normal file
@@ -0,0 +1,16 @@
|
||||
! This test checks lowering of the parallel master combined construct.
|
||||
|
||||
! RUN: bbc -fopenmp -emit-hlfir %s -o - | FileCheck %s
|
||||
! RUN: %flang_fc1 -fopenmp -emit-hlfir %s -o - | FileCheck %s
|
||||
|
||||
! CHECK-LABEL: func @_QPparallel_master
|
||||
subroutine parallel_master(x)
|
||||
integer :: x
|
||||
!CHECK: omp.parallel {
|
||||
!CHECK: omp.master {
|
||||
!$omp parallel master
|
||||
x = 1
|
||||
!$omp end parallel master
|
||||
!CHECK: }
|
||||
!CHECK: }
|
||||
end subroutine parallel_master
|
||||
73
flang/test/Parser/OpenMP/master-unparse.f90
Normal file
73
flang/test/Parser/OpenMP/master-unparse.f90
Normal file
@@ -0,0 +1,73 @@
|
||||
! RUN: %flang_fc1 -fdebug-unparse -fopenmp %s | FileCheck --ignore-case %s
|
||||
! RUN: %flang_fc1 -fdebug-dump-parse-tree -fopenmp %s | FileCheck --check-prefix="PARSE-TREE" %s
|
||||
|
||||
! Check for parsing of master directive
|
||||
|
||||
|
||||
subroutine test_master()
|
||||
integer :: c = 1
|
||||
!PARSE-TREE: OmpBeginBlockDirective
|
||||
!PARSE-TREE-NEXT: OmpBlockDirective -> llvm::omp::Directive = master
|
||||
!CHECK: !$omp master
|
||||
!$omp master
|
||||
c = c + 1
|
||||
!$omp end master
|
||||
end subroutine
|
||||
|
||||
subroutine test_master_taskloop_simd()
|
||||
integer :: i, j = 1
|
||||
!PARSE-TREE: OmpBeginLoopDirective
|
||||
!PARSE-TREE-NEXT: OmpLoopDirective -> llvm::omp::Directive = master taskloop simd
|
||||
!CHECK: !$omp master taskloop simd
|
||||
!$omp master taskloop simd
|
||||
do i=1,10
|
||||
j = j + 1
|
||||
end do
|
||||
!$omp end master taskloop simd
|
||||
end subroutine
|
||||
|
||||
subroutine test_master_taskloop
|
||||
integer :: i, j = 1
|
||||
!PARSE-TREE: OmpBeginLoopDirective
|
||||
!PARSE-TREE-NEXT: OmpLoopDirective -> llvm::omp::Directive = master taskloop
|
||||
!CHECK: !$omp master taskloop
|
||||
!$omp master taskloop
|
||||
do i=1,10
|
||||
j = j + 1
|
||||
end do
|
||||
!$omp end master taskloop
|
||||
end subroutine
|
||||
|
||||
subroutine test_parallel_master
|
||||
integer :: c = 2
|
||||
!PARSE-TREE: OmpBeginBlockDirective
|
||||
!PARSE-TREE-NEXT: OmpBlockDirective -> llvm::omp::Directive = parallel master
|
||||
!CHECK: !$omp parallel master
|
||||
!$omp parallel master
|
||||
c = c + 2
|
||||
!$omp end parallel master
|
||||
end subroutine
|
||||
|
||||
subroutine test_parallel_master_taskloop_simd
|
||||
integer :: i, j = 1
|
||||
!PARSE-TREE: OmpBeginLoopDirective
|
||||
!PARSE-TREE-NEXT: OmpLoopDirective -> llvm::omp::Directive = parallel master taskloop simd
|
||||
!CHECK: !$omp parallel master taskloop simd
|
||||
!$omp parallel master taskloop simd
|
||||
do i=1,10
|
||||
j = j + 1
|
||||
end do
|
||||
!$omp end parallel master taskloop simd
|
||||
end subroutine
|
||||
|
||||
subroutine test_parallel_master_taskloop
|
||||
integer :: i, j = 1
|
||||
!PARSE-TREE: OmpBeginLoopDirective
|
||||
!PARSE-TREE-NEXT: OmpLoopDirective -> llvm::omp::Directive = parallel master taskloop
|
||||
!CHECK: !$omp parallel master taskloop
|
||||
!$omp parallel master taskloop
|
||||
do i=1,10
|
||||
j = j + 1
|
||||
end do
|
||||
!$omp end parallel master taskloop
|
||||
end subroutine
|
||||
@@ -476,14 +476,14 @@ use omp_lib
|
||||
! 2.13.1 master
|
||||
|
||||
!$omp parallel
|
||||
!WARNING: OpenMP directive 'master' has been deprecated, please use 'masked' instead.
|
||||
!WARNING: OpenMP directive MASTER has been deprecated, please use MASKED instead.
|
||||
!$omp master
|
||||
a=3.14
|
||||
!$omp end master
|
||||
!$omp end parallel
|
||||
|
||||
!$omp parallel
|
||||
!WARNING: OpenMP directive 'master' has been deprecated, please use 'masked' instead.
|
||||
!WARNING: OpenMP directive MASTER has been deprecated, please use MASKED instead.
|
||||
!ERROR: NUM_THREADS clause is not allowed on the MASTER directive
|
||||
!$omp master num_threads(4)
|
||||
a=3.14
|
||||
|
||||
59
flang/test/Semantics/OpenMP/deprecation.f90
Normal file
59
flang/test/Semantics/OpenMP/deprecation.f90
Normal file
@@ -0,0 +1,59 @@
|
||||
! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp -Werror
|
||||
|
||||
! Check for deprecation of master directive and its combined/composite variants
|
||||
|
||||
subroutine test_master()
|
||||
integer :: c = 1
|
||||
!WARNING: OpenMP directive MASTER has been deprecated, please use MASKED instead.
|
||||
!$omp master
|
||||
c = c + 1
|
||||
!$omp end master
|
||||
end subroutine
|
||||
|
||||
subroutine test_parallel_master
|
||||
integer :: c = 2
|
||||
!WARNING: OpenMP directive PARALLEL MASTER has been deprecated, please use PARALLEL MASKED instead.
|
||||
!$omp parallel master
|
||||
c = c + 2
|
||||
!$omp end parallel master
|
||||
end subroutine
|
||||
|
||||
subroutine test_master_taskloop_simd()
|
||||
integer :: i, j = 1
|
||||
!WARNING: OpenMP directive MASTER TASKLOOP SIMD has been deprecated, please use MASKED TASKLOOP SIMD instead.
|
||||
!$omp master taskloop simd
|
||||
do i=1,10
|
||||
j = j + 1
|
||||
end do
|
||||
!$omp end master taskloop simd
|
||||
end subroutine
|
||||
|
||||
subroutine test_master_taskloop
|
||||
integer :: i, j = 1
|
||||
!WARNING: OpenMP directive MASTER TASKLOOP has been deprecated, please use MASKED TASKLOOP instead.
|
||||
!$omp master taskloop
|
||||
do i=1,10
|
||||
j = j + 1
|
||||
end do
|
||||
!$omp end master taskloop
|
||||
end subroutine
|
||||
|
||||
subroutine test_parallel_master_taskloop_simd
|
||||
integer :: i, j = 1
|
||||
!WARNING: OpenMP directive PARALLEL MASTER TASKLOOP SIMD has been deprecated, please use PARALLEL_MASKED TASKLOOP SIMD instead.
|
||||
!$omp parallel master taskloop simd
|
||||
do i=1,10
|
||||
j = j + 1
|
||||
end do
|
||||
!$omp end parallel master taskloop simd
|
||||
end subroutine
|
||||
|
||||
subroutine test_parallel_master_taskloop
|
||||
integer :: i, j = 1
|
||||
!WARNING: OpenMP directive PARALLEL MASTER TASKLOOP has been deprecated, please use PARALLEL MASKED TASKLOOP instead.
|
||||
!$omp parallel master taskloop
|
||||
do i=1,10
|
||||
j = j + 1
|
||||
end do
|
||||
!$omp end parallel master taskloop
|
||||
end subroutine
|
||||
@@ -80,7 +80,7 @@ use omp_lib
|
||||
|
||||
!$omp parallel num_threads(4)
|
||||
array = (/1, 2, 3, 4, 5, 6, 7, 8, 9, 10/)
|
||||
!WARNING: OpenMP directive 'master' has been deprecated, please use 'masked' instead.
|
||||
!WARNING: OpenMP directive MASTER has been deprecated, please use MASKED instead.
|
||||
!$omp master
|
||||
!$omp flush (array)
|
||||
!$omp end master
|
||||
|
||||
@@ -75,7 +75,7 @@ program omp_nest_barrier
|
||||
end do
|
||||
!$omp end critical
|
||||
|
||||
!WARNING: OpenMP directive 'master' has been deprecated, please use 'masked' instead.
|
||||
!WARNING: OpenMP directive MASTER has been deprecated, please use MASKED instead.
|
||||
!$omp master
|
||||
do i = 1, 10
|
||||
k = k + 1
|
||||
@@ -108,7 +108,7 @@ program omp_nest_barrier
|
||||
end do
|
||||
!$omp end ordered
|
||||
|
||||
!WARNING: OpenMP directive 'master' has been deprecated, please use 'masked' instead.
|
||||
!WARNING: OpenMP directive MASTER has been deprecated, please use MASKED instead.
|
||||
!$omp master
|
||||
do i = 1, 10
|
||||
!ERROR: `DISTRIBUTE` region has to be strictly nested inside `TEAMS` region.
|
||||
|
||||
@@ -9,7 +9,7 @@ program omp_nest_master
|
||||
!$omp do
|
||||
do i = 1, 10
|
||||
k = k + 1
|
||||
!WARNING: OpenMP directive 'master' has been deprecated, please use 'masked' instead.
|
||||
!WARNING: OpenMP directive MASTER has been deprecated, please use MASKED instead.
|
||||
!ERROR: `MASTER` region may not be closely nested inside of `WORKSHARING`, `LOOP`, `TASK`, `TASKLOOP`, or `ATOMIC` region.
|
||||
!$omp master
|
||||
j = j -1
|
||||
@@ -17,7 +17,7 @@ program omp_nest_master
|
||||
end do
|
||||
|
||||
!$omp sections
|
||||
!WARNING: OpenMP directive 'master' has been deprecated, please use 'masked' instead.
|
||||
!WARNING: OpenMP directive MASTER has been deprecated, please use MASKED instead.
|
||||
!ERROR: `MASTER` region may not be closely nested inside of `WORKSHARING`, `LOOP`, `TASK`, `TASKLOOP`, or `ATOMIC` region.
|
||||
!$omp master
|
||||
do i = 1, 10
|
||||
@@ -27,7 +27,7 @@ program omp_nest_master
|
||||
!$omp end sections
|
||||
|
||||
!$omp single
|
||||
!WARNING: OpenMP directive 'master' has been deprecated, please use 'masked' instead.
|
||||
!WARNING: OpenMP directive MASTER has been deprecated, please use MASKED instead.
|
||||
!ERROR: `MASTER` region may not be closely nested inside of `WORKSHARING`, `LOOP`, `TASK`, `TASKLOOP`, or `ATOMIC` region.
|
||||
!$omp master
|
||||
do i = 1, 10
|
||||
@@ -41,7 +41,7 @@ program omp_nest_master
|
||||
!$omp task
|
||||
do i = 1, 10
|
||||
k = k + 1
|
||||
!WARNING: OpenMP directive 'master' has been deprecated, please use 'masked' instead.
|
||||
!WARNING: OpenMP directive MASTER has been deprecated, please use MASKED instead.
|
||||
!ERROR: `MASTER` region may not be closely nested inside of `WORKSHARING`, `LOOP`, `TASK`, `TASKLOOP`, or `ATOMIC` region.
|
||||
!$omp master
|
||||
j = j -1
|
||||
@@ -52,7 +52,7 @@ program omp_nest_master
|
||||
!$omp taskloop
|
||||
do i = 1, 10
|
||||
k = k + 1
|
||||
!WARNING: OpenMP directive 'master' has been deprecated, please use 'masked' instead.
|
||||
!WARNING: OpenMP directive MASTER has been deprecated, please use MASKED instead.
|
||||
!ERROR: `MASTER` region may not be closely nested inside of `WORKSHARING`, `LOOP`, `TASK`, `TASKLOOP`, or `ATOMIC` region.
|
||||
!$omp master
|
||||
j = j -1
|
||||
@@ -63,7 +63,7 @@ program omp_nest_master
|
||||
!$omp target parallel do simd
|
||||
do i = 1, 10
|
||||
k = k + 1
|
||||
!WARNING: OpenMP directive 'master' has been deprecated, please use 'masked' instead.
|
||||
!WARNING: OpenMP directive MASTER has been deprecated, please use MASKED instead.
|
||||
!ERROR: The only OpenMP constructs that can be encountered during execution of a 'SIMD' region are the `ATOMIC` construct, the `LOOP` construct, the `SIMD` construct and the `ORDERED` construct with the `SIMD` clause.
|
||||
!ERROR: `MASTER` region may not be closely nested inside of `WORKSHARING`, `LOOP`, `TASK`, `TASKLOOP`, or `ATOMIC` region.
|
||||
!$omp master
|
||||
@@ -75,7 +75,7 @@ program omp_nest_master
|
||||
!$omp critical
|
||||
do i = 1, 10
|
||||
k = k + 1
|
||||
!WARNING: OpenMP directive 'master' has been deprecated, please use 'masked' instead.
|
||||
!WARNING: OpenMP directive MASTER has been deprecated, please use MASKED instead.
|
||||
!$omp master
|
||||
j = j -1
|
||||
!$omp end master
|
||||
@@ -85,7 +85,7 @@ program omp_nest_master
|
||||
!$omp ordered
|
||||
do i = 1, 10
|
||||
k = k + 1
|
||||
!WARNING: OpenMP directive 'master' has been deprecated, please use 'masked' instead.
|
||||
!WARNING: OpenMP directive MASTER has been deprecated, please use MASKED instead.
|
||||
!$omp master
|
||||
j = j -1
|
||||
!$omp end master
|
||||
@@ -99,7 +99,7 @@ program omp_nest_master
|
||||
!$omp distribute
|
||||
do k =1, 10
|
||||
print *, "hello"
|
||||
!WARNING: OpenMP directive 'master' has been deprecated, please use 'masked' instead.
|
||||
!WARNING: OpenMP directive MASTER has been deprecated, please use MASKED instead.
|
||||
!$omp master
|
||||
j = j -1
|
||||
!$omp end master
|
||||
@@ -116,7 +116,7 @@ program omp_nest_master
|
||||
!$omp distribute
|
||||
do k =1, 10
|
||||
print *, "hello"
|
||||
!WARNING: OpenMP directive 'master' has been deprecated, please use 'masked' instead.
|
||||
!WARNING: OpenMP directive MASTER has been deprecated, please use MASKED instead.
|
||||
!$omp master
|
||||
j = j -1
|
||||
!$omp end master
|
||||
@@ -133,7 +133,7 @@ program omp_nest_master
|
||||
!$omp distribute
|
||||
do k =1, 10
|
||||
print *, "hello"
|
||||
!WARNING: OpenMP directive 'master' has been deprecated, please use 'masked' instead.
|
||||
!WARNING: OpenMP directive MASTER has been deprecated, please use MASKED instead.
|
||||
!ERROR: `MASTER` region may not be closely nested inside of `WORKSHARING`, `LOOP`, `TASK`, `TASKLOOP`, or `ATOMIC` region.
|
||||
!$omp master
|
||||
j = j -1
|
||||
@@ -151,7 +151,7 @@ program omp_nest_master
|
||||
!$omp distribute
|
||||
do k =1, 10
|
||||
print *, "hello"
|
||||
!WARNING: OpenMP directive 'master' has been deprecated, please use 'masked' instead.
|
||||
!WARNING: OpenMP directive MASTER has been deprecated, please use MASKED instead.
|
||||
!ERROR: `MASTER` region may not be closely nested inside of `WORKSHARING`, `LOOP`, `TASK`, `TASKLOOP`, or `ATOMIC` region.
|
||||
!$omp master
|
||||
j = j -1
|
||||
|
||||
@@ -42,7 +42,7 @@ program main
|
||||
!$omp end teams
|
||||
end do
|
||||
|
||||
!WARNING: OpenMP directive 'master' has been deprecated, please use 'masked' instead.
|
||||
!WARNING: OpenMP directive MASTER has been deprecated, please use MASKED instead.
|
||||
!$omp master
|
||||
!ERROR: TEAMS region can only be strictly nested within the implicit parallel region or TARGET region
|
||||
!$omp teams
|
||||
|
||||
@@ -95,7 +95,7 @@ SUBROUTINE ORDERED_BAD(N)
|
||||
|
||||
!$OMP CRITICAL
|
||||
C = C - A * B
|
||||
!WARNING: OpenMP directive 'master' has been deprecated, please use 'masked' instead.
|
||||
!WARNING: OpenMP directive MASTER has been deprecated, please use MASKED instead.
|
||||
!$OMP MASTER
|
||||
DO I = 1,N
|
||||
!ERROR: `ORDERED` region may not be closely nested inside of `CRITICAL`, `ORDERED`, explicit `TASK` or `TASKLOOP` region.
|
||||
@@ -108,7 +108,7 @@ SUBROUTINE ORDERED_BAD(N)
|
||||
|
||||
!$OMP ORDERED
|
||||
C = C - A * B
|
||||
!WARNING: OpenMP directive 'master' has been deprecated, please use 'masked' instead.
|
||||
!WARNING: OpenMP directive MASTER has been deprecated, please use MASKED instead.
|
||||
!$OMP MASTER
|
||||
DO I = 1,N
|
||||
!ERROR: `ORDERED` region may not be closely nested inside of `CRITICAL`, `ORDERED`, explicit `TASK` or `TASKLOOP` region.
|
||||
@@ -121,7 +121,7 @@ SUBROUTINE ORDERED_BAD(N)
|
||||
|
||||
!$OMP TASK
|
||||
C = C - A * B
|
||||
!WARNING: OpenMP directive 'master' has been deprecated, please use 'masked' instead.
|
||||
!WARNING: OpenMP directive MASTER has been deprecated, please use MASKED instead.
|
||||
!ERROR: `MASTER` region may not be closely nested inside of `WORKSHARING`, `LOOP`, `TASK`, `TASKLOOP`, or `ATOMIC` region.
|
||||
!$OMP MASTER
|
||||
DO I = 1,N
|
||||
@@ -136,7 +136,7 @@ SUBROUTINE ORDERED_BAD(N)
|
||||
!$OMP TASKLOOP
|
||||
DO J= 1,N
|
||||
C = C - A * B
|
||||
!WARNING: OpenMP directive 'master' has been deprecated, please use 'masked' instead.
|
||||
!WARNING: OpenMP directive MASTER has been deprecated, please use MASKED instead.
|
||||
!ERROR: `MASTER` region may not be closely nested inside of `WORKSHARING`, `LOOP`, `TASK`, `TASKLOOP`, or `ATOMIC` region.
|
||||
!$OMP MASTER
|
||||
DO I = 1,N
|
||||
|
||||
Reference in New Issue
Block a user