Skip to content

Commit

Permalink
[bug] avoid using the same RNG seed when -E -1 on multiple GPUs
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Aug 7, 2024
1 parent 3c480b6 commit 5cc92ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mcx_core.cu
Original file line number Diff line number Diff line change
Expand Up @@ -3163,7 +3163,7 @@ void mcx_run_simulation(Config* cfg, GPUInfo* gpu) {
if (cfg->seed > 0) {
srand(cfg->seed + threadid);
} else {
srand(time(0));
srand(time(0) + threadid);
}

for (i = 0; i < gpu[gpuid].autothread; i++) {
Expand Down

0 comments on commit 5cc92ab

Please sign in to comment.