On Fri, Oct 09, 2015 at 09:38:40AM -0700, Aldy Hernandez wrote: > As per our IRC discussion. > > I am conditionally compiling the verification code because you mentioned > that the GPGPUs may not having a working printf.
Both that and code size being important there. > Also, I removed the code caching the workgroup since it may contain the > incorrect workgroup as I had suggested. Now instead we look in > child_task->taskgroup which will have the correct workgroup always. > > Tested on x86-64 Linux with make check-target-libgomp for a variety of > different OMP_NUM_THREADS and with _ENABLE_LIBGOMP_CHECKING_ set to 1. > > OK for branch? Yes, with a small change (just compile test with -D_ENABLE_LIBGOMP_CHECKING_=1, no need to retest otherwise): > p.s. As a thought, maybe we can set _ENABLE_LIBGOMP_CHECKING_ to 1 until > release? I'd prefer not to, it will affect the timing and slow down already slow testing of libgomp for everybody. > --- a/libgomp/task.c > +++ b/libgomp/task.c > @@ -27,6 +27,7 @@ > creation and termination. */ > > #include "libgomp.h" > +#include <stdio.h> Please nuke the above. > + if (task->parent != parent) > + { > + fprintf (stderr, "verify_children_queue: incompatible parents\n"); > + abort (); > + } and just use if (task->parent != parent) gomp_fatal ("verify_children_queue: incompatible parents"); instead. Note no \n at the end. Ditto for all other fprintf + abort pairs. gomp_fatal accepts printf style formatting string, so you can even handle it in: > + fprintf (stderr, "verify_taskgroup_queue: incompatible taskgroups\n"); > + fprintf (stderr, "%p %p\n", task->taskgroup, taskgroup); > + abort (); this case, just use a single fmt string, and just use space instead of \n in the middle. Jakub