Skip to content
Back to formatted view

Raw Message

Message-ID: <D77D49DA-7B4B-4CCD-B6A3-A17F736A6FE0@gmail.com>
Date: 2013-01-31T16:59:49Z
From: michele caseposta
Subject: rgenoud and snow

Hello everyone.
I am trying to use rgenoud in a parallel environment.
While making some tests, I noticed that rgenoud seems not to be using the cluster created by makeCluster, doing all the computation in the main node.

Following is the example:

ncores <- 5
cl <- makeCluster(rep('localhost', ncores), type='SOCK')

evalFunc3 <- function(x){
  r <- rnorm(1000000)
  print(Sys.getpid())
  return(x[1]/2-x[2]^3+0.5)
}

genResSeq <- genoud(evalFunc3, nvars=2, max=T, pop.size=ncores, cluster = cl)

stopCluster(cl)

Is this the expected behavior? I would have guessed each node to be busy with the evaluation of the function for each individual, but it does not seem to be the case.