JuliaRandom / Random123.jl

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

Build failure on ARM aarch64 with Julia v1.6.0-beta1 #4

Closed oschulz closed 3 years ago

oschulz commented 3 years ago

Building Random123 on aarch64 with Julia v1.6.0-beta1 fails with

error: couldn't allocate output register for constraint '{ax}'
oschulz commented 3 years ago

@sunoru , are you still maintaining this package? I have some code that depends on Random123 a lot.

sunoru commented 3 years ago

Ah, yes, I am still maintaining it. Let me look into the problem.

BTW, I'm sorry I missed the other issue and will look into that as well.

oschulz commented 3 years ago

Thanks @sunoru !

sunoru commented 3 years ago

Looks like there have been some changes in the intrinsic functions, so the AESNI and ARS generators don't work on many platforms right now. Do you have to use these two RNGs? If not, I think you can just use the other RNGs normally, while I'm fixing this problem.

oschulz commented 3 years ago

No, I don't use AESNI and ARS, but the problem is that the package won't build properly without them, blocking the build process of other packages. Do you think it would make sense to split the package in two, a pure-Julia one for Philox & friends and another one with binary deps for AESNI and ARS?

sunoru commented 3 years ago

Sorry I missed your reply again...! Please update the package after the new version is registered: https://github.com/JuliaRegistries/General/pull/28454

Originally I added a method to control if AESNI and ARS are enabled by setting an environment variable and rebuilding the package, but then I found that in newer versions of Julia, it appears to be unstable on all the platforms (and it is so complicated to debug that I want to refactor related code sometime). Therefore, all the parts of this package that are relying on AES-NI are disabled for now.

pkofod commented 3 years ago

Hi @sunoru ! Just pinging you because you need to update your compact bounds as mentioned in the General PR. Thanks

oschulz commented 3 years ago

@sunoru Seems to run fine now on aarch64 with Julia v1.6.0-beta1 - thanks a lot!

sunoru commented 3 years ago

@oschulz glad to hear that!

I have been refactoring the AES-NI related RNGs using pure Julia (without any binary dependencies) and it seems to work well on different platforms. A new release will also be published soon.

oschulz commented 3 years ago

Oh, very cool! I think Random123 is very important, since it allows for reproducible random number generation in parallel applications.