-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It seems that the Dense(M, N, min, max)
constructor is not completely random.
#70
Comments
Thanks for reporting the bug. I'll check and fix it next week. |
This is due to the fact that random_device is declared thread-local.
On the other hand, the I will parallelize all functions, declaring the random_vector variable as a local variable of the thread. |
I used the following test program to test it. This is not included in
|
I have fixed the bug with the following commit. Thanks for your reports! |
Quick and appropriate fix! Thank you. |
Running the following simple program
will produce results like this.
The arrows (
<--
) indicate that the number is repeating.This is probably due to that the pseudo-random number generator does not split well when it is parallelized by OpenMP.
monolish/src/utils/dense_constructor.cpp
Lines 120 to 127 in 1b89942
This may happen not only with Dense, but also with random constructors of other data structures.
I tested this on docker image
ghcr.io/ricosjp/monolish/mkl:0.14.1
.The text was updated successfully, but these errors were encountered: