Cross-platform determinism

Post Reply
toolforger
Posts: 6
Joined: Sat Apr 28, 2012 10:11 am

Cross-platform determinism

Post by toolforger »

With "cross-platform determinism", I mean that a simulation will give bit-identical results given the same initial conditions, sources of randomness, on a reasonable selection of platforms (can't expect bug-for-bug compatibility between an ancient 8087 and an AMD Turion).

I see that determinism does come up occationally, but I haven't found any advice on the various web pages that I checked, and I wasn't always sure whether anybody ever talked about cross-platform determinism (CPD), so here goes:

Is Bullet even supposed to have CPD, or is that beyond Bullet's scope?
What parts of Bullet should be avoided since they cannot be made CPD?
What parts of Bullet would need to be used or set up in specific ways to make them CPD?
(The remaining parts would be CPD no matter what.)
If a part of Bullet is CPD, and becomes non-CPD in an update, would that be considered a bug worth fixing? What priority would that fix have, in relation to other bugs?

My use case is that I'm currently exploring possible architectural decisions for a new project, and the availability of CPD would make some choices viable that wouldn't be otherwise.
CookieMonster
Posts: 49
Joined: Sun Jan 29, 2012 10:01 pm

Re: Cross-platform determinism

Post by CookieMonster »

Even on the same version of Windows, different CPUs do floatingpoint calculations in different ways so that the result is noticeably different after a divergent simulation.
toolforger
Posts: 6
Joined: Sat Apr 28, 2012 10:11 am

Re: Cross-platform determinism

Post by toolforger »

@CookieMonster: The game industry reports that you can have cross-platform determinism if you very, very carefully avoid using anything that doesn't follow the IEEE specs to the letter, and avoid a handful of other pitfalls.

So my question isn't whether it's doable; I'm pretty sure that the guys who wrote Age of Empires know what they're talking about, and they say yes they can.
My question is whether Bullet, in whole or in parts, is pursuing that goal.
marios
Posts: 52
Joined: Mon Jul 19, 2010 3:11 am
Contact:

Re: Cross-platform determinism

Post by marios »

I am sure that's possible. Bullet is operating on abstract btScalar numbers which by default are floats. I believe that changing this typedef to some third party manually counted numeric can guarantee cross processor determinism. But this will require some modification in code
Post Reply