[R-SIG-Mac] Rmpfr on M1 Mac cause 'illegal trap'

Simon Urbanek @|mon@urb@nek @end|ng |rom R-project@org
Mon Feb 22 19:40:29 CET 2021


JZ,

Thanks for the report, this is likely due to Rosetta2 not supporting some advanced x86_64 instructions used by Rmpfr. I'll see if I can create a less optimised build of Rmpfr which uses only supported instructions.

Thanks,
Simon


> On Feb 23, 2021, at 07:36, Zhang, Jialin via R-SIG-Mac <r-sig-mac using r-project.org> wrote:
> 
> Hello,
> 
> First time sending an email to this list. Please correct me if I�m doing anything wrong. Thank you!
> 
> I am reporting an error when using Rmpfr::mpfr on an M1 MacBook Air. Codes below:
> 
>> library(Rmpfr)
>> a <- mpfr(1:10, precBits=100)
> 
> *** caught illegal operation ***
> address 0x10daa2bfb, cause 'illegal trap'
> 
> Traceback:
> 1: mpfr.default(1:10, precBits = 100)
> 2: mpfr(1:10, precBits = 100)
> 
> Possible actions:
> 1: abort (with core dump, if enabled)
> 2: normal R exit
> 3: exit R without saving workspace
> 4: exit R saving workspace
> 
>> sessionInfo()
> R version 4.0.4 (2021-02-15)
> Platform: x86_64-apple-darwin17.0 (64-bit)
> Running under: macOS Big Sur 10.16
> 
> Matrix products: default
> BLAS:   /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRblas.dylib
> LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib
> 
> locale:
> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
> 
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
> 
> other attached packages:
> [1] Rmpfr_0.8-2 gmp_0.6-2
> 
> loaded via a namespace (and not attached):
> [1] compiler_4.0.4
> 
> 
> 
> The issue was first published on https://stackoverflow.com/questions/66089887/mpfr-always-crash-r-studio/66321334#66321334. Please let me know if any more info is needed. Thanks!
> 
> Best,
> JZ
> 
>> 
> Jialin Zhang (JZ), Assistant Professor of Statistics
> Department of Mathematics and Statistics
> Mississippi State University
> tel: (662) 325-7137; email: jzhang using math.msstate.edu<mailto:jzhang using math.msstate.edu>
> 
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac



More information about the R-SIG-Mac mailing list