[Rd] How to safely using OpenMP pragma inside a .C() function?
Paweł Matykiewicz
pawel.matykiewicz at gmail.com
Thu Sep 1 15:39:15 CEST 2011
>>> .Internal(setMaxNumMathThreads(1)); .Internal(setNumMathThreads(1)); m <-
>>> matrix(rnorm(810000),900,900); system.time(d <- dist(m))
>>>
>>> user system elapsed
>>> 3.510 0.013 3.524
>>>
>>> .Internal(setMaxNumMathThreads(5)); .Internal(setNumMathThreads(5)); m <-
>>> matrix(rnorm(810000),900,900); system.time(d <- dist(m));
>>>
>>> user system elapsed
>>> 3.536 0.007 1.321
These results are obtained on:
Model Name: Mac Pro
Model Identifier: MacPro4,1
Processor Name: Quad-Core Intel Xeon
Processor Speed: 2.93 GHz
Number Of Processors: 2
Total Number Of Cores: 8
L2 Cache (per core): 256 KB
L3 Cache (per processor): 8 MB
Memory: 12 GB
Processor Interconnect Speed: 6.4 GT/s
Boot ROM Version: MP41.0081.B07
SMC Version (system): 1.39f5
SMC Version (processor tray): 1.39f5
Thank you for your comments
Regards
--
Pawel Matykiewicz
http://www.neuron.m4u.pl
http://www.linkedin.com/in/pawelmatykiewicz
More information about the R-devel
mailing list