rmpfr

mpfr always crash R studio


Second Update on Feb 22, 2021:

When running the codes in R outside RStudio:

> 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

Update on Feb 22, 2021:

R is updated to 4.0.4 and the issue is still there.


Added:

> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 10.16

Matrix products: default
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] OBsMD_6.1    Rmpfr_0.8-2  gmp_0.6-2    gtools_3.8.2

loaded via a namespace (and not attached):
[1] compiler_4.0.3 tools_4.0.3  

- Update: It turns out that the same codes run well on my intel iMac, but cannot run on my M1 Macbook. Any help that can make this run on M1 is greatly appreciated!


When I am running the following codes, my R Studio always crashes when I create the a. Does the same thing happen to you? Any help? Thanks!

library(gtools)
library(Rmpfr)
library(OBsMD)

DecimalDigits=10^4

a <- mpfr(c(1:10), precBits = DecimalDigits)

My R version is 4.0.3.


Solution

  • "R on the Mac" has a dedicated mailing list --> https://stat.ethz.ch/mailman/listinfo/r-sig-mac/

    The R Core developers are there, and they and others have been talking about R on the 'M1' and related issues for many weeks now... I'd be interested what they find about Rmpfr and if/when it's crashing R. Yes, I'm interested as maintainer("Rmpfr")