amnsbr / cubnm

A toolbox for biophysical network modeling on GPUs
https://cubnm.readthedocs.io
BSD 3-Clause "New" or "Revised" License
7 stars 3 forks source link

[BUG] Simulations not reproducible across some platforms #22

Open amnsbr opened 2 months ago

amnsbr commented 2 months ago

Using the development Docker container (both in Docker and Singularity) the generated simulations are different from the ones that are generated on other machines including Juseless, Colab and Kaggle, as well as the stable release container. This is probably not because of differences in compilation, since installing the exact same wheel on e.g. Juseless vs. the Docker container creates different simulations. The most likely culprit for the difference is the difference of random number sequences caused by the different libraries in each platform. From what I've learned the standard C++ random number generators are not guaranteed to be reproducible across platforms. Instead random number generators from e.g. boost library might be [ref]. Therefore using boost's random number generator may be a solution.