I want to create my own version makePSOCKcluster
and newPSOCKnode
using ssh connection via plink. So I rewrite the code
if (machine != "localhost") {
rshcmd <- getClusterOption("rshcmd", options)
user <- getClusterOption("user", options)
cmd <- shQuote(cmd)
cmd <- paste(rshcmd, "-l", user, machine, cmd)
}
if (.Platform$OS.type == "windows") {
system(cmd, wait = FALSE, input = "")
}
else system(cmd, wait = FALSE)
according to my option, which gives me cmd
as follows:
plink -ssh Rebelion@ClusterNode1 -pw myPasswd123 "Rscript --default-packages=datasets,utils,grDevices,stats,graphics,methods -e parallel!:::.slaveRSOCK MASTER=CLUSTERNODE1 PORT=11038 TIMEOUT=2592000 XDR=TRUE".
ClusterNode1 is the current computer (I registered as Rebelion, this is the administrator login).
But system(cmd, wait=FALSE, input="")
gives me this:
Fatal error: creation of tmpfile failed -- set TMPDIR suitably?
I do not know why I get this error and what should I do. I set the variables TMPDIR
, TMP
and TEMP
how %USERPROFILE%/AppData/Local/Temp
, I set the privileges to the maximum for all types of users except guests.
Can someone help me solve this problem? Thnxs.