我想通过 plink 创建自己的变体makePSOCKcluster
并newPSOCKnode
使用 ssh 连接。所以,我重写代码
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)
通过我的变体,这给了我cmd
这样的:
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 是当前机器(我以 Rebelion 登录,它是管理员登录)。
但是system(cmd, wait=FALSE, input="")
给了我这个:
Fatal error: creation of tmpfile failed -- set TMPDIR suitably?
我不知道为什么我会收到这个错误,我该怎么办。我将和变量设置为TMPDIR
,我为除客人之外的所有类型的用户设置了最大权限。TMP
TEMP
%USERPROFILE%/AppData/Local/Temp
谁能帮我解决这个问题?谢谢。