我剛剛在Mac OS-X Mountain Lion上使用本教程安裝了Rmpi
:http://www.stats.uwo.ca/faculty/yu/Rmpi/mac_os_x.htm。我只需要使用Rmpi來使用所有內核,而不是在硬件集羣或類似設備上部署。Rmpi是否需要互聯網連接?
其實,一切正常,但現在我體驗到,只要我沒有一個活躍的互聯網連接(如坐在火車上或只是轉動無線)產卵奴隸將失敗,我想知道這是否應該工作喜歡這個?
> require(Rmpi)
> mpi.spawn.Rslaves(nslaves=2)
--------------------------------------------------------------------------
At least one pair of MPI processes are unable to reach each other for
MPI communications. This means that no Open MPI device has indicated
that it can be used to communicate between these processes. This is
an error; Open MPI requires that all MPI processes be able to reach
each other. This error can sometimes be the result of forgetting to
specify the "self" BTL.
Process 1 ([[56132,1],0]) is on host: ABC-MB02
Process 2 ([[56132,2],0]) is on host: ABC-MB02
BTLs attempted: self sm
Your MPI job is now going to abort; sorry.
--------------------------------------------------------------------------
2 slaves are spawned successfully. 0 failed.
[ABC-MB02:53970] 2 more processes have sent help message help-mca-bml-r2.txt/unreachable proc
[ABC-MB02:53970] Set MCA parameter "orte_base_help_aggregate" to 0 to see all help/error messages
然後我的CPU的負載剛剛跳到100%,最終R會話會崩潰。
任何想法如何我可以避免這種行爲?這是我的sessionInfo
R version 2.15.2 (2012-10-26)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] graphics grDevices datasets stats utils methods base
other attached packages:
[1] Rmpi_0.6-3 ggplot2_0.9.3 stringr_0.6.2 reshape2_1.2.2 plyr_1.8
loaded via a namespace (and not attached):
[1] colorspace_1.2-1 dichromat_2.0-0 digest_0.6.3 grid_2.15.2 gtable_0.1.2 labeling_0.1
[7] MASS_7.3-23 munsell_0.4 proto_0.3-10 RColorBrewer_1.0-5 scales_0.2.3 tools_2.15.2
對於單個機器來說,使用'parallel'包中'mclapply'和朋友系列函數通常要方便得多,這些使用共享內存和分叉,而不是產生獨立的進程。它也可能有助於爲你的問題添加一個'mpi'標籤,因爲它聽起來不像R特有的。 –
@MartinMorgan謝謝你的建議。問題是,我並不真正控制使用哪個並行庫,因爲這些功能是在我正在構建的其他軟件包(來自Bioconductor的'xcms'和'CAMERA')中實現的。這些軟件包只是測試是否安裝了'Rmpi'(首選)或'snow',並將計算部署到我指定的多個核心。但是,用'雪'我可以繞過這裏描述的問題,但面對其他問題。 – Beasterfield
這些軟件包來自同一組;也許發送電子郵件到'packageDescription('CAMERA')$ Maintainer'和xcms會導致一個長期的解決方案? –