歡迎您光臨本站 註冊首頁

請問單機四核用mpich編譯和配置

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

請問單機四核用mpich編譯和配置

cpu為廢龍9550
我想把每個核當成一個節點,
如果9550能自動分配線程就不用把把每個核模擬成節點了。
又一問題:
  mpdrun -n 4 cpi
當我扒開網線的時候,
# n0_50534 (mpd_sockpair 226): connect -2 Name or service not known
n0_50534 (mpd_sockpair 233): connect error with -2 Name or service not known
n0_mpdman_0: mpd_uncaught_except_tb handling:
  socket.error: (111, 'Connection refused')
                  …………
我編譯的時候的選項是  --with-device=ch3:nemesis,
如何默認為shared memory而不是sockets阿。
《解決方案》

改了編譯方式
--with-device=ch3:shm
拔了網線還會
# mpiexec -n 50 ./cpi
mpiexec_n0 (mpiexec 392): no msg recvd from mpd when expecting ack of request


1.2g的內存
mpiexec -n 100 ./cpi
# mpiexec -n 100 ./cpi
Fatal error in MPI_Init: Other MPI error, error stack:
MPIR_Init_thread(294)......: Initialization failed
MPID_Init(94)..............: channel initialization failed
MPIDI_CH3_Init(265)........: Unable to allocate shared memory
MPIDI_CH3I_SHM_Get_mem(170): Out of memoryrank 0 in job 32  n0_48706   caused collective abort of all ranks
  exit status of rank 0: killed by signal 9

內存不夠了,n = 100000000;                        /* default # of rectangles */

開到50個進程就要用到交換分區了。
《解決方案》

回復 #1 長灣 的帖子

主機資源不是很高呀
《解決方案》

mpiexec -n 20 ./cpi
安裝文件自帶的例子。

為什麼每開一條進程就多出一個python2.4進程,每條python進程居然佔6.1M的駐留內存。

是不是一定要python來輔助運行?
怎麼設置讓內存變小一點?
《解決方案》

原帖由 長灣 於 2009-4-3 02:55 發表 http://linux.chinaunix.net/bbs/images/common/back.gif
cpu為廢龍9550
我想把每個核當成一個節點,
如果9550能自動分配線程就不用把把每個核模擬成節點了。
又一問題:
  mpdrun -n 4 cpi
當我扒開網線的時候,

我編譯的時候的選項是  --with-device=ch3:nem ...

taskset & numactl

你用錯方法了. MPI和你沒有關係.
《解決方案》

原帖由 nntp 於 2009-4-4 18:14 發表 http://linux.chinaunix.net/bbs/images/common/back.gif


taskset & numactl

你用錯方法了. MPI和你沒有關係.

我看中mpi的消息傳遞,自己不想寫多線程。不知道我的做法有誤沒有,麻煩指正。
《解決方案》

# mpiexec -n 100 ./cpi
[,0] ORTE_ERROR_LOG: The system limit on number of pipes a process can open was reached in file base/iof_base_setup.c at line 108
[,0] ORTE_ERROR_LOG: The system limit on number of pipes a process can open was reached in file odls_default_module.c at line 203
--------------------------------------------------------------------------
mpiexec was unable to launch the specified application as it encountered an error:

Error: system limit exceeded on number of pipes that can be open
Node: n0

when attempting to start process rank 91.

This can be resolved by either asking the system administrator for that node to
increase the system limit, or by rearranging your processes to place fewer of them
on that node.


挖坑,這個是open mpi
《解決方案》

# mpiexec  -n 100 ./ring_c
[,0] ORTE_ERROR_LOG: The system limit on number of pipes a process can open was reached in file base/iof_base_setup.c at line 108
[,0] ORTE_ERROR_LOG: The system limit on number of pipes a process can open was reached in file odls_default_module.c at line 203
mca_oob_tcp_accept: accept() failed: Too many open files (24).
mca_oob_tcp_accept: accept() failed: Too many open files (24).
--------------------------------------------------------------------------
Sorry!  You were supposed to get help about:
    orterun:sys-limit-pipe
from the file:
    help-orterun.txt
But I couldn't find any file matching that name.  Sorry!
--------------------------------------------------------------------------
mca_oob_tcp_accept: accept() failed: Too many open files (24).
mca_oob_tcp_accept: accept() failed: Too many open files (24).


mark
《解決方案》

:em14:
32位win單核下10位計算pi的時間是4秒不到(今晚不知道怎麼搞得,變了7秒了,難道裝了個vs8就變成這樣?之前的.net是2.0,現在的是3.5,不知道有沒有關係呢?),64位rhel5。3單核的時間是41秒。
虛擬機個32位win,跑的時間是14秒,主機rhelcpu自動降頻1.1G,就算虛擬機裡面的系統100%運行,也不升到2.2G。
:outu:

[ 本帖最後由 長灣 於 2009-4-14 20:28 編輯 ]
《解決方案》

:shock:
而且win下多進程等待輸入時cpu佔用為0,而lin下居然四個核都100%,不多於4個時,openmpi有一個核的cpu佔用為0,
難道是lin下的進程通訊開銷特別大?

[火星人 ] 請問單機四核用mpich編譯和配置已經有663次圍觀

http://coctec.com/docs/service/show-post-6498.html