Windows 7에 R (64 비트) 버전 2.11.1을 설치했으며 병렬 처리를 위해 "REvolution foreach windows bundle"에서 doSMP 및 revoIPC 패키지를 설치했습니다. 그런 다음 라이브러리 doSMP를 R에 업로드하고 다음 메시지가 나타납니다.Windows 7 패키지의 64 비트 R 병렬 처리 doSMP
> library(doSMP)
Loading required package: revoIPC
Error: package 'revoIPC' is not installed for 'arch=x64'
이 문제를 해결하려면 어떻게해야합니까? doSMP는 64 비트 분포가 아닌 R의 32 비트 분포에서 작동하는 것으로 보입니다.
은 또한 다음과 같은 프로그램------------------------------------------------------
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"
많은 감사를 다음과 같은 메시지를 받았습니다.
토니
감사합니다. Dirk. doMC로 Linux 플랫폼을 사용해 보겠습니다. doSMP가 잠시 동안 Windows에서 32 비트 R에서만 작동한다는 것이 맞습니까? – Tony
나는 강설량 패키지에 꽤 만족합니다 : http://cran.r-project.org/web/packages/snowfall/index.html –
방금 강설량을 사용하여 CPU = 8과 병렬로 실행되는 프로그램을 테스트했는데, 꽤 빠릅니다 . 건배 - 토니 – Tony