Hello Alban!



 albanD:

My explanation based on the original code is that depending on the amount of computation to be done, different algorithms can be used.
If we focus only on cpu, we have flags like this one that make the choice between using a single thread or OpenMP for multithreaded computations.
…
Is that a more satisfying explanation? 


Yes, I’ll buy that.  Certainly bumping over to an OpenMP algorithm
(or some other size-dependent change of algorithm) would be
expected to change the details of the floating-point result.
(One specific detail doesn’t seem to add up:  Your quoted
#define OMP_THRESHOLD 100000 seems to be too large to trigger
OpenMP for Tuan Ahn’s example, at least for my naive estimates of
what totalElements might be.)
Thanks.
K. Frank