Closed oschulz closed 3 years ago
Thank you for finding this!
Thanks a lot for the quick merge and release, @sunoru !
@maleadt in case you have GPU-related plans here, should I rewrite inc_counter!
in a branch-free fashion? Shouldn't be too hard.
The GPU implementation is a bit special, I currently set ctr2
to the thread ID, https://github.com/JuliaGPU/CUDA.jl/blob/537be6c430decca43d3b4c3fafc09d445f29040c/src/device/random.jl#L75-L80, and only increment ctr1
, https://github.com/JuliaGPU/CUDA.jl/blob/537be6c430decca43d3b4c3fafc09d445f29040c/src/device/random.jl#L138; so I don't use inc_counter!
.
Random123 v1.4.0 now increments all counter fields (I think #5 can be closed now), but does so incorrectly for R123Generator4x generators: it increments
ctr3
in parallel withctr1
:This break applications (like BAT.jl) that partition the counter space for reproducible parallel processing.
PR contains a fix and increases the package version as well.
@sunoru I'd be super grateful for a quick merge and a v1.4.1 bugfix release, since BAT.jl is currently broken due to this.