[R-SIG-Mac] Multiple cores on a Mac
peter dalgaard
pdalgd at gmail.com
Fri Feb 5 16:03:19 CET 2016
Why me..?
Probably Simon and maybe Brian has the full recollection of the story, but as I understood it, once upon a time you could switch out the BLAS on CRAN R just by editing a symlink in the R installation. For some reason, that cannot work anymore (Apple considered symlinked libraries a security risk?). I think the current situation is that you can still do it, but you have to physically overwrite the default BLAS(? Simon will know.).
At any rate, you can certainly still do a local compile with the Accelerate framework, once you get all the tools in place:
> M <- matrix(rnorm(1e8),10000)
> system.time(M %*% t(M))
user system elapsed
219.566 0.806 21.752
> M <- crossprod(M)
> system.time(solve(M))
user system elapsed
310.874 1.477 29.998
(To tell the truth, I actually don't have all the tools in place on that machine, so this was from a build of 3.2.1 patched)
-pd
On 05 Feb 2016, at 14:52 , Joseph Kunkel <joe at bio.umass.edu> wrote:
> To me there are big gorillas in the room and I need to know why I can not use them all.
>
> • Testing for physical and logical cpus on Joe's MacBook Pro.
> Josephs-MacBook-Pro:~ josephgkunkel$ /usr/sbin/sysctl -n hw.physicalcpu
> 4
> Josephs-MacBook-Pro:~ josephgkunkel$ /usr/sbin/sysctl -n hw.logicalcpu
> 8
>
> Prior to about 2012 my multicore Macs would use all (physical) cores automagically in R. %*% was multicore automatically.
>
> A 24 hour heavy matrix calculation would take a little over 6 hours on a 4 core Mac.
>
> Then some problem with the BLAS library changed everything and colleague stats people and I got really mad that we could not do our calculations as fast in R.
>
> Many work-around libraries were devised which did not seem to be that useful for freewielding matrix operations.
>
> Then Revolution R seemed to solve the problem and patented(?) it. … but not for Macs.
>
> Recently they provided a free Mac version but using their R ‘open' version messes up my computer for updating the libraries I am addicted to using.
>
> My question after this appologeticlay long narrative is:
>
> Why has no satisfactory and transparent method for multicore use been available to CRAN R?
>
> Secondarily, how could our R open software system be hijacked by Revolution and now Microsoft?
>
> I would be pleased to know that there are colleagues out there who are similarly hoping for an R core solution within CRAN.
>
> I can do primitive matrix things faster with Julia, which is encouraging, but the libraries and flexability for me are not there yet.
>
> Joe
>
> -·. .· ·. .><((((º>·. .· ·. .><((((º>·. .· ·. .><((((º> .··.· >=- =º}}}}}><
> Joseph G. Kunkel, Research Professor
> 112A Marine Science Center
> University of New England
> Biddeford ME 04005
> http://www.bio.umass.edu/biology/kunkel/
>
>
>
--
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
More information about the R-SIG-Mac
mailing list