Closed
Description
So far the tests are only conducted on GCC 7 and Ubuntu 18.04. Everything works fine.
However, on GCC 8 + CentOS 8 and GCC 8 + Ubuntu 18.04, there are several failed tests and additional warnings.
For example, the result from tests/taskloop_simd.txt
are shown as follows.
- GCC 8 + CentOS 8:
FAILED INPUT: #pragma omp taskloop simd collapse(a) order(dasfe) safelen(sd) simdlen(4) nontemporal(non, temporal) lastprivate(conditional:i, last, private) linear(var(s,f,e):2) linear(s,f,e) aligned(s,f,e) if(taskloop:3456) shared(x,y,z) private (x, n[1:5]) firstprivate (foo(x), y) lastprivate(rt,e,tre) reduction (default, + : a, foo(x)) in_reduction (abc : x, y, z) default(shared) grainsize(8) num_tasks(45) collapse(34) final(890) priority(4) untied mergeable nogroup allocate (user_defined_test : m, n[1:5])
WRONG OUTPUT: #pragma omp taskloop simd if (taskloop: 3456) default (shared) private (x, n[1:5]) firstprivate (foo(x), y) shared (x, y, z) reduction (default, + : a, foo(x)) allocate (user_defined_test: m, n[1:5]) lastprivate (conditional: i, last, private, rt, e, tre) collapse (a, 34) order (dasfe) linear (var(s,f,e), s, f, e:2) safelen (sd) simdlen (4) aligned (s, f, e) nontemporal (non, temporal) final (890) untied mergeable in_reduction (abc : x, y, z) priority (4) grainsize (8) num_tasks (45) nogroup
EXPECTED OUTPUT: #pragma omp taskloop simd if (taskloop: 3456) default (shared) private (x, n[1:5]) firstprivate (foo(x), y) shared (x, y, z) reduction (default, + : a, foo(x)) allocate (user_defined_test: m, n[1:5]) lastprivate (conditional: i, last, private) lastprivate (rt, e, tre) collapse (a, 34) order (dasfe) linear (var(s,f,e):2) linear (s, f, e) safelen (sd) simdlen (4) aligned (s, f, e) nontemporal (non, temporal) final (890) untied mergeable in_reduction (abc : x, y, z) priority (4) grainsize (8) num_tasks (45) nogroup
In this case, lastprivate
and linear
clauses are processed incorrectly.
- GCC 8 + Ubuntu 18.04:
FAILED INPUT: #pragma omp taskloop simd collapse(a) order(dasfe) safelen(sd) simdlen(4) nontemporal(non, temporal) lastprivate(conditional:i, last, private) linear(var(s,f,e):2) linear(s,f,e) aligned(s,f,e) if(taskloop:3456) shared(x,y,z) private (x, n[1:5]) firstprivate (foo(x), y) lastprivate(rt,e,tre) reduction (default, + : a, foo(x)) in_reduction (abc : x, y, z) default(shared) grainsize(8) num_tasks(45) collapse(34) final(890) priority(4) untied mergeable nogroup allocate (user_defined_test : m, n[1:5])
WRONG OUTPUT: #pragma omp taskloop simd if (taskloop: 3456) default (shared) private (x, n[1:5]) firstprivate (foo(x), y) shared (x, y, z) reduction (default, + : a, foo(x)) allocate (user_defined_test: m, n[1:5]) lastprivate (conditional: i, last, private) lastprivate (rt, e, tre) collapse (a, 34) order (dasfe) linear (var(s,f,e), s, f, e:2) safelen (sd) simdlen (4) aligned (s, f, e) nontemporal (non, temporal) final (890) untied mergeable in_reduction (abc : x, y, z) priority (4) grainsize (8) num_tasks (45) nogroup
EXPECTED OUTPUT: #pragma omp taskloop simd if (taskloop: 3456) default (shared) private (x, n[1:5]) firstprivate (foo(x), y) shared (x, y, z) reduction (default, + : a, foo(x)) allocate (user_defined_test: m, n[1:5]) lastprivate (conditional: i, last, private) lastprivate (rt, e, tre) collapse (a, 34) order (dasfe) linear (var(s,f,e):2) linear (s, f, e) safelen (sd) simdlen (4) aligned (s, f, e) nontemporal (non, temporal) final (890) untied mergeable in_reduction (abc : x, y, z) priority (4) grainsize (8) num_tasks (45) nogroup
In this case, lastprivate
clause is fine. Only linear
clause has the wrong result.
To fix the bug, we need to trace all relevant steps in the source code and figure out which exact step caused the issue.
Metadata
Assignees
Labels
No labels