[GiNaC-list] [PATCH] fix bug/feature causing non-deterministic output

Mark Rahner rahner at alum.mit.edu
Sun May 25 07:03:40 CEST 2014

On May 24, 2014, at 6:30 PM, Valery Yundin <yuvalery at gmail.com> wrote:

> On 24 May 2014 10:11, Alexei Sheplyakov wrote:
>> Non-deterministic term order is OK: GiNaC is designed for processing expressions
>> consisting of (many) millions of terms (expressions of this size are very common
>> in high energy physics). The intermediate expressions (which typically are
>> the most sizable) are not going to be printed other than for debugging purposes.
>> Also the output of GiNaC is mostly processed by other programs rather than
>> a human users.
> I happen to know what kind of expressions one can get in high energy
> physics quite well. Determinism has nothing to do with humans reading
> output, but with reproducibility of results. Reproducibility is an
> important property of any computational program, even Monte-Carlo
> simulations are deterministic. Being able to compare two 10G files of
> expressions by simple diff or md5sum/etc is rather convenient.

Non-deterministic term order is most definitely not OK.

Reproducibility of results is a requirement for many disciplines.  Whenever a scientist or engineer changes compute platforms or shares an analysis with coworkers or customers, it’s essential that the analysis be able to be re-validated.  Valery’s example of md5sum comparison is spot on.  This argument isn’t hypothetical - it’s about whether GiNaC can be relied upon when mistakes could cost fortunes and/or lives.  Ensuring deterministic results is the sort of design decision that distinguishes serious tools from cool toys.

FWIW, reproducibility of results is also desirable to support software development.  Alexei specifically alluded to its usefulness for debugging purposes.  It’s obviously desirable for everything associated with a bug report to be reproducible.

GiNaC is an impressive work so I don’t mean to offend anyone.  However, in this case, it’s important that the GiNaC team come to appreciate that determinism is a real world requirement because denying real world requirements only causes pain in the long run.


More information about the GiNaC-list mailing list