This works as well, I like I can choose to have a (a) random script, (b) deterministic script with individually random functions (same run of the script/model, same output) or (c) deterministic functions (same call with same input, same output), but it requires Julia >= 1.5:
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Is `rand()` threadsafe? | 13 | 4998 | September 4, 2019 | |
| Multithreaded random: different behaviour in Julia >= 1.5 (not just different stream) | 6 | 596 | March 23, 2021 | |
| Random numbers and threads | 30 | 4048 | March 29, 2022 | |
| Is this pattern still thread safe in Julia 1.12? | 14 | 625 | October 29, 2025 | |
| Best practices for using random number generators with threads | 0 | 433 | December 11, 2019 |