Bokk, Gene
2013-Mar-08 17:51 UTC
[R] Passing command line arguments using parallel package
Hello, I was wondering if there is a way to pass a custom command line argument to slave processes using the parallel package. I need to do this because I have some logic in my .Rprofile that checks what arguments it was called with using commandArgs() and performs certain actions only if it was given a particular argument. I am running the following code on a Windows PC to start slave processes: require(parallel) cl <- makeCluster(8) parLapply(cl, mylist, myfunction) This seems to create R processes with the following arguments: Rterm.exe --slave --no-restore -e parallel:::.slaveRSOCK() --args MASTER=localhost PORT=10187 OUT=/dev/null TIMEOUT=2592000 METHODS=TRUE XDR=TRUE I would like to be able to add something like --myargument or MYARGUMENT=TRUE when the master process was started with the same argument. Thank you, Gene Bokk
Apparently Analagous Threads
- parallel:::newPSOCKnode(): background worker fails immediately if socket on master is not set up in time (BUG?)
- SUGGESTION: Proposal to mitigate problem with stray processes left behind by parallel::makeCluster()
- SUGGESTION: Proposal to mitigate problem with stray processes left behind by parallel::makeCluster()
- parallel:::newPSOCKnode(): background worker fails immediately if socket on master is not set up in time (BUG?)
- parallel:::newPSOCKnode(): background worker fails immediately if socket on master is not set up in time (BUG?)