I am currently working on a (legacy) programme that has been written in C++ and C#; it executes some heavyweight calculations but should be completly deterministic. i.e. the same inputs will yeild the same outputs… Problem is that 2 runs (on the same computer, using the same compiled executable) produce slightly different outputs.
The application reads and writes to a SQL server database (it has unique access to the DB so nothing else should be interfering with the DB values).
The only obvious difference between runs is that they are each assigned a unique name (just a string variable).
There are no random objects within the code and all loops run for either a pre-determined number of iterations or until a condition is met, they don’t run for a certain amount of time.There is a small amount of multi-threading, which I have been assured is thread-safe, but I will check this for myself.
Are there any other obvious things that I should be looking for, which would cause this deviant behaviour?
Two ideas occur to me:
The latter point can yield machine accuracy level differences under multi-threading. It’s much more likely to be uninitiased variables though!