Marta Tolós
2012-May-25 14:00 UTC
[R] [snowFT] Problems with passing arguments to performParallel
Hi all, I am trying to use performParallel from the snowFT package. But I have a really hard time to be able to pass arguments to the function that I want to run in parallel. Since I could not pass the arguments I create a XML file to read the information from there, the problem is that I can also not use some self-made functions that I have defined in another R file and that I source in order to use it. I tried to do: res<-performParallel(clusters, 1:clusters, fun=MainFunction, initfun=initFunction) where MainFunction and initFunction are functions that I created. The problem I have it is that inside the MainFunction I used some other functions that I have defined in a R file. So inside the initFunction I do a source of the R file containing the definitions. But when I run the command above I get an error saying that the function could not be found. The error is the following: Error in checkForRemoteErrors(val) : 2 nodes produced errors; first error: Error in fun(x, ...) : could not find function "ReadXMLConfig" In addition: Warning messages: 1: closing unused connection 4 (<-earth:10187) 2: closing unused connection 3 (<-earth:10187) Could someone help me with this? Thanks a lot!! Marta [[alternative HTML version deleted]]