Re: R/CPU problems with openmosix

Dirk Eddelbuettel <[email protected]>
Newsgroups gmane.linux.cluster.openmosix.general
Message-ID <[email protected]>
On 7 March 2006 at 12:57, Smemoe, Richard L. wrote:
| We've got a problem using R (http://www.r-project.org
| <http://www.r-project.org/> ) to do matrix multiplication on our
| openmosix cluster.  When we force the R job to run on node #1
| (login/head node), it uses ~99% CPU, but if we force it to run on any
| other node (5 nodes), the job only uses 60 - 75% of the CPU and so takes
| longer to run.  Here is the code we're using to reproduce the problem:
| 
| n <- 200
| for(iter in 1:(10000)){
|   M <- diag(seq(0, 1, , n))%*%diag(seq(1, 2, , n))%*%diag(seq(0, 1, ,
| n)) }

That almost certainly invokes Atlas / Blas when you run. AFAIK these could be
tuned for parallelism, and (in the case of Atlas) are very sensitive to the
exact cpu model and cache size.  It could also explain why different sizes of
n matter disproportionately.

Maybe you should try a different algorithm for timing. I can also recommended
the simple function  system.time()  to wrap around R expressions for the
purposes of timing, and the pretty excellent R profiling mechanism -- see
	help(system.time)
	help(Rprof)
respectively as wall/system/user time may also be more relevant than reported
cpu usage.

Hth, Dirk

-- 
Hell, there are no rules here - we're trying to accomplish something. 
                                                  -- Thomas A. Edison


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.