Hi, The following function use to work, but now it doesn't giving the error
"> CallSnow(, 100) Using snow package, asking for 2 nodes 2 slaves are spawned successfully. 0 failed. Error in checkForRemoteErrors(val) : 2 nodes produced errors; first error: no applicable method for 'lapply' applied to an object of class "list" ". Where this is the problem line of code "yusum <- parLapply(cl, yu, sum)" The function is CallSnow <- function (Nnodes = 2, Nsamples = Nnodes) { require(Rmpi) require(snow) cat("Using snow package, asking for ", Nnodes, "nodes \n") cl <- makeCluster(Nnodes, type="MPI") on.exit(stopCluster(cl)) #print(do.call("rbind", clusterCall(cl, function(cl) Sys.info()["nodename"]))) # ## uses RSPRNG if there # #clusterSetupSPRNG(cl) clusterSetupRNGstream(cl, seed = rep(123456, 6)) yu <- clusterCall(cl, runif, Nsamples) yusum <- parLapply(cl, yu, sum) print(yusum) yn <- clusterCall(cl, rnorm, Nsamples) print(yn) return() } This is under R-2.12.1. on a windows Xp machine. This function still runs satisfactorily on a machine running r-2.11.1 under Suse10.3/sles. Thanks Mark Palmer Senior Statistician CSIRO Mathematics, Informatics and Statistics Phone: +61 8 9333 6293 | Fax: +61 8 9333 6121 | Mobile: 0427502353 mark.pal...@csiro.au<mailto:mark.pal...@csiro.au> | www.csiro.au | www.csiro.au/cmis<http://www.csiro.au/cmis> Address: Private bag 5, Wembley, WA 6913, Australia PLEASE NOTE The information contained in this email may be confidential or privileged. Any unauthorised use or disclosure is prohibited. If you have received this email in error, please delete it immediately and notify the sender by return email. Thank you. To the extent permitted by law, CSIRO does not represent, warrant and/or guarantee that the integrity of this communication has been maintained or that the communication is free of errors, virus, interception or interference. Please consider the environment before printing this email. [[alternative HTML version deleted]] ______________________________________________ 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.