Hello Group,

I am experimenting with parallel processing ... here is part of my code.

require(snow)
require(doSNOW)
require(foreach)
cl.tmp = makeCluster(rep("localhost",4), type="SOCK")
registerDoSNOW(cl.tmp)
        
foreach(i=1:NROW(sDat),.packages="gdata",.verbose=TRUE) %dopar% {

do something 1
do something 2
do something 3
}

I ran this individually without a parallel setup and it works perfectly

Now when I do the parallel invocation the error being thrown is that
the functions which I created are not being passed to the parallel
instances.
do something 1,2,3 above use my functions which I created in the code itself.

Is there someway that I can have then pass to the parallel routines?
Is this the right approach?

Thanks and have a nice weekend.
S

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to