Re: [R-SIG-Mac] [External] [External] Rmpfr crashes on Mac
works normally on Mac M1. > On Nov 29, 2021, at 00:43, Kevin Ushey wrote: > > library(Rmpfr) > x <- mpfr(-50.1, 200) > str(x) > ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] [External] Rmpfr crashes on Mac
Okay, I've reproduced the crash on my 2013 Intel MacBook Pro. In this case, the issue reproduces more readily because RStudio is calling str() behind the scenes (which is the cause of the crash in this case). So, a plain R reproducible example: library(Rmpfr) x <- mpfr(-50.1, 200) str(x) and I see: > str(x) Class 'mpfr' [package "Rmpfr"] of length 1 and precision 200 *** caught illegal operation *** address 0x112833ed5, cause 'illegal opcode' Traceback: 1: .mpfr2str(x, digits, maybe.full = maybe.full, base = base) 2: formatMpfr(object, digits = digits.d, drop0trailing = drop0trailing, ...) 3: str.mpfr(x) 4: str(x) >From lldb: * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) frame #0: 0x000107ec7ed5 Rmpfr.so`mpfr_get_str_aux + 165 Rmpfr.so`mpfr_get_str_aux: -> 0x107ec7ed5 <+165>: adcxq %rsi, %rcx 0x107ec7edb <+171>: movq %r10, %rdi 0x107ec7ede <+174>: movq %r8, %rsi 0x107ec7ee1 <+177>: movq %r10, %rbx and relevant part of the backtrace: (lldb) bt * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) * frame #0: 0x000107ec7ed5 Rmpfr.so`mpfr_get_str_aux + 165 frame #1: 0x000107ec78da Rmpfr.so`mpfr_get_str + 2890 frame #2: 0x000107eb9c9e Rmpfr.so`mpfr2str(x=0x0001053ed768, digits=, maybeFull=, base=) at convert.c:608:2 [opt] < ... > If I understand correctly, 'adcx' was introduced with Broadwell CPUs (so, October 2014) and so that could explain why I'm seeing this crash. It'd be helpful if others could try to verify with newer / older macOS machines, though. > sessionInfo() R version 4.1.2 (2021-11-01) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Big Sur 10.16 Best, Kevin On Sun, Nov 28, 2021 at 6:22 PM Simon Urbanek wrote: > Kevin, > > that is a different story, yes, Rosetta2 is incomplete - the advice on M1 > is to use native R. > > Cheers, > Simon > > > > On Nov 29, 2021, at 12:30 PM, Kevin Ushey wrote: > > > > I can reproduce something similar on my M1 macOS machine, when using the > > x86_64 build of R. I see: > > > >> x1 <- mpfr(-50, 200) > > *** caught illegal operation *** > > address 0x10c5f623b, cause 'illegal opcode' > > > > This is with the binary of Rmpfr 0.8-7 as from CRAN, with R 4.1.2. Here's > > what LLDB says: > > > > * thread #1, queue = 'com.apple.main-thread', stop reason = > > EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) > >frame #0: 0x00010f69c23b Rmpfr.so`mpfr_set_d + 43 > > Rmpfr.so`mpfr_set_d: > > -> 0x10f69c23b <+43>: vucomisd %xmm0, %xmm0 > >0x10f69c23f <+47>: jp 0x10f69c39a ; <+394> > >0x10f69c245 <+53>: vpxor %xmm1, %xmm1, %xmm1 > >0x10f69c249 <+57>: vucomisd %xmm1, %xmm0 > > > > And the relevant part of the stack trace: > > > > (lldb) bt > > * thread #1, queue = 'com.apple.main-thread', stop reason = > > EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) > > * frame #0: 0x00010f69c23b Rmpfr.so`mpfr_set_d + 43 > >frame #1: 0x00010f6809d3 Rmpfr.so`d2mpfr1_(x=-50, > > i_prec=, rnd=MPFR_RNDN) at convert.c:129:5 [opt] > >frame #2: 0x00010f680eb0 Rmpfr.so`d2mpfr1_list(x=, > > prec=, rnd_mode=) at convert.c:186:29 [opt] > > > > At least for my case, my guess is that the 'vucomisd' instruction isn't > > available via Apple's Rosetta emulation. It's possible users with older > > macOS machines not supporting AVX instructions could see this, as well? > > > > Best, > > Kevin > > > > On Sun, Nov 28, 2021 at 9:54 AM Richard M. Heiberger > wrote: > > > >> Works normally in R-4.1.2 with Rmpfr_0.8-7 on Macintosh > >> aarch64-apple-darwin20 > >> I am running inside Emacs using ESS > >> > >>> packageVersion("Rmpfr") > >> [1] ‘0.8.7’ > >>> library(Rmpfr) > >> Loading required package: gmp > >> > >> Attaching package: ‘gmp’ > >> > >> The following objects are masked from ‘package:base’: > >> > >>%*%, apply, crossprod, matrix, tcrossprod > >> > >> C code of R package 'Rmpfr': GMP using 64 bits per limb > >> > >> > >> Attaching package: ‘Rmpfr’ > >> > >> The following object is masked from ‘package:gmp’: > >> > >>outer > >> > >> The following objects are masked from ‘package:stats’: > >> > >>dbinom, dgamma, dnbinom, dnorm, dpois, dt, pnorm > >> > >> The following objects are masked from ‘package:base’: > >> > >>cbind, pmax, pmin, rbind > >> > >>> x1 <- mpfr(-50, 200) > >>> x1 > >> 1 'mpfr' number of precision 200 bits > >> [1] -50 > >>> x2 <- mpfr(-50.1, 200) > >>> x2 > >> 1 'mpfr' number of precision 200 bits > >> [1] -50.10142108547152020037174224853515625 > >>> version > >> _ > >> platform aarch64-apple-darwin20 > >> arch aarch64 > >> os darwin20 > >> system aarch64, darwin20 > >> status > >> major 4 > >> minor 1.2 > >> year 2021 > >> month 11 > >> day01 > >> svn rev
Re: [R-SIG-Mac] [External] Rmpfr crashes on Mac
Kevin, that is a different story, yes, Rosetta2 is incomplete - the advice on M1 is to use native R. Cheers, Simon > On Nov 29, 2021, at 12:30 PM, Kevin Ushey wrote: > > I can reproduce something similar on my M1 macOS machine, when using the > x86_64 build of R. I see: > >> x1 <- mpfr(-50, 200) > *** caught illegal operation *** > address 0x10c5f623b, cause 'illegal opcode' > > This is with the binary of Rmpfr 0.8-7 as from CRAN, with R 4.1.2. Here's > what LLDB says: > > * thread #1, queue = 'com.apple.main-thread', stop reason = > EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) >frame #0: 0x00010f69c23b Rmpfr.so`mpfr_set_d + 43 > Rmpfr.so`mpfr_set_d: > -> 0x10f69c23b <+43>: vucomisd %xmm0, %xmm0 >0x10f69c23f <+47>: jp 0x10f69c39a ; <+394> >0x10f69c245 <+53>: vpxor %xmm1, %xmm1, %xmm1 >0x10f69c249 <+57>: vucomisd %xmm1, %xmm0 > > And the relevant part of the stack trace: > > (lldb) bt > * thread #1, queue = 'com.apple.main-thread', stop reason = > EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) > * frame #0: 0x00010f69c23b Rmpfr.so`mpfr_set_d + 43 >frame #1: 0x00010f6809d3 Rmpfr.so`d2mpfr1_(x=-50, > i_prec=, rnd=MPFR_RNDN) at convert.c:129:5 [opt] >frame #2: 0x00010f680eb0 Rmpfr.so`d2mpfr1_list(x=, > prec=, rnd_mode=) at convert.c:186:29 [opt] > > At least for my case, my guess is that the 'vucomisd' instruction isn't > available via Apple's Rosetta emulation. It's possible users with older > macOS machines not supporting AVX instructions could see this, as well? > > Best, > Kevin > > On Sun, Nov 28, 2021 at 9:54 AM Richard M. Heiberger wrote: > >> Works normally in R-4.1.2 with Rmpfr_0.8-7 on Macintosh >> aarch64-apple-darwin20 >> I am running inside Emacs using ESS >> >>> packageVersion("Rmpfr") >> [1] ‘0.8.7’ >>> library(Rmpfr) >> Loading required package: gmp >> >> Attaching package: ‘gmp’ >> >> The following objects are masked from ‘package:base’: >> >>%*%, apply, crossprod, matrix, tcrossprod >> >> C code of R package 'Rmpfr': GMP using 64 bits per limb >> >> >> Attaching package: ‘Rmpfr’ >> >> The following object is masked from ‘package:gmp’: >> >>outer >> >> The following objects are masked from ‘package:stats’: >> >>dbinom, dgamma, dnbinom, dnorm, dpois, dt, pnorm >> >> The following objects are masked from ‘package:base’: >> >>cbind, pmax, pmin, rbind >> >>> x1 <- mpfr(-50, 200) >>> x1 >> 1 'mpfr' number of precision 200 bits >> [1] -50 >>> x2 <- mpfr(-50.1, 200) >>> x2 >> 1 'mpfr' number of precision 200 bits >> [1] -50.10142108547152020037174224853515625 >>> version >> _ >> platform aarch64-apple-darwin20 >> arch aarch64 >> os darwin20 >> system aarch64, darwin20 >> status >> major 4 >> minor 1.2 >> year 2021 >> month 11 >> day01 >> svn rev81115 >> language R >> version.string R version 4.1.2 (2021-11-01) >> nickname Bird Hippie >>> >> >>> On Nov 27, 2021, at 15:46, Dev Chakraborty wrote: >>> >>> I used package Rmpfr ca. 2017 and it worked fine. The latest version >>> (0.8-7) causes R (running under RStudio) to crash. A simple example is: >>> >>> library(Rmpfr) >>> x1 <- mpfr(-50, 200) >>> x2 <- mpfr(-50.1, 200) >>> >>> Which gives the message: >>> >>> R Session Aborted >>> R encountered a fatal error >>> The session was terminated >>> Start New Session >>> >>> I am using R version 4.1.1 on a Mac running MacOS 12.0.1. and an older >> iMac >>> running 10.15.7. The problem occurs with both machines. >>> >>> When I install from the CRAN archive file Rmpfr_0.6-1.tar.gz (the >> version >>> of the package around 2017, corresponding to the last time I used it) the >>> problem goes away. >>> >>> [[alternative HTML version deleted]] >>> >>> ___ >>> R-SIG-Mac mailing list >>> R-SIG-Mac@r-project.org >>> >> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-sig-macdata=04%7C01%7Crmh%40temple.edu%7C3aabc743f322409d6fa308d9b259a7bb%7C716e81efb52244738e3110bd02ccf6e5%7C0%7C0%7C637736920545174898%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000sdata=pNPM8x8q1%2BQxq4QevSbfjlcO44vDVEyUvsRlfDBfgBo%3Dreserved=0 >> >> ___ >> R-SIG-Mac mailing list >> R-SIG-Mac@r-project.org >> https://stat.ethz.ch/mailman/listinfo/r-sig-mac >> > > [[alternative HTML version deleted]] > > ___ > R-SIG-Mac mailing list > R-SIG-Mac@r-project.org > https://stat.ethz.ch/mailman/listinfo/r-sig-mac > ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] [External] Rmpfr crashes on Mac
I am using: RStudio 2021.09.0+351 "Ghost Orchid" Release (077589bcad3467ae79f318afe8641a1899a51606, 2021-09-20) for macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 12_0_1) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.12.10 Chrome/69.0.3497.128 Safari/537.36 It is an RStudio issue; the problem does not occur when I run R from the Console. Thanks for the suggestion. Dev On Sun, Nov 28, 2021 at 6:39 PM Erich Subscriptions < erich.s...@neuwirth.priv.at> wrote: > One more thing: > After compiling Rmpfr from source, > things worked. > > > On 29.11.2021, at 00:30, Kevin Ushey wrote: > > > > I can reproduce something similar on my M1 macOS machine, when using the > > x86_64 build of R. I see: > > > >> x1 <- mpfr(-50, 200) > > *** caught illegal operation *** > > address 0x10c5f623b, cause 'illegal opcode' > > > > This is with the binary of Rmpfr 0.8-7 as from CRAN, with R 4.1.2. Here's > > what LLDB says: > > > > * thread #1, queue = 'com.apple.main-thread', stop reason = > > EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) > >frame #0: 0x00010f69c23b Rmpfr.so`mpfr_set_d + 43 > > Rmpfr.so`mpfr_set_d: > > -> 0x10f69c23b <+43>: vucomisd %xmm0, %xmm0 > >0x10f69c23f <+47>: jp 0x10f69c39a ; <+394> > >0x10f69c245 <+53>: vpxor %xmm1, %xmm1, %xmm1 > >0x10f69c249 <+57>: vucomisd %xmm1, %xmm0 > > > > And the relevant part of the stack trace: > > > > (lldb) bt > > * thread #1, queue = 'com.apple.main-thread', stop reason = > > EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) > > * frame #0: 0x00010f69c23b Rmpfr.so`mpfr_set_d + 43 > >frame #1: 0x00010f6809d3 Rmpfr.so`d2mpfr1_(x=-50, > > i_prec=, rnd=MPFR_RNDN) at convert.c:129:5 [opt] > >frame #2: 0x00010f680eb0 Rmpfr.so`d2mpfr1_list(x=, > > prec=, rnd_mode=) at convert.c:186:29 [opt] > > > > At least for my case, my guess is that the 'vucomisd' instruction isn't > > available via Apple's Rosetta emulation. It's possible users with older > > macOS machines not supporting AVX instructions could see this, as well? > > > > Best, > > Kevin > > > > On Sun, Nov 28, 2021 at 9:54 AM Richard M. Heiberger > wrote: > > > >> Works normally in R-4.1.2 with Rmpfr_0.8-7 on Macintosh > >> aarch64-apple-darwin20 > >> I am running inside Emacs using ESS > >> > >>> packageVersion("Rmpfr") > >> [1] ‘0.8.7’ > >>> library(Rmpfr) > >> Loading required package: gmp > >> > >> Attaching package: ‘gmp’ > >> > >> The following objects are masked from ‘package:base’: > >> > >>%*%, apply, crossprod, matrix, tcrossprod > >> > >> C code of R package 'Rmpfr': GMP using 64 bits per limb > >> > >> > >> Attaching package: ‘Rmpfr’ > >> > >> The following object is masked from ‘package:gmp’: > >> > >>outer > >> > >> The following objects are masked from ‘package:stats’: > >> > >>dbinom, dgamma, dnbinom, dnorm, dpois, dt, pnorm > >> > >> The following objects are masked from ‘package:base’: > >> > >>cbind, pmax, pmin, rbind > >> > >>> x1 <- mpfr(-50, 200) > >>> x1 > >> 1 'mpfr' number of precision 200 bits > >> [1] -50 > >>> x2 <- mpfr(-50.1, 200) > >>> x2 > >> 1 'mpfr' number of precision 200 bits > >> [1] -50.10142108547152020037174224853515625 > >>> version > >> _ > >> platform aarch64-apple-darwin20 > >> arch aarch64 > >> os darwin20 > >> system aarch64, darwin20 > >> status > >> major 4 > >> minor 1.2 > >> year 2021 > >> month 11 > >> day01 > >> svn rev81115 > >> language R > >> version.string R version 4.1.2 (2021-11-01) > >> nickname Bird Hippie > >>> > >> > >>> On Nov 27, 2021, at 15:46, Dev Chakraborty > wrote: > >>> > >>> I used package Rmpfr ca. 2017 and it worked fine. The latest version > >>> (0.8-7) causes R (running under RStudio) to crash. A simple example is: > >>> > >>> library(Rmpfr) > >>> x1 <- mpfr(-50, 200) > >>> x2 <- mpfr(-50.1, 200) > >>> > >>> Which gives the message: > >>> > >>> R Session Aborted > >>> R encountered a fatal error > >>> The session was terminated > >>> Start New Session > >>> > >>> I am using R version 4.1.1 on a Mac running MacOS 12.0.1. and an older > >> iMac > >>> running 10.15.7. The problem occurs with both machines. > >>> > >>> When I install from the CRAN archive file Rmpfr_0.6-1.tar.gz (the > >> version > >>> of the package around 2017, corresponding to the last time I used it) > the > >>> problem goes away. > >>> > >>> [[alternative HTML version deleted]] > >>> > >>> ___ > >>> R-SIG-Mac mailing list > >>> R-SIG-Mac@r-project.org > >>> > >> >
Re: [R-SIG-Mac] [External] Rmpfr crashes on Mac
One more thing: After compiling Rmpfr from source, things worked. > On 29.11.2021, at 00:30, Kevin Ushey wrote: > > I can reproduce something similar on my M1 macOS machine, when using the > x86_64 build of R. I see: > >> x1 <- mpfr(-50, 200) > *** caught illegal operation *** > address 0x10c5f623b, cause 'illegal opcode' > > This is with the binary of Rmpfr 0.8-7 as from CRAN, with R 4.1.2. Here's > what LLDB says: > > * thread #1, queue = 'com.apple.main-thread', stop reason = > EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) >frame #0: 0x00010f69c23b Rmpfr.so`mpfr_set_d + 43 > Rmpfr.so`mpfr_set_d: > -> 0x10f69c23b <+43>: vucomisd %xmm0, %xmm0 >0x10f69c23f <+47>: jp 0x10f69c39a ; <+394> >0x10f69c245 <+53>: vpxor %xmm1, %xmm1, %xmm1 >0x10f69c249 <+57>: vucomisd %xmm1, %xmm0 > > And the relevant part of the stack trace: > > (lldb) bt > * thread #1, queue = 'com.apple.main-thread', stop reason = > EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) > * frame #0: 0x00010f69c23b Rmpfr.so`mpfr_set_d + 43 >frame #1: 0x00010f6809d3 Rmpfr.so`d2mpfr1_(x=-50, > i_prec=, rnd=MPFR_RNDN) at convert.c:129:5 [opt] >frame #2: 0x00010f680eb0 Rmpfr.so`d2mpfr1_list(x=, > prec=, rnd_mode=) at convert.c:186:29 [opt] > > At least for my case, my guess is that the 'vucomisd' instruction isn't > available via Apple's Rosetta emulation. It's possible users with older > macOS machines not supporting AVX instructions could see this, as well? > > Best, > Kevin > > On Sun, Nov 28, 2021 at 9:54 AM Richard M. Heiberger wrote: > >> Works normally in R-4.1.2 with Rmpfr_0.8-7 on Macintosh >> aarch64-apple-darwin20 >> I am running inside Emacs using ESS >> >>> packageVersion("Rmpfr") >> [1] ‘0.8.7’ >>> library(Rmpfr) >> Loading required package: gmp >> >> Attaching package: ‘gmp’ >> >> The following objects are masked from ‘package:base’: >> >>%*%, apply, crossprod, matrix, tcrossprod >> >> C code of R package 'Rmpfr': GMP using 64 bits per limb >> >> >> Attaching package: ‘Rmpfr’ >> >> The following object is masked from ‘package:gmp’: >> >>outer >> >> The following objects are masked from ‘package:stats’: >> >>dbinom, dgamma, dnbinom, dnorm, dpois, dt, pnorm >> >> The following objects are masked from ‘package:base’: >> >>cbind, pmax, pmin, rbind >> >>> x1 <- mpfr(-50, 200) >>> x1 >> 1 'mpfr' number of precision 200 bits >> [1] -50 >>> x2 <- mpfr(-50.1, 200) >>> x2 >> 1 'mpfr' number of precision 200 bits >> [1] -50.10142108547152020037174224853515625 >>> version >> _ >> platform aarch64-apple-darwin20 >> arch aarch64 >> os darwin20 >> system aarch64, darwin20 >> status >> major 4 >> minor 1.2 >> year 2021 >> month 11 >> day01 >> svn rev81115 >> language R >> version.string R version 4.1.2 (2021-11-01) >> nickname Bird Hippie >>> >> >>> On Nov 27, 2021, at 15:46, Dev Chakraborty wrote: >>> >>> I used package Rmpfr ca. 2017 and it worked fine. The latest version >>> (0.8-7) causes R (running under RStudio) to crash. A simple example is: >>> >>> library(Rmpfr) >>> x1 <- mpfr(-50, 200) >>> x2 <- mpfr(-50.1, 200) >>> >>> Which gives the message: >>> >>> R Session Aborted >>> R encountered a fatal error >>> The session was terminated >>> Start New Session >>> >>> I am using R version 4.1.1 on a Mac running MacOS 12.0.1. and an older >> iMac >>> running 10.15.7. The problem occurs with both machines. >>> >>> When I install from the CRAN archive file Rmpfr_0.6-1.tar.gz (the >> version >>> of the package around 2017, corresponding to the last time I used it) the >>> problem goes away. >>> >>> [[alternative HTML version deleted]] >>> >>> ___ >>> R-SIG-Mac mailing list >>> R-SIG-Mac@r-project.org >>> >> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-sig-macdata=04%7C01%7Crmh%40temple.edu%7C3aabc743f322409d6fa308d9b259a7bb%7C716e81efb52244738e3110bd02ccf6e5%7C0%7C0%7C637736920545174898%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000sdata=pNPM8x8q1%2BQxq4QevSbfjlcO44vDVEyUvsRlfDBfgBo%3Dreserved=0 >> >> ___ >> R-SIG-Mac mailing list >> R-SIG-Mac@r-project.org >> https://stat.ethz.ch/mailman/listinfo/r-sig-mac >> > > [[alternative HTML version deleted]] > > ___ > R-SIG-Mac mailing list > R-SIG-Mac@r-project.org > https://stat.ethz.ch/mailman/listinfo/r-sig-mac ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] [External] Rmpfr crashes on Mac
My iMac ist Late 2014, so it is rather old (and x86 architecture) As I already wrote, I am experiencing the crash also. > On 29.11.2021, at 00:30, Kevin Ushey wrote: > > I can reproduce something similar on my M1 macOS machine, when using the > x86_64 build of R. I see: > >> x1 <- mpfr(-50, 200) > *** caught illegal operation *** > address 0x10c5f623b, cause 'illegal opcode' > > This is with the binary of Rmpfr 0.8-7 as from CRAN, with R 4.1.2. Here's > what LLDB says: > > * thread #1, queue = 'com.apple.main-thread', stop reason = > EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) >frame #0: 0x00010f69c23b Rmpfr.so`mpfr_set_d + 43 > Rmpfr.so`mpfr_set_d: > -> 0x10f69c23b <+43>: vucomisd %xmm0, %xmm0 >0x10f69c23f <+47>: jp 0x10f69c39a ; <+394> >0x10f69c245 <+53>: vpxor %xmm1, %xmm1, %xmm1 >0x10f69c249 <+57>: vucomisd %xmm1, %xmm0 > > And the relevant part of the stack trace: > > (lldb) bt > * thread #1, queue = 'com.apple.main-thread', stop reason = > EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) > * frame #0: 0x00010f69c23b Rmpfr.so`mpfr_set_d + 43 >frame #1: 0x00010f6809d3 Rmpfr.so`d2mpfr1_(x=-50, > i_prec=, rnd=MPFR_RNDN) at convert.c:129:5 [opt] >frame #2: 0x00010f680eb0 Rmpfr.so`d2mpfr1_list(x=, > prec=, rnd_mode=) at convert.c:186:29 [opt] > > At least for my case, my guess is that the 'vucomisd' instruction isn't > available via Apple's Rosetta emulation. It's possible users with older > macOS machines not supporting AVX instructions could see this, as well? > > Best, > Kevin > > On Sun, Nov 28, 2021 at 9:54 AM Richard M. Heiberger wrote: > >> Works normally in R-4.1.2 with Rmpfr_0.8-7 on Macintosh >> aarch64-apple-darwin20 >> I am running inside Emacs using ESS >> >>> packageVersion("Rmpfr") >> [1] ‘0.8.7’ >>> library(Rmpfr) >> Loading required package: gmp >> >> Attaching package: ‘gmp’ >> >> The following objects are masked from ‘package:base’: >> >>%*%, apply, crossprod, matrix, tcrossprod >> >> C code of R package 'Rmpfr': GMP using 64 bits per limb >> >> >> Attaching package: ‘Rmpfr’ >> >> The following object is masked from ‘package:gmp’: >> >>outer >> >> The following objects are masked from ‘package:stats’: >> >>dbinom, dgamma, dnbinom, dnorm, dpois, dt, pnorm >> >> The following objects are masked from ‘package:base’: >> >>cbind, pmax, pmin, rbind >> >>> x1 <- mpfr(-50, 200) >>> x1 >> 1 'mpfr' number of precision 200 bits >> [1] -50 >>> x2 <- mpfr(-50.1, 200) >>> x2 >> 1 'mpfr' number of precision 200 bits >> [1] -50.10142108547152020037174224853515625 >>> version >> _ >> platform aarch64-apple-darwin20 >> arch aarch64 >> os darwin20 >> system aarch64, darwin20 >> status >> major 4 >> minor 1.2 >> year 2021 >> month 11 >> day01 >> svn rev81115 >> language R >> version.string R version 4.1.2 (2021-11-01) >> nickname Bird Hippie >>> >> >>> On Nov 27, 2021, at 15:46, Dev Chakraborty wrote: >>> >>> I used package Rmpfr ca. 2017 and it worked fine. The latest version >>> (0.8-7) causes R (running under RStudio) to crash. A simple example is: >>> >>> library(Rmpfr) >>> x1 <- mpfr(-50, 200) >>> x2 <- mpfr(-50.1, 200) >>> >>> Which gives the message: >>> >>> R Session Aborted >>> R encountered a fatal error >>> The session was terminated >>> Start New Session >>> >>> I am using R version 4.1.1 on a Mac running MacOS 12.0.1. and an older >> iMac >>> running 10.15.7. The problem occurs with both machines. >>> >>> When I install from the CRAN archive file Rmpfr_0.6-1.tar.gz (the >> version >>> of the package around 2017, corresponding to the last time I used it) the >>> problem goes away. >>> >>> [[alternative HTML version deleted]] >>> >>> ___ >>> R-SIG-Mac mailing list >>> R-SIG-Mac@r-project.org >>> >> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-sig-macdata=04%7C01%7Crmh%40temple.edu%7C3aabc743f322409d6fa308d9b259a7bb%7C716e81efb52244738e3110bd02ccf6e5%7C0%7C0%7C637736920545174898%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000sdata=pNPM8x8q1%2BQxq4QevSbfjlcO44vDVEyUvsRlfDBfgBo%3Dreserved=0 >> >> ___ >> R-SIG-Mac mailing list >> R-SIG-Mac@r-project.org >> https://stat.ethz.ch/mailman/listinfo/r-sig-mac >> > > [[alternative HTML version deleted]] > > ___ > R-SIG-Mac mailing list > R-SIG-Mac@r-project.org > https://stat.ethz.ch/mailman/listinfo/r-sig-mac signature.asc Description: Message signed with OpenPGP ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] [External] Rmpfr crashes on Mac
I can reproduce something similar on my M1 macOS machine, when using the x86_64 build of R. I see: > x1 <- mpfr(-50, 200) *** caught illegal operation *** address 0x10c5f623b, cause 'illegal opcode' This is with the binary of Rmpfr 0.8-7 as from CRAN, with R 4.1.2. Here's what LLDB says: * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) frame #0: 0x00010f69c23b Rmpfr.so`mpfr_set_d + 43 Rmpfr.so`mpfr_set_d: -> 0x10f69c23b <+43>: vucomisd %xmm0, %xmm0 0x10f69c23f <+47>: jp 0x10f69c39a ; <+394> 0x10f69c245 <+53>: vpxor %xmm1, %xmm1, %xmm1 0x10f69c249 <+57>: vucomisd %xmm1, %xmm0 And the relevant part of the stack trace: (lldb) bt * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) * frame #0: 0x00010f69c23b Rmpfr.so`mpfr_set_d + 43 frame #1: 0x00010f6809d3 Rmpfr.so`d2mpfr1_(x=-50, i_prec=, rnd=MPFR_RNDN) at convert.c:129:5 [opt] frame #2: 0x00010f680eb0 Rmpfr.so`d2mpfr1_list(x=, prec=, rnd_mode=) at convert.c:186:29 [opt] At least for my case, my guess is that the 'vucomisd' instruction isn't available via Apple's Rosetta emulation. It's possible users with older macOS machines not supporting AVX instructions could see this, as well? Best, Kevin On Sun, Nov 28, 2021 at 9:54 AM Richard M. Heiberger wrote: > Works normally in R-4.1.2 with Rmpfr_0.8-7 on Macintosh > aarch64-apple-darwin20 > I am running inside Emacs using ESS > > > packageVersion("Rmpfr") > [1] ‘0.8.7’ > > library(Rmpfr) > Loading required package: gmp > > Attaching package: ‘gmp’ > > The following objects are masked from ‘package:base’: > > %*%, apply, crossprod, matrix, tcrossprod > > C code of R package 'Rmpfr': GMP using 64 bits per limb > > > Attaching package: ‘Rmpfr’ > > The following object is masked from ‘package:gmp’: > > outer > > The following objects are masked from ‘package:stats’: > > dbinom, dgamma, dnbinom, dnorm, dpois, dt, pnorm > > The following objects are masked from ‘package:base’: > > cbind, pmax, pmin, rbind > > > x1 <- mpfr(-50, 200) > > x1 > 1 'mpfr' number of precision 200 bits > [1] -50 > > x2 <- mpfr(-50.1, 200) > > x2 > 1 'mpfr' number of precision 200 bits > [1] -50.10142108547152020037174224853515625 > > version >_ > platform aarch64-apple-darwin20 > arch aarch64 > os darwin20 > system aarch64, darwin20 > status > major 4 > minor 1.2 > year 2021 > month 11 > day01 > svn rev81115 > language R > version.string R version 4.1.2 (2021-11-01) > nickname Bird Hippie > > > > > On Nov 27, 2021, at 15:46, Dev Chakraborty wrote: > > > > I used package Rmpfr ca. 2017 and it worked fine. The latest version > > (0.8-7) causes R (running under RStudio) to crash. A simple example is: > > > > library(Rmpfr) > > x1 <- mpfr(-50, 200) > > x2 <- mpfr(-50.1, 200) > > > > Which gives the message: > > > > R Session Aborted > > R encountered a fatal error > > The session was terminated > > Start New Session > > > > I am using R version 4.1.1 on a Mac running MacOS 12.0.1. and an older > iMac > > running 10.15.7. The problem occurs with both machines. > > > > When I install from the CRAN archive file Rmpfr_0.6-1.tar.gz (the > version > > of the package around 2017, corresponding to the last time I used it) the > > problem goes away. > > > > [[alternative HTML version deleted]] > > > > ___ > > R-SIG-Mac mailing list > > R-SIG-Mac@r-project.org > > > https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-sig-macdata=04%7C01%7Crmh%40temple.edu%7C3aabc743f322409d6fa308d9b259a7bb%7C716e81efb52244738e3110bd02ccf6e5%7C0%7C0%7C637736920545174898%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000sdata=pNPM8x8q1%2BQxq4QevSbfjlcO44vDVEyUvsRlfDBfgBo%3Dreserved=0 > > ___ > R-SIG-Mac mailing list > R-SIG-Mac@r-project.org > https://stat.ethz.ch/mailman/listinfo/r-sig-mac > [[alternative HTML version deleted]] ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] [External] Rmpfr crashes on Mac
Dev, as a first step, please don't use RStudio - we have to establish if this is an R issue or not first (RStudio is not R). Second, if it still crashes, please provide 1) the crash report 2) the output od sesionInfo() in R and 3) the output of system_profiler SPHardwareDataType SPSoftwareDataType fron Terminal (or system("system_profiler SPHardwareDataType SPSoftwareDataType") in R). Cheers, Simon > On Nov 29, 2021, at 9:36 AM, Dev Chakraborty wrote: > > I still get the crash. I tried to recreate your commands on my machine > (macOS Monterey, Version 12.0.1). Here is a summary; further details are > below. > > 1. Installing from CRAN downloaded file Rmpfr_0.8-7.tar.gz failed, see > further details. > 2. Therefore I had to instal the binary file from CRAN, see further details. > 3. Loaded library(Rmpfr), see further details > 4. Ran the two commands at the RStudio console: > x <- mpfr(-50, 2000) > y <- mpfr(-50.1, 2000) > This caused a crash. > 5. Restarted my system and ran: > > version > _ > platform x86_64-apple-darwin17.0 > arch x86_64 > os darwin17.0 > system x86_64, darwin17.0 > status > major 4 > minor 1.1 > year 2021 > month 08 > day10 > svn rev80725 > language R > version.string R version 4.1.1 (2021-08-10) > nickname Kick Things > > 6. Details of my machine (system report) > Model Name: MacBook Pro > Model Identifier: MacBookPro11,5 > Processor Name: Quad-Core Intel Core i7 > Processor Speed: 2.5 GHz > Number of Processors: 1 > Total Number of Cores: 4 > L2 Cache (per Core): 256 KB > L3 Cache: 6 MB > Hyper-Threading Technology: Enabled > Memory: 16 GB > System Firmware Version: 428.40.10.0.0 > OS Loader Version: 540.40.4~45 > SMC Version (system): 2.30f2 > Serial Number (system): C02PTX43G8WP > Hardware UUID: 85D23F6B-40E1-5D82-BF89-909EF7141116 > Provisioning UDID: 85D23F6B-40E1-5D82-BF89-909EF7141116 > > > Other details > 1. > install.packages("~/Downloads/Rmpfr_0.8-7.tar.gz", repos = NULL, type = > "source") > * installing *source* package ‘Rmpfr’ ... > ** package ‘Rmpfr’ successfully unpacked and MD5 sums checked > ** using staged installation > checking for gcc... clang -mmacosx-version-min=10.13 > checking whether the C compiler works... yes > checking for C compiler default output file name... a.out > checking for suffix of executables... > checking whether we are cross compiling... no > checking for suffix of object files... o > checking whether we are using the GNU C compiler... yes > checking whether clang -mmacosx-version-min=10.13 accepts -g... yes > checking for clang -mmacosx-version-min=10.13 option to accept ISO C89... > none needed > checking how to run the C preprocessor... clang -mmacosx-version-min=10.13 > -E > checking for grep that handles long lines and -e... /usr/bin/grep > checking for egrep... /usr/bin/grep -E > checking for ANSI C header files... rm: conftest.dSYM: is a directory > rm: conftest.dSYM: is a directory > yes > checking for sys/types.h... yes > checking for sys/stat.h... yes > checking for stdlib.h... yes > checking for string.h... yes > checking for memory.h... yes > checking for strings.h... yes > checking for inttypes.h... yes > checking for stdint.h... yes > checking for unistd.h... yes > checking mpfr.h usability... no > checking mpfr.h presence... no > checking for mpfr.h... no > configure: error: Header file mpfr.h not found; maybe use > --with-mpfr-include=INCLUDE_PATH > ERROR: configuration failed for package ‘Rmpfr’ > * removing > ‘/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rmpfr’ > Warning in install.packages : > installation of package ‘/Users/Dev/Downloads/Rmpfr_0.8-7.tar.gz’ had > non-zero exit status > > 2. > install.packages("Rmpfr") > trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/Rmpfr_0.8-7.tgz' > Content type 'application/x-gzip' length 1556368 bytes (1.5 MB) > == > downloaded 1.5 MB > > > The downloaded binary packages are in > /var/folders/d1/mx6dcbzx3v39r260458z2b20gn/T//Rtmpfbzg9i/downloaded_packages >> > > 3. > library(Rmpfr) > Loading required package: gmp > > Attaching package: ‘gmp’ > > The following objects are masked from ‘package:base’: > >%*%, apply, crossprod, matrix, tcrossprod > > C code of R package 'Rmpfr': GMP using 64 bits per limb > > > Attaching package: ‘Rmpfr’ > > The following object is masked from ‘package:gmp’: > >outer > > The following objects are masked from ‘package:stats’: > >dbinom, dgamma, dnbinom, dnorm, dpois, dt, pnorm > > The following objects are masked from ‘package:base’: > >cbind, pmax, pmin, rbind > > > On Sun, Nov 28, 2021 at 12:53 PM Richard M. Heiberger > wrote: > >> Works normally in R-4.1.2 with Rmpfr_0.8-7 on Macintosh >> aarch64-apple-darwin20 >> I am running inside Emacs using ESS >> >>> packageVersion("Rmpfr") >> [1]
Re: [R-SIG-Mac] [External] Rmpfr crashes on Mac
I just downloaded RStudio 2021.09.1 Build 372 This is an Intel RStudio running on my Apple M1 chip. The example works normally. Do you have the most recent RStudio? I tried on the earlier RStudio I downloaded in January, right after getting this M1 computer, and that version Rstudio wouldn't start. > On Nov 28, 2021, at 12:53, Richard M. Heiberger wrote: > > Works normally in R-4.1.2 with Rmpfr_0.8-7 on Macintosh aarch64-apple-darwin20 > I am running inside Emacs using ESS > >> packageVersion("Rmpfr") > [1] ‘0.8.7’ >> library(Rmpfr) > Loading required package: gmp > > Attaching package: ‘gmp’ > > The following objects are masked from ‘package:base’: > >%*%, apply, crossprod, matrix, tcrossprod > > C code of R package 'Rmpfr': GMP using 64 bits per limb > > > Attaching package: ‘Rmpfr’ > > The following object is masked from ‘package:gmp’: > >outer > > The following objects are masked from ‘package:stats’: > >dbinom, dgamma, dnbinom, dnorm, dpois, dt, pnorm > > The following objects are masked from ‘package:base’: > >cbind, pmax, pmin, rbind > >> x1 <- mpfr(-50, 200) >> x1 > 1 'mpfr' number of precision 200 bits > [1] -50 >> x2 <- mpfr(-50.1, 200) >> x2 > 1 'mpfr' number of precision 200 bits > [1] -50.10142108547152020037174224853515625 >> version > _ > platform aarch64-apple-darwin20 > arch aarch64 > os darwin20 > system aarch64, darwin20 > status > major 4 > minor 1.2 > year 2021 > month 11 > day01 > svn rev81115 > language R > version.string R version 4.1.2 (2021-11-01) > nickname Bird Hippie >> > >> On Nov 27, 2021, at 15:46, Dev Chakraborty wrote: >> >> I used package Rmpfr ca. 2017 and it worked fine. The latest version >> (0.8-7) causes R (running under RStudio) to crash. A simple example is: >> >> library(Rmpfr) >> x1 <- mpfr(-50, 200) >> x2 <- mpfr(-50.1, 200) >> >> Which gives the message: >> >> R Session Aborted >> R encountered a fatal error >> The session was terminated >> Start New Session >> >> I am using R version 4.1.1 on a Mac running MacOS 12.0.1. and an older iMac >> running 10.15.7. The problem occurs with both machines. >> >> When I install from the CRAN archive file Rmpfr_0.6-1.tar.gz (the version >> of the package around 2017, corresponding to the last time I used it) the >> problem goes away. >> >> [[alternative HTML version deleted]] >> >> ___ >> R-SIG-Mac mailing list >> R-SIG-Mac@r-project.org >> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-sig-macdata=04%7C01%7Crmh%40temple.edu%7C7e802ce732d54cb7609c08d9b29810bb%7C716e81efb52244738e3110bd02ccf6e5%7C0%7C0%7C637737188469988655%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000sdata=r7I1Q6d2VlXeVcG3cvEneRngAKuJTqJyNIjQ4xuuQpg%3Dreserved=0 > > ___ > R-SIG-Mac mailing list > R-SIG-Mac@r-project.org > https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-sig-macdata=04%7C01%7Crmh%40temple.edu%7C7e802ce732d54cb7609c08d9b29810bb%7C716e81efb52244738e3110bd02ccf6e5%7C0%7C0%7C637737188469988655%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000sdata=r7I1Q6d2VlXeVcG3cvEneRngAKuJTqJyNIjQ4xuuQpg%3Dreserved=0 ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] [External] Rmpfr crashes on Mac
I still get the crash. I tried to recreate your commands on my machine (macOS Monterey, Version 12.0.1). Here is a summary; further details are below. 1. Installing from CRAN downloaded file Rmpfr_0.8-7.tar.gz failed, see further details. 2. Therefore I had to instal the binary file from CRAN, see further details. 3. Loaded library(Rmpfr), see further details 4. Ran the two commands at the RStudio console: x <- mpfr(-50, 2000) y <- mpfr(-50.1, 2000) This caused a crash. 5. Restarted my system and ran: version _ platform x86_64-apple-darwin17.0 arch x86_64 os darwin17.0 system x86_64, darwin17.0 status major 4 minor 1.1 year 2021 month 08 day10 svn rev80725 language R version.string R version 4.1.1 (2021-08-10) nickname Kick Things 6. Details of my machine (system report) Model Name: MacBook Pro Model Identifier: MacBookPro11,5 Processor Name: Quad-Core Intel Core i7 Processor Speed: 2.5 GHz Number of Processors: 1 Total Number of Cores: 4 L2 Cache (per Core): 256 KB L3 Cache: 6 MB Hyper-Threading Technology: Enabled Memory: 16 GB System Firmware Version: 428.40.10.0.0 OS Loader Version: 540.40.4~45 SMC Version (system): 2.30f2 Serial Number (system): C02PTX43G8WP Hardware UUID: 85D23F6B-40E1-5D82-BF89-909EF7141116 Provisioning UDID: 85D23F6B-40E1-5D82-BF89-909EF7141116 Other details 1. install.packages("~/Downloads/Rmpfr_0.8-7.tar.gz", repos = NULL, type = "source") * installing *source* package ‘Rmpfr’ ... ** package ‘Rmpfr’ successfully unpacked and MD5 sums checked ** using staged installation checking for gcc... clang -mmacosx-version-min=10.13 checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether clang -mmacosx-version-min=10.13 accepts -g... yes checking for clang -mmacosx-version-min=10.13 option to accept ISO C89... none needed checking how to run the C preprocessor... clang -mmacosx-version-min=10.13 -E checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for ANSI C header files... rm: conftest.dSYM: is a directory rm: conftest.dSYM: is a directory yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking mpfr.h usability... no checking mpfr.h presence... no checking for mpfr.h... no configure: error: Header file mpfr.h not found; maybe use --with-mpfr-include=INCLUDE_PATH ERROR: configuration failed for package ‘Rmpfr’ * removing ‘/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rmpfr’ Warning in install.packages : installation of package ‘/Users/Dev/Downloads/Rmpfr_0.8-7.tar.gz’ had non-zero exit status 2. install.packages("Rmpfr") trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/Rmpfr_0.8-7.tgz' Content type 'application/x-gzip' length 1556368 bytes (1.5 MB) == downloaded 1.5 MB The downloaded binary packages are in /var/folders/d1/mx6dcbzx3v39r260458z2b20gn/T//Rtmpfbzg9i/downloaded_packages > 3. library(Rmpfr) Loading required package: gmp Attaching package: ‘gmp’ The following objects are masked from ‘package:base’: %*%, apply, crossprod, matrix, tcrossprod C code of R package 'Rmpfr': GMP using 64 bits per limb Attaching package: ‘Rmpfr’ The following object is masked from ‘package:gmp’: outer The following objects are masked from ‘package:stats’: dbinom, dgamma, dnbinom, dnorm, dpois, dt, pnorm The following objects are masked from ‘package:base’: cbind, pmax, pmin, rbind On Sun, Nov 28, 2021 at 12:53 PM Richard M. Heiberger wrote: > Works normally in R-4.1.2 with Rmpfr_0.8-7 on Macintosh > aarch64-apple-darwin20 > I am running inside Emacs using ESS > > > packageVersion("Rmpfr") > [1] ‘0.8.7’ > > library(Rmpfr) > Loading required package: gmp > > Attaching package: ‘gmp’ > > The following objects are masked from ‘package:base’: > > %*%, apply, crossprod, matrix, tcrossprod > > C code of R package 'Rmpfr': GMP using 64 bits per limb > > > Attaching package: ‘Rmpfr’ > > The following object is masked from ‘package:gmp’: > > outer > > The following objects are masked from ‘package:stats’: > > dbinom, dgamma, dnbinom, dnorm, dpois, dt, pnorm > > The following objects are masked from ‘package:base’: > > cbind, pmax, pmin, rbind > > > x1 <- mpfr(-50, 200) > > x1 > 1 'mpfr' number of precision 200 bits > [1] -50 > > x2 <- mpfr(-50.1, 200) > > x2 > 1 'mpfr' number of precision 200 bits >
Re: [R-SIG-Mac] [External] Rmpfr crashes on Mac
Works normally in R-4.1.2 with Rmpfr_0.8-7 on Macintosh aarch64-apple-darwin20 I am running inside Emacs using ESS > packageVersion("Rmpfr") [1] ‘0.8.7’ > library(Rmpfr) Loading required package: gmp Attaching package: ‘gmp’ The following objects are masked from ‘package:base’: %*%, apply, crossprod, matrix, tcrossprod C code of R package 'Rmpfr': GMP using 64 bits per limb Attaching package: ‘Rmpfr’ The following object is masked from ‘package:gmp’: outer The following objects are masked from ‘package:stats’: dbinom, dgamma, dnbinom, dnorm, dpois, dt, pnorm The following objects are masked from ‘package:base’: cbind, pmax, pmin, rbind > x1 <- mpfr(-50, 200) > x1 1 'mpfr' number of precision 200 bits [1] -50 > x2 <- mpfr(-50.1, 200) > x2 1 'mpfr' number of precision 200 bits [1] -50.10142108547152020037174224853515625 > version _ platform aarch64-apple-darwin20 arch aarch64 os darwin20 system aarch64, darwin20 status major 4 minor 1.2 year 2021 month 11 day01 svn rev81115 language R version.string R version 4.1.2 (2021-11-01) nickname Bird Hippie > > On Nov 27, 2021, at 15:46, Dev Chakraborty wrote: > > I used package Rmpfr ca. 2017 and it worked fine. The latest version > (0.8-7) causes R (running under RStudio) to crash. A simple example is: > > library(Rmpfr) > x1 <- mpfr(-50, 200) > x2 <- mpfr(-50.1, 200) > > Which gives the message: > > R Session Aborted > R encountered a fatal error > The session was terminated > Start New Session > > I am using R version 4.1.1 on a Mac running MacOS 12.0.1. and an older iMac > running 10.15.7. The problem occurs with both machines. > > When I install from the CRAN archive file Rmpfr_0.6-1.tar.gz (the version > of the package around 2017, corresponding to the last time I used it) the > problem goes away. > > [[alternative HTML version deleted]] > > ___ > R-SIG-Mac mailing list > R-SIG-Mac@r-project.org > https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-sig-macdata=04%7C01%7Crmh%40temple.edu%7C3aabc743f322409d6fa308d9b259a7bb%7C716e81efb52244738e3110bd02ccf6e5%7C0%7C0%7C637736920545174898%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000sdata=pNPM8x8q1%2BQxq4QevSbfjlcO44vDVEyUvsRlfDBfgBo%3Dreserved=0 ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] Rmpfr crashes on Mac
I am using R 4.1.2 Rmpfr 0.8.7 MacOS 11.6.1 (x86 Machine) > On 28.11.2021, at 13:12, Duncan Murdoch wrote: > > On 28/11/2021 7:05 a.m., Erich Neuwirth wrote: >> I checked, and I also get the crash in Rstudio. >> In Rgui, it works. > > I don't get the crash, using R 4.1.0 in MacOS 10.15.7, with the same Rmpfr > version in RStudio or R.app. > > Duncan Murdoch > >>> On 27.11.2021, at 21:46, Dev Chakraborty wrote: >>> >>> I used package Rmpfr ca. 2017 and it worked fine. The latest version >>> (0.8-7) causes R (running under RStudio) to crash. A simple example is: >>> >>> library(Rmpfr) >>> x1 <- mpfr(-50, 200) >>> x2 <- mpfr(-50.1, 200) >>> >>> Which gives the message: >>> >>> R Session Aborted >>> R encountered a fatal error >>> The session was terminated >>> Start New Session >>> >>> I am using R version 4.1.1 on a Mac running MacOS 12.0.1. and an older iMac >>> running 10.15.7. The problem occurs with both machines. >>> >>> When I install from the CRAN archive file Rmpfr_0.6-1.tar.gz (the version >>> of the package around 2017, corresponding to the last time I used it) the >>> problem goes away. >>> >>> [[alternative HTML version deleted]] >>> >>> ___ >>> R-SIG-Mac mailing list >>> R-SIG-Mac@r-project.org >>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac >> ___ >> R-SIG-Mac mailing list >> R-SIG-Mac@r-project.org >> https://stat.ethz.ch/mailman/listinfo/r-sig-mac > signature.asc Description: Message signed with OpenPGP ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] Rmpfr crashes on Mac
On 28/11/2021 7:05 a.m., Erich Neuwirth wrote: I checked, and I also get the crash in Rstudio. In Rgui, it works. I don't get the crash, using R 4.1.0 in MacOS 10.15.7, with the same Rmpfr version in RStudio or R.app. Duncan Murdoch On 27.11.2021, at 21:46, Dev Chakraborty wrote: I used package Rmpfr ca. 2017 and it worked fine. The latest version (0.8-7) causes R (running under RStudio) to crash. A simple example is: library(Rmpfr) x1 <- mpfr(-50, 200) x2 <- mpfr(-50.1, 200) Which gives the message: R Session Aborted R encountered a fatal error The session was terminated Start New Session I am using R version 4.1.1 on a Mac running MacOS 12.0.1. and an older iMac running 10.15.7. The problem occurs with both machines. When I install from the CRAN archive file Rmpfr_0.6-1.tar.gz (the version of the package around 2017, corresponding to the last time I used it) the problem goes away. [[alternative HTML version deleted]] ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] Rmpfr crashes on Mac
I checked, and I also get the crash in Rstudio. In Rgui, it works. > On 27.11.2021, at 21:46, Dev Chakraborty wrote: > > I used package Rmpfr ca. 2017 and it worked fine. The latest version > (0.8-7) causes R (running under RStudio) to crash. A simple example is: > > library(Rmpfr) > x1 <- mpfr(-50, 200) > x2 <- mpfr(-50.1, 200) > > Which gives the message: > > R Session Aborted > R encountered a fatal error > The session was terminated > Start New Session > > I am using R version 4.1.1 on a Mac running MacOS 12.0.1. and an older iMac > running 10.15.7. The problem occurs with both machines. > > When I install from the CRAN archive file Rmpfr_0.6-1.tar.gz (the version > of the package around 2017, corresponding to the last time I used it) the > problem goes away. > > [[alternative HTML version deleted]] > > ___ > R-SIG-Mac mailing list > R-SIG-Mac@r-project.org > https://stat.ethz.ch/mailman/listinfo/r-sig-mac signature.asc Description: Message signed with OpenPGP ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
[R-SIG-Mac] Rmpfr crashes on Mac
I used package Rmpfr ca. 2017 and it worked fine. The latest version (0.8-7) causes R (running under RStudio) to crash. A simple example is: library(Rmpfr) x1 <- mpfr(-50, 200) x2 <- mpfr(-50.1, 200) Which gives the message: R Session Aborted R encountered a fatal error The session was terminated Start New Session I am using R version 4.1.1 on a Mac running MacOS 12.0.1. and an older iMac running 10.15.7. The problem occurs with both machines. When I install from the CRAN archive file Rmpfr_0.6-1.tar.gz (the version of the package around 2017, corresponding to the last time I used it) the problem goes away. [[alternative HTML version deleted]] ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac