我在Ubuntu机器上运行R并试图利用远程Ubuntu机器进行并行处理。我可以ssh到远程机器。
hosts="remoteIPaddress"; cluster=makeCluster(hosts, type="PSOCK",user="myusername",master="mylocalIPaddress"); registerDoParallel(cluster); foreach(i=1:100,.combine="rbind") %dopar% i^2
makeCluster命令提示我输入密码,在远程计算机上,输入时可以看到R进程启动。这个过程立即死亡,当我运行foreach命令时,我得到“反序列化错误(节点$ con):从连接读取错误”。有谁知道发生了什么?
> sessionInfo()
R version 2.15.1 (2012-06-22)
Platform: x86_64-pc-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=C LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] grDevices datasets grid parallel utils stats graphics methods base
other attached packages:
[1] quantmod_0.3-17 TTR_0.21-1 Defaults_1.1-1 portfolio_0.4-5
[5] nlme_3.1-104 lattice_0.20-6 PerformanceAnalytics_1.0.4.4 xts_0.8-6
[9] zoo_1.7-8 np_0.40-13 cubature_1.1-1 doParallel_1.0.1
[13] iterators_1.0.6 foreach_1.4.0 boot_1.3-5
loaded via a namespace (and not attached):
[1] codetools_0.2-8 compiler_2.15.1 tools_2.15.1