From pawel.matykiewicz at gmail.com  Thu Sep  1 15:39:15 2011
From: pawel.matykiewicz at gmail.com (=?ISO-8859-2?Q?Pawe=B3_Matykiewicz?=)
Date: Thu, 1 Sep 2011 09:39:15 -0400
Subject: [Rd] How to safely using OpenMP pragma inside a .C() function?
In-Reply-To: <alpine.LFD.2.02.1109010717540.6154@gannet.stats.ox.ac.uk>
References: <1314643732236-3777036.post@n4.nabble.com>
	<B2571962-7567-4F59-A1CB-415088594F47@r-project.org>
	<1314705201298-3778482.post@n4.nabble.com>
	<1314723468677-3779214.post@n4.nabble.com>
	<798B5A8C-40DD-4BFD-B02A-45950F94EAF4@r-project.org>
	<1314821163584-3782073.post@n4.nabble.com>
	<1314823566871-3782178.post@n4.nabble.com>
	<BDB09C50-B682-4593-B219-B2F0EC952198@r-project.org>
	<alpine.LFD.2.02.1109010717540.6154@gannet.stats.ox.ac.uk>
Message-ID: <CAEdd+FY2Wjc=LgAUCoymgtRpxek716Tanj2TOQdjKd9neuWLLw@mail.gmail.com>

>>> .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



[Rd] How to safely using OpenMP pragma inside a .C() function?
=?ISO-8859-2?Q?Pawe=B3_Matykiewicz?=