OP2/PyOP2 — pull request #366 by wence- (2014-04-29 17:14:16+00:00)
Title: Fix semantics of multiple par_loops INCing into a Global

Consider the following:

par_loop(count, set, glob(INC))

par_loop(count, set2, glob(INC))

Where count is a kernel that increments its argument by one. After
execution of these par_loops, we expect to see a value of set.size +
set2.size in glob. However, in parallel we see something larger than
this. This is because the first loop performs a parallel reduction such
that glob takes the global value of the set size. This is used to
initialise the reduction for the second loop which is wrong. Instead,
create a temporary Global with value zero (the identity for summation)
and sum this reduced value into the output Global when done.