I have installed R (64-bit) version 2.11.1 on Windows 7 and also packages doSMP and revoIPC from "REvolution foreach windows bundle" for parallel processing. I then uploaded library doSMP into R and got following messages from R
> library(doSMP)
Loading required package: revoIPC
Error: package 'revoIPC' is not installed for 'arch=x64'
How to get around this problem? It seems that doSMP works on a 32 bit distribution of R but not the 64 bit distribution.
I also tested the following programme
------------------------------------------------------
require(doSMP)
workers <- startWorkers(4) # My computer has 2 cores
registerDoSMP(workers)
# create a function to run in each itteration of the loop
check <-function(n) {
for(i in 1:1000)
{
sme <- matrix(rnorm(100), 10,10)
solve(sme)
}
}
times <- 10 # times to run the loop
# comparing the running time for each loop
system.time(x <- foreach(j=1:times ) %dopar% check(j)) # 2.56 seconds (notice that the first run would be slower, because of R's lazy loading)
system.time(for(j in 1:times ) x <- check(j)) # 4.82 seconds
# stop workers
---------------------------------------------------------------------------
And I got the following messages from R
> workers <- startWorkers(4) # My computer has 2 cores
Error: could not find function "startWorkers"
> registerDoSMP(workers)
Error: could not find function "registerDoSMP"
Many thanks for your help.
Tony