The good news is that it works fine in the last arm64 R-devel version:

> a <- mpfr(1:10, precBits=100)
> a
10 'mpfr' numbers of precision  100   bits 
 [1]  1  2  3  4  5  6  7  8  9 10
> sessionInfo()
R Under development (unstable) (2021-02-18 r80027)
Platform: aarch64-apple-darwin20.0 (64-bit)
Running under: macOS Big Sur 11.2.1

Matrix products: default
BLAS:   
/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/lib/libRblas.dylib
LAPACK: 
/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/lib/libRlapack.dylib

Random number generation:
 RNG:     Mersenne-Twister 
 Normal:  Inversion 
 Sample:  Rounding 
 
locale:
[1] fr_FR.UTF-8/fr_FR.UTF-8/fr_FR.UTF-8/C/fr_FR.UTF-8/fr_FR.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.1.0 tools_4.1.0   



> Le 22 févr. 2021 à 19:46, Richard M. Heiberger <[email protected]> a écrit :
> 
> I confirm the error on Mac M1
> R version 4.0.4 RC (2021-02-12 r79998) -- "Lost Library Book"
> 
> I also ran it on an intel Mac with R 4.0.3
> and it worked correctly there.
> 
> ________________________________________
> From: R-SIG-Mac <[email protected]> on behalf of Zhang, Jialin 
> via R-SIG-Mac <[email protected]>
> Sent: Monday, February 22, 2021 1:36 PM
> To: [email protected]
> Subject: [External] [R-SIG-Mac] Rmpfr on M1 Mac cause 'illegal trap'
> 
> 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: 
> [email protected]<mailto:[email protected]>
> 
> 
>        [[alternative HTML version deleted]]
> 
> _______________________________________________
> R-SIG-Mac mailing list
> [email protected]
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac

_______________________________________________
R-SIG-Mac mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Reply via email to