Closed RainerEngelken closed 7 years ago
Ok, thanks. Just for the record if somebody has the same problem, the following procedure solved it:
Delete Pkg.dir("Rmath","deps","usr")
and Pkg.dir("Rmath","deps","src")
and Pkg.dir("Rmath","deps","downloads")
and Pkg.dir("Rmath","deps","deps.jl")
,
do sudo rm /usr/lib/libRmath-julia.so
, sudo rm /usr/lib/libRmath-julia.so.2
then do Pkg.build("Rmath"). After restart julia, libRmath can be seeded by srand().
Distributions.jl uses libRmath to sample from various distributions e.g. Binomial, Poisson, Beta, Hypergeometric, Gamma and Dirichlet. libRmath uses the global stream of dSFMT, which is not seeded by srand. Thus, sampling from several distributions is not reproducible, which is problematic e.g. for scientific computing. For example, the following throws an error in Version 0.5.1 and 0.6.0-pre.beta.215 and 0.7.0-DEV.49 but not in 0.4.7:
This was problem was solved for version 0.4 by @rfourquet (https://github.com/JuliaLang/julia/issues/9124) but seems to have reappeared in version 0.5. A earlier solution for seeding dSFMT was:
but it does not to solve the problem both in version 0.5.1 and in version 0.6.0. I use version 0.12.5 of Distributions in Julia 0.5, 0.6 and 0.7 and version 0.11.1 in Julia 0.4.7.