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

2021-02-22 Thread Jean Thioulouse


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  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  on behalf of Zhang, Jialin 
> via R-SIG-Mac 
> Sent: Monday, February 22, 2021 1:36 PM
> To: r-sig-mac@r-project.org
> 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: 
> jzh...@math.msstate.edu
> 
> 
>[[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] R for macOS Big Sur

2021-01-14 Thread Jean Thioulouse
Hi

- On Intel Macs:

R 4.0.3 binary is available for macOS 10.13 (High Sierra) and higher (including 
Big Sur).

- On M1 Macs (Big Sur) :

You can use the above R binary in Rosetta mode (faster than on most intel macs)

And, if you are "intrepid" (according to Prof. Ripley): There is an 
experimental R-devel build of the R framework at https://mac.r-project.org/.  
That page reports 'failed' but usually the framework is complete.

Both are doing quite well on my Mac Mini M1 and run faster that on my Intel 
Core i5 2018 MacBook Pro.

And you can also use RStudio in Rosetta mode.

Jean


> Le 14 janv. 2021 à 19:06, Gregory Coats via R-SIG-Mac 
>  a écrit :
> 
> macOS Big Sur has shipped with all Apple Mac computers since Thu 2020-11-12.
> The web site https://mac.r-project.org/ shows that as of Thu 2021-01-14 00:56 
> 1. R compiled for Big Sur for Macs with the Intel CISC x86_64 chip is not 
> available.
> 2. R compiled for Big Sur for Macs with the Apple M1 RISC chip (=ARM64) 
> FAILED to compile.
> So, R is not available to any of us who have bought Apple Mac computers in 
> the past 2 months.
> 
> A note posted to R-SIG-Mac on Thu 2021-01-14 by Brian Ripley says 
> "The goal remains to release a native binary distribution with R 4.1.0 about 
> April 2021."
> A similar note posted on Fri 2021-01-08 said 
> "We hope this will be solved by the end of January 2021."
> 
> Waiting until April 2021 to run an application on a computer purchased in Nov 
> 2020 seems like a very long wait. I suggest a goal of releasing R compiled 
> for Big Sur for Macs with the Intel CISC x86_64 chip before the end of 
> January 2021.
> Greg Coats
>   [[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] M1 mid-January update

2021-01-14 Thread Jean Thioulouse


Is there a large speed difference for linear algebra operations between the 
Rosetta x86_64 builds and the native arm64 builds ?
On a Mac mini M1 8/256 I get only a slight speed increase (15% faster) with the 
arm version (experimental R-devel build).

Thanks
Jean

> Le 14 janv. 2021 à 08:41, Prof Brian Ripley  a écrit :
> 
> For native builds - nothing to report for x86_64 builds running under Rosetta 
> which almost all the time 'just work' (and work fast).
> 
> The goal remains to release a native binary distribution with R 4.1.0 ca 
> April: all but the intrepid are advised to use x86_64 until then.
> 
> - There is an experimental R-devel build of the R framework at 
> https://mac.r-project.org/ .  That page reports 'failed' but usually the 
> framework is complete.
> 
> - R.app will need to be partially re-written as it uses Objective C features 
> which are no longer supported in Xcode 12.  (I guess this is why the page is 
> reporting a failure.)
> 
> - There are most parts of a toolchain and a Fortran compiler at 
> https://mac.r-project.org/libs-arm64/ (not the earlier versions at libs-arm). 
>  These install into /opt/R/arm64, and the R-admin manual has been re-written 
> to reflect that and point out some pitfalls.
> 
> - Binary packages are planned but the vast majority of packages install from 
> source.  I currently have 240 CRAN check failures with 35 failing to install 
> and 98 others requiring those (or BioC ones).  If you are interested in a 
> particular package, https://www.stats.ox.ac.uk/pub/bdr/M1mac/ has recent logs 
> for those failing directly, listed as 'additional issues' on their CRAN check 
> pages.
> 
> -- 
> Brian D. Ripley,  rip...@stats.ox.ac.uk
> Emeritus Professor of Applied Statistics, University of Oxford
> 
> ___
> 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] R for macOS Big Sur

2021-01-11 Thread Jean Thioulouse
Hi

Both versions seem to run fine indeed, but on my Mac mini M1, the arm version 
(homebrew R) is much slower than the intel version (CRAN R), which is quite 
disappointing.

The speed ratio I get is about 4 times slower for the arm version compared to 
the intel version, both in single processor and parallel computing mode.

Any idea about why I get these results ?

Thanks,
Jean

—-
Jean THIOULOUSE - orcid.org/-0001-7664-0598
http://lbbe.univ-lyon1.fr/-Thioulouse-Jean-.html
https://www.springer.com/fr/book/9781493988488


> Le 11 janv. 2021 à 10:53, Denis-Alexander Engemann  
> a écrit :
> 
> I have been using both Rosetta emulation and the homebrew builds and
> everything looks very good so far.
> 
> Here are two Twitter threads on M1 benchmarks.
> 
> https://twitter.com/fxcoudert/status/1342598509418176514?s=20
> 
> https://twitter.com/dngman/status/1342580260815200257?s=20
> 
> Best,
> Denis
> 
> On Mon, Jan 11, 2021 at 10:11 AM Dr Eberhard W Lisse  wrote:
>> 
>> I use the homebrew R for the Intel and then install.packages(), 
>> update.package() from scripts and  Rstudio’s Tools->.
>> 
>> I don’t have an M1 (yet) but would be interested in seeing how that works on 
>> the M1. Probably this will pull the sources and hence I would be grateful to 
>> read about that.
>> 
>> 
>> greetings, el
>> 
>> —
>> Sent from Dr Lisse’s iPhone
>> On 11 Jan 2021, 10:05 +0200, Patrick Schratz , 
>> wrote:
>>> There is a [native arm64 big sur
>>> binary](https://github.com/Homebrew/homebrew-core/blob/8a6807be6abb44634e7d6d153348b6bba2a5ddc6/Formula/r.rb#L16)
>>> in homebrew since some days.
>>> 
>>> On 10 Jan 2021, at 22:39, Gregory Coats via R-SIG-Mac wrote:
>>> 
>>>> I purchased a new 13 inch Apple MacBook Pro with the M1 System on a
>>>> Chip. I understand that R is not yet available compiled for the M1 SoC
>>>> hardware, and so I am using Apple’s Rosetta 2.
>>>> However, this MacBook Pro requires Apple macOS Big Sur. From what I
>>>> see at https://mac.r-project.org/ R has not been compiled for macOS
>>>> Big Sur. Is there an executable of R for macOS Big Sur available to
>>>> download?
>>>> Greg Coats
>>>> 
>>>> 
>>>> [[alternative HTML version deleted]]
>>>> 
>>>> ___
>>>> 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
>> 
>>[[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] Apparent interaction between XQuartz and the Catalina (10.15) macOS upgrade

2019-10-09 Thread Jean Thioulouse


I did not run any of the Catalina betas and have no problem with 
Catalina/XQuartz.

Jean

—-
Jean THIOULOUSE - orcid.org/-0001-7664-0598
http://lbbe.univ-lyon1.fr/-Thioulouse-Jean-.html
https://www.springer.com/fr/book/9781493988488




> Le 9 oct. 2019 à 15:20, Kasper Daniel Hansen  a 
> écrit :
> 
> Bob,
> 
> You ran the betas. On issues like this, that could be a big difference. So
> Im not sure it is yet an issue that could be user dependent.
> 
> Best,
> Kasper
> 
> On Tue, Oct 8, 2019 at 10:00 PM Bob Rudis  wrote:
> 
>> I've been running Catalina since the first beta and upgraded to GM the day
>> of release. Apart from having to stick R things into Full Disk Access I've
>> had no issues with R nor XQuartz.
>> 
>> I read through the links provided and, while I do have said symlink in the
>> relocated items folder Apple creates (this is new behavior for the GM), it
>> gets re-created fine for me & XQuartz works fine (and the minor pkg deps I
>> have installed that use it also work fine.
>> 
>> This would appear to be a YMMV situation.
>> 
>> -Bob
>> 
>>> On Oct 8, 2019, at 4:19 PM, Luis Puerto  wrote:
>>> 
>>> Thanks a lot for the heads up!
>>> 
>>> Cheers!
>>> Luis
>>> 
>>>> On 8 Oct 2019, at 22:49, Marc Schwartz via R-SIG-Mac <
>> r-sig-mac@r-project.org> wrote:
>>>> 
>>>> Hi All,
>>>> 
>>>> Perhaps I missed something relevant along the way someplace, but I ran
>> the upgrade to Catalina (10.15) last night. I wanted to give folks a heads
>> up on an issue that you may face, especially if you have XQuartz installed
>> alongside R.
>>>> 
>>>> One of the sequelae of the upgrade is that some files may get relocated
>> during the upgrade, likely in part due to the macOS SIP.
>>>> 
>>>> In my case, this involved the symlink for XQuartz, 'usr/X11R6', which
>> gets placed into a "Relocated Items" folder on the Desktop. That folder,
>> which is actually an alias to /Users/Shared, contains a folder tree with:
>> Security/usr/X11R6. Naively, after seeing this, I elected to move the
>> entire folder to the Trash.
>>>> 
>>>> That led me into a cycle of trying to figure out how to then delete
>> that folder tree from the Trash, as I would get various OS errors in the
>> course of doing so.
>>>> 
>>>> That led me to some Google searches, with incremental attempts at
>> solutions, but eventually landing on the following thread in the Apple
>> Community forums:
>>>> 
>>>> https://discussions.apple.com/thread/250712783
>>>> 
>>>> After the first review of the thread there, and before user 'faikbey'
>> posted a possible solution using Recovery Mode, I filed an Issue on the
>> XQuartz github repo here:
>>>> 
>>>> https://github.com/XQuartz/XQuartz/issues/1
>>>> 
>>>> It would seem that, at some level, one workaround would be to uninstall
>> XQuartz fully before the Catalina upgrade, but there is no uninstall
>> program provided by them. There is a series of CLI commands in a github
>> gist here:
>>>> 
>>>> 
>> https://gist.github.com/pwnsdx/d127873e24cef159d4d603accaf37ee4#file-gistfile1-txt
>>>> 
>>>> which appears to work, but would likely be best used prior to the
>> Catalina upgrade, and then re-install XQuartz after the upgrade is complete.
>>>> 
>>>> The solution to the problem posted by 'faikbey' in the Apple forum
>> appears to work in the original scenario, albeit, as I noted in my reply in
>> that thread, I needed to first mount the user volume in Recovery Mode using
>> Disk Utility, before I could proceed with the additional steps of deleting
>> the files from the Trash, then rebooting into normal mode.
>>>> 
>>>> If anyone else has experienced this and knows of an alternative/better
>> solution, let us know.
>>>> 
>>>> Otherwise, let's see what the XQuartz folks might come up with on this,
>> as this was not an issue with prior macOS upgrades.
>>>> 
>>>> Regards,
>>>> 
>>>> Marc Schwartz
>>>> 
>>>> ___
>>>> 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
>> 
> 
> 
> -- 
> Best,
> Kasper
> 
>   [[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