JuliaRandom / Random123.jl

Julia implementation of Random123.
http://juliarandom.github.io/RandomNumbers.jl/stable/man/random123/
Other
18 stars 5 forks source link

Freezing precompilation #19

Closed MilesCranmer closed 10 months ago

MilesCranmer commented 10 months ago

On Julia 1.10 there are issues related to opening persistent I/O during precompilation.

I just installed julia-1.10-rc2 and now am seeing hanging precompilation on my entire base environment due to Random123 (which is an indirect dependency). Here is my system:

julia> versioninfo()
Julia Version 1.10.0-rc2
Commit dbb9c46795b (2023-12-03 15:25 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: macOS (arm64-apple-darwin22.4.0)
  CPU: 8 × Apple M1 Pro
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, apple-m1)
  Threads: 8 on 6 virtual cores
Environment:
  JULIA_FORMATTER_SO = /Users/mcranmer/julia_formatter.so
  JULIA_NUM_THREADS = auto
  JULIA_EDITOR = code

Related to #18 with @IanButterworth and @sunoru.

Is it potentially due to the following const which opens a process?

https://github.com/JuliaRandom/Random123.jl/blob/8341084634495f429dae3711f4683fe0497fafb4/src/Random123.jl#L34-L42

sunoru commented 10 months ago

Hi, thanks for reporting this. I don't have an ARM Mac at hand to test but that is probably the cause. I will release a patch to skip these lines on those platforms for now. Please let me know if the problem is fixed after https://github.com/JuliaRegistries/General/pull/97519 is merged.

Ideally, we should also implement those RNGs on ARM64 (#20), but I have been too busy recently to look into that.

MilesCranmer commented 10 months ago

That fixed it, thanks for the quick turnaround!!