HPCE / hpce-2017-cw5

1 stars 6 forks source link

Is make serenity_now unstable? #13

Closed adamsolomou closed 6 years ago

adamsolomou commented 6 years ago

I am working on the gaussian_blur.hpp puzzle. After doing some modifications in the code I run make serenity_now (after doing make all) and I get the following results:

screen shot 2017-11-13 at 20 07 43

run_puzzle reports that output is correct and then compare_puzzle reports that outputs are different.

I then re-run make serenity_now without re-building and I get the following results:

screen shot 2017-11-13 at 20 08 05

run_puzzle reports that output is correct and then compare_puzzle reports that outputs are correct.

So my question is how is it possible for one run of the test to show that outputs are different and the next run to show that they are correct?

I was expecting the result to be wrong since I deliberately parallelised over a loop that should lead to a race condition:

x = 0; 
par_for i=0:N{
contribution = some calculation;
x += contribution
}
m8pple commented 6 years ago

From memory, Gaussian blur is set up to have time dependent random inputs, so each time you run create_input you'll get different inputs. There is also some quality slack included in the result comparison.

So I think it is quite feasible to get different results, especially if you're trying to look at non deterministic modes of operation.