From 34ed94c0df6eb8e1f872b0e60028fea7911fe532 Mon Sep 17 00:00:00 2001 From: amonakov Date: Tue, 2 Feb 2016 18:15:58 +0000 Subject: [PATCH] libgomp: fix teams-3/4 testcases * testsuite/libgomp.c/examples-4/teams-3.c: Add missing reduction clause. * testsuite/libgomp.c/examples-4/teams-4.c: Likewise. * testsuite/libgomp.fortran/examples-4/teams-3.f90: Add missing reduction and map clauses. * testsuite/libgomp.fortran/examples-4/teams-4.f90: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233086 138bc75d-0d04-0410-961f-82ee72b054a4 --- libgomp/ChangeLog | 9 +++++++++ libgomp/testsuite/libgomp.c/examples-4/teams-3.c | 3 ++- libgomp/testsuite/libgomp.c/examples-4/teams-4.c | 2 +- libgomp/testsuite/libgomp.fortran/examples-4/teams-3.f90 | 3 ++- libgomp/testsuite/libgomp.fortran/examples-4/teams-4.f90 | 4 ++-- 5 files changed, 16 insertions(+), 5 deletions(-) diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 4228b1428f83..db5710a57f3e 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,12 @@ +2016-02-02 Alexander Monakov + + * testsuite/libgomp.c/examples-4/teams-3.c: Add missing reduction + clause. + * testsuite/libgomp.c/examples-4/teams-4.c: Likewise. + * testsuite/libgomp.fortran/examples-4/teams-3.f90: Add missing + reduction and map clauses. + * testsuite/libgomp.fortran/examples-4/teams-4.f90: Likewise. + 2016-02-02 James Norris * testsuite/libgomp.oacc-c-c++-common/declare-4.c: Fix clause. diff --git a/libgomp/testsuite/libgomp.c/examples-4/teams-3.c b/libgomp/testsuite/libgomp.c/examples-4/teams-3.c index 5fe63a68a4b3..092d386dea5b 100644 --- a/libgomp/testsuite/libgomp.c/examples-4/teams-3.c +++ b/libgomp/testsuite/libgomp.c/examples-4/teams-3.c @@ -31,7 +31,8 @@ float dotprod (float B[], float C[], int n) int i; float sum = 0; - #pragma omp target teams map(to: B[0:n], C[0:n]) map(tofrom: sum) + #pragma omp target teams map(to: B[0:n], C[0:n]) \ + map(tofrom: sum) reduction(+:sum) #pragma omp distribute parallel for reduction(+:sum) for (i = 0; i < n; i++) sum += B[i] * C[i]; diff --git a/libgomp/testsuite/libgomp.c/examples-4/teams-4.c b/libgomp/testsuite/libgomp.c/examples-4/teams-4.c index 6136eabef66a..d0c586c944e7 100644 --- a/libgomp/testsuite/libgomp.c/examples-4/teams-4.c +++ b/libgomp/testsuite/libgomp.c/examples-4/teams-4.c @@ -32,7 +32,7 @@ float dotprod (float B[], float C[], int n) float sum = 0; #pragma omp target map(to: B[0:n], C[0:n]) map(tofrom:sum) - #pragma omp teams num_teams(8) thread_limit(16) + #pragma omp teams num_teams(8) thread_limit(16) reduction(+:sum) #pragma omp distribute parallel for reduction(+:sum) \ dist_schedule(static, 1024) \ schedule(static, 64) diff --git a/libgomp/testsuite/libgomp.fortran/examples-4/teams-3.f90 b/libgomp/testsuite/libgomp.fortran/examples-4/teams-3.f90 index 2588d8bb6842..9de77afd7d2a 100644 --- a/libgomp/testsuite/libgomp.fortran/examples-4/teams-3.f90 +++ b/libgomp/testsuite/libgomp.fortran/examples-4/teams-3.f90 @@ -14,7 +14,8 @@ function dotprod (B, C, N) result(sum) real :: B(N), C(N), sum integer :: N, i sum = 0.0e0 - !$omp target teams map(to: B, C) + !$omp target teams map(to: B, C) map(tofrom: sum) & + !$omp& reduction(+:sum) !$omp distribute parallel do reduction(+:sum) do i = 1, N sum = sum + B(i) * C(i) diff --git a/libgomp/testsuite/libgomp.fortran/examples-4/teams-4.f90 b/libgomp/testsuite/libgomp.fortran/examples-4/teams-4.f90 index efae3c3cc206..8d4eb5530e88 100644 --- a/libgomp/testsuite/libgomp.fortran/examples-4/teams-4.f90 +++ b/libgomp/testsuite/libgomp.fortran/examples-4/teams-4.f90 @@ -14,8 +14,8 @@ function dotprod (B, C, n) result(sum) real :: B(N), C(N), sum integer :: N, i sum = 0.0e0 - !$omp target map(to: B, C) - !$omp teams num_teams(8) thread_limit(16) + !$omp target map(to: B, C) map(tofrom: sum) + !$omp teams num_teams(8) thread_limit(16) reduction(+:sum) !$omp distribute parallel do reduction(+:sum) & !$omp& dist_schedule(static, 1024) schedule(static, 64) do i = 1, N -- 2.47.3