R(64ビット)バージョン2.11.1をWindows 7にインストールし、並列処理のために「REvolutionforeachwindowsbundle」からdoSMPとrevoIPCをパッケージ化しました。次に、ライブラリdoSMPをRにアップロードし、Rから次のメッセージを受け取りました。
> library(doSMP)
Loading required package: revoIPC
Error: package 'revoIPC' is not installed for 'arch=x64'
この問題を回避する方法は?doSMPはRの32ビット分布では機能するようですが、64ビット分布では機能しないようです。
次のプログラムもテストしました
------------------------------------------------------
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
---------------------------------------------------------------------------
そして、私はRから次のメッセージを受け取りました
> workers <- startWorkers(4) # My computer has 2 cores
Error: could not find function "startWorkers"
> registerDoSMP(workers)
Error: could not find function "registerDoSMP"
助けてくれて本当にありがとうございます。
トニー