Message ID | 562A1099.4030108@mentor.com |
---|---|
State | New |
Headers | show |
On Fri, Oct 23, 2015 at 12:48:57PM +0200, Tom de Vries wrote: > Hi Jakub, > > this patch adds a missing private clause in libgomp.c++/member-2.C (as you > suggested in the PR). > > This allows the test to succeed consistently. > > Committed to trunk. Thanks. > Add missing private clause in libgomp.c++/member-2.C > > 2015-10-23 Tom de Vries <tom@codesourcery.com> > > PR testsuite/68063 > * testsuite/libgomp.c++/member-2.C (A::m1): Add missing private clause. Jakub
Hi Jakub! On Fri, 23 Oct 2015 12:48:57 +0200, Tom de Vries <Tom_deVries@mentor.com> wrote: > this patch adds a missing private clause in libgomp.c++/member-2.C (as > you suggested in the PR). > > This allows the test to succeed consistently. I'm seeing occasional (very rarely) failure of libgomp.c++/member-1.C (without anything in libgomp.log, unfortunately). I have not made an attempt to properly understand what it's doing, but this: [...] 150 #pragma omp parallel private (f) 151 { 152 f = false; 153 #pragma omp single 154 #pragma omp taskloop lastprivate (a, t, b, n) 155 for (int i = 0; i < 30; i++) 156 { 157 int q = omp_get_thread_num (); 158 if (f && (a != 7 * q || b != 8 * q || r != 9 * q || t != 10 * q)) 159 __builtin_abort (); 160 take (a, r, t, b); 161 A::a = 7 * q; 162 A::b = 8 * q; 163 R::r = 9 * q; [...] ... looks a bit as if it might need to get the same patch applied that Tom has applied to libgomp.c++/member-2.C: > --- a/libgomp/testsuite/libgomp.c++/member-2.C > +++ b/libgomp/testsuite/libgomp.c++/member-2.C > @@ -154,7 +154,7 @@ A<Q>::m1 () > { > f = false; > #pragma omp single > - #pragma omp taskloop lastprivate (a, T<Q>::t, b, n) > + #pragma omp taskloop lastprivate (a, T<Q>::t, b, n) private (R::r) > for (int i = 0; i < 30; i++) > { > int q = omp_get_thread_num (); Could you please review that, and while at it, could there possibly be any other races of r or R::r, or other objects? Grüße Thomas
On Tue, Oct 27, 2015 at 10:15:11AM +0100, Thomas Schwinge wrote: > ... looks a bit as if it might need to get the same patch applied that > Tom has applied to libgomp.c++/member-2.C: You're right, member-2.C is a templatized version of member-1.C, a change to add private (R::r) to that corresponding member-1.C taskloop directive is preapproved. The other member-*.C testcases don't have this issue. Jakub
Add missing private clause in libgomp.c++/member-2.C 2015-10-23 Tom de Vries <tom@codesourcery.com> PR testsuite/68063 * testsuite/libgomp.c++/member-2.C (A::m1): Add missing private clause. --- libgomp/testsuite/libgomp.c++/member-2.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libgomp/testsuite/libgomp.c++/member-2.C b/libgomp/testsuite/libgomp.c++/member-2.C index bb348d8..bbe2bdf4 100644 --- a/libgomp/testsuite/libgomp.c++/member-2.C +++ b/libgomp/testsuite/libgomp.c++/member-2.C @@ -154,7 +154,7 @@ A<Q>::m1 () { f = false; #pragma omp single - #pragma omp taskloop lastprivate (a, T<Q>::t, b, n) + #pragma omp taskloop lastprivate (a, T<Q>::t, b, n) private (R::r) for (int i = 0; i < 30; i++) { int q = omp_get_thread_num (); -- 1.9.1