并行計(jì)算-實(shí)驗(yàn)指導(dǎo)-搭建機(jī)群系統(tǒng)指導(dǎo)說明_第1頁
并行計(jì)算-實(shí)驗(yàn)指導(dǎo)-搭建機(jī)群系統(tǒng)指導(dǎo)說明_第2頁
并行計(jì)算-實(shí)驗(yàn)指導(dǎo)-搭建機(jī)群系統(tǒng)指導(dǎo)說明_第3頁
并行計(jì)算-實(shí)驗(yàn)指導(dǎo)-搭建機(jī)群系統(tǒng)指導(dǎo)說明_第4頁
并行計(jì)算-實(shí)驗(yàn)指導(dǎo)-搭建機(jī)群系統(tǒng)指導(dǎo)說明_第5頁
已閱讀5頁,還剩40頁未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

1、并行計(jì)算pc機(jī)群的構(gòu)建1 pc機(jī)群硬件部件的選擇12 pc機(jī)群軟件環(huán)境的配置22.1 os的選擇與安裝22.2 單登錄(single sign on)的構(gòu)建33單一文件系統(tǒng)(single file system)的構(gòu)建84 并行編程環(huán)境(parallel programming environment)的構(gòu)建145 單一作業(yè)管理系統(tǒng)(single job managemcrn system)的構(gòu)建186結(jié)束語27隨著計(jì)算機(jī)換件技術(shù)的高速發(fā)展,處理器和網(wǎng)絡(luò)的性能不斷地迅速提高和價(jià)格的口益下降,使得并行 計(jì)算口益從傳統(tǒng)的超級(jí)計(jì)算平臺(tái)轉(zhuǎn)移到由一組高性能節(jié)點(diǎn)或工作站/pc機(jī)構(gòu)成的稱z為機(jī)群的計(jì)算平臺(tái)

2、上,從而機(jī)群成為構(gòu)建可擴(kuò)放并行計(jì)算機(jī)的一大趨勢(shì)。機(jī)群在計(jì)算機(jī)界有很多稱呼,其中松耦合的工作站 / pc機(jī)群也被稱為工作站機(jī)群cow(cluster of workstation)或工作站網(wǎng)絡(luò)0w(network of workstation); 而緊耦合的高性能服務(wù)器節(jié)點(diǎn)機(jī)群也被稱為構(gòu)筑高端人規(guī)模并行機(jī)的機(jī)群系統(tǒng)(如sp2和option red)。本文將主要從pc機(jī)群軟、硬件環(huán)境的選擇及配置出發(fā)給出一個(gè)逐步的pc機(jī)群構(gòu)建手冊(cè),以使廣大的 科研工作者能夠更為方便的在pc機(jī)群環(huán)境中開展口 c的工作。并行計(jì)算機(jī)樣是目前市于便件的時(shí)效性很強(qiáng),所以給出例子的意義并不是很大。我們這里給出一套配 置主要是為

3、了以后敘述的方便,讀者應(yīng)該根據(jù)當(dāng)前最新的硬件信息進(jìn)行選擇。1 pc機(jī)群硬件部件的選擇在pc機(jī)群的構(gòu)建過程中,碾件部件應(yīng)根據(jù)所要部署應(yīng)用的類型乂針對(duì)性的加以選擇,具體原則請(qǐng)參 見并行算法實(shí)踐第2.2節(jié)(硬件的選擇與安裝)。本文沿用該章所給出的示例配置,如下:該pc機(jī)群包括1個(gè)服務(wù)節(jié)點(diǎn)(兼作計(jì)算節(jié)點(diǎn))和63個(gè)計(jì)算節(jié)點(diǎn)。(1)服務(wù)節(jié)點(diǎn)配置:cpu: pentium iv 2.0g (512kb 全速二級(jí)緩存)內(nèi)存:1g (2x512m) rambus硬盤:80gb ide主板:asus p4t socket 423網(wǎng)卡:3com 905 -tx (兩個(gè))顯卡、顯示器、鍵盤、鼠標(biāo)、光驅(qū)、軟驅(qū):略(2)

4、計(jì)算節(jié)點(diǎn)配置:cpu: pentium iv 1.5g (512kb 全速二級(jí)緩存)內(nèi)存:512mb (2x256m) rambus硬盤:40gbide主板:asus p4t socket 423網(wǎng)卡:3com 905 -tx另外,交換設(shè)備由2個(gè)3com 3c 16980和1個(gè)3com 3c 16985的交換機(jī)通過一個(gè)matrix module堆疊而成, 并安裝了一個(gè)千兆光纖模塊,以備服務(wù)接點(diǎn)連接內(nèi)部機(jī)群的網(wǎng)卡升級(jí)為千兆網(wǎng)卡。據(jù)此配直清單,從市場(chǎng)上采購換件并連接成功后便可以開始機(jī)群軟件環(huán)境的配直。2 pc機(jī)群軟件環(huán)境的配置如并行算法實(shí)踐第22節(jié)(軟件的選擇與安裝)本節(jié)將主要講述如何在linux

5、環(huán)境下構(gòu)建并行計(jì) 算pc機(jī)群的軟件環(huán)境。2. 1 0s的選擇與安裝linux是目前構(gòu)建高性能計(jì)算機(jī)群的一個(gè)最佳的選擇。在眾多的linux發(fā)行版本中,還要考慮的是系統(tǒng) 管理工具的友好性,這一點(diǎn)redhat與suse的工作是成功的;同時(shí)系統(tǒng)功能的可裁剪性也是很重要的,如de bian系統(tǒng)在這一點(diǎn)上做的就非常出色。在此筆者建議對(duì)linux系統(tǒng)冇比較深入認(rèn)識(shí)的讀者可選用debian作為系統(tǒng)平臺(tái),因?yàn)閐ebian能夠根據(jù) 用戶的需要最精確的選擇安裝、更新相應(yīng)的軟件包,避免過多的兀余服務(wù)占川系統(tǒng)資源,最大限度的滿足 用戶對(duì)性能的要求;若是linux系統(tǒng)的入門者則選用redhat或suse較為合適,因?yàn)檫@些

6、發(fā)行版本提供了較 為友好的用八安裝、使用界而,并口配備了圖形化的系統(tǒng)管理工具,避免了眾多的命令行操作。在所創(chuàng)建的示例機(jī)樣中使用的是redhat 9.0版木(內(nèi)核2.4.28)。介紹linux系統(tǒng)具體安裝的帖籍有很 多,這里就不再敷述。安裝過程中請(qǐng)選擇“定制”,并在“選擇軟件包組”時(shí)在默認(rèn)的基礎(chǔ)上選屮【服務(wù)器】丨【網(wǎng)絡(luò)服務(wù) 器】(telnet-serverrshserver)【服務(wù)器】i【服務(wù)器配置工具】(nfs等服務(wù)器配置工具)、【開發(fā)】i 【開發(fā)工具】(gcc等基本開發(fā)工具)、【系統(tǒng)】丨【管理工具】(圖形化的系統(tǒng)管理工具)等軟件包組。操作系統(tǒng)安裝完畢厲,我們假設(shè)具有如下信息:服務(wù)節(jié)點(diǎn)主機(jī)名為

7、“nodeo”, ip地址為“192. 168. 0. 100”;計(jì)算節(jié)點(diǎn)相應(yīng)的主機(jī)名為“nodel63 ”,ip 地址為 “192. 168. 0. 1.63”。2. 2單一登錄(single sign on)的構(gòu)建用戶對(duì)以從機(jī)群系統(tǒng)的任何一個(gè)節(jié)點(diǎn)登錄,而且在整個(gè)作業(yè)執(zhí)行過程中只需登錄一次,不必為將作業(yè) 指派到機(jī)群中的其它節(jié)點(diǎn)而重新登錄。這里我們采用并行算法實(shí)踐中所介紹的笫二種方法“構(gòu)建用戶 管理腳本”來維護(hù)系統(tǒng)中用戶信息的一致性,使用戶不再重復(fù)輸入密碼即可登錄到機(jī)群中的另一個(gè)節(jié)點(diǎn)上。 這包括以下步驟:以root用八登錄到節(jié)點(diǎn)nodeo,修改文件/etc/hosts、/etc/host.eq

8、uiv,在其中寫入機(jī)群所有卩點(diǎn)的名稱和ipoilshan的主目錄. 二文件(e)編伸終益 金轉(zhuǎn)列:q幫助(旦)rootodeo root# v i /e tc/hos t從這里丿l:始回收站roolixxieo:、1 月 02 口11:03ilshan的主冃錄從這里丿f始冋收站q roodnodco;、1:1 n目1 上;:一 h 工丄ili.(.mwil# do not rerwvelhe fo i lowing line, or var ious program.a# tha1 requ i rene iu)rk funct iona 1 i ty wi 11 fa i l127.0.0.

9、1locaihosl locaidora in loca ihos t00nodeonodelnode2node3node4no(le5node6node7knode8屹node90node 101node 11192.168.0 j2node 12192.168.0 j3node 134node 14192.1

10、68.0.15node 156node 16iroolnodeo1 :二11:14ilshan的主冃錄nxxemxieo:、-bx從這甲丿|:始冋收站工牛上:巫mp k!i'x) 終她 q帝助(h)rooliodeo root# v i /e tc/hos ts rool wodco root# v i /c tc/hos is cqui、i月02日12:38從這里開始叵1收站jlshan的e目錄root»ix)deo:in 02 q11:13圖42. 修改系統(tǒng)的服務(wù)設(shè)置,通過服務(wù)設(shè)置工具啟動(dòng)如下系統(tǒng)服務(wù):nfs、rcxec、rsh、login。其中厲而

11、三個(gè)服務(wù)是與remote shell相關(guān)的,負(fù)責(zé)在遠(yuǎn)程節(jié)點(diǎn)啟動(dòng)進(jìn)程。jlshan的主目錄v roor:£,nodco:文件(巳 編輯(£) cte(v) 終端 轉(zhuǎn)到(q ffiwxw rrooihodeo rootl* v i /eic/hosisrool®iodeo root# v i /e 1 c/hos t s (?quihttp服務(wù)器nfs服務(wù)器samba服務(wù)器目' 系統(tǒng)設(shè)暨、七 printing r&聲卡檢測(cè)互聯(lián)網(wǎng)辦公圖形聲音利視頻系統(tǒng)工具輕編程旨選項(xiàng)碣主文件夾幫助a;*安全級(jí)別總)l1期&時(shí)何e , 嗚網(wǎng)絡(luò)服務(wù)器g)運(yùn)行程序.0

12、杳找文件. 口打丿閔近的厲|ire which services will be running when the system starts 為添加/刪除應(yīng)用程序用門和組群鎖住屏器網(wǎng)絡(luò) °語«i 0徒盤 廚qi q點(diǎn)小rootnodeor1 月 02 口12:39圖5guestriodeo:服務(wù)配置住 1月02 li壯 12:423. 經(jīng)過上述設(shè)置后需以普通用戶身份測(cè)試rsh是否配置成功,運(yùn)行命令如圖7所示。對(duì)于root用戶需要經(jīng)過圖8所示的配置才可以不重新輸入密碼即可以通過rsh登錄遠(yuǎn)程節(jié)點(diǎn)。ishan的主目錄guest/mxjcot-bx從這里丿f始冋收站m上:巫mp

13、 k!i'x) 終她 q帝助(h)roolodeo root# v i /e ic/hos isroot mode0 root* v i /c ic/hos i scqu iv rrool uiodeo root# su - gues igues tiodeo gues t$ rsh nodeolas t log in: sun jan 2 12:27:26 from nodeo gues tiodeo gues t$ qguestnodeo:i月02日12:40ilshan的主冃錄nxxemxieo:、-bx工牛上:巫mp終她 q帝助(h)從這甲丿l:始rool<?node0

14、root mode0 rroot -hodeo rootiodeo last login: rool<?node0root# root# root# root#echo * r log in* >> /e tc/secureity echo "rcxcc* >> /c ic/sccurcity echo e rsh* >> /e tc/secureity r sh nodeosun jan 2 12:49:52 from nodeo root#冋收站i月02日12:544. 通過圖9所示的腳本即可以完成創(chuàng)建全局統(tǒng)一的用戶信息。該腳木首先在木節(jié)

15、點(diǎn)新增用八,然后通過rsh將用戶配管文件/etc/passwd復(fù)制到機(jī)群屮所有其余的節(jié)點(diǎn)。圖9屮建立了全局用戶cluster cilshan的主目錄從這里開始回收站/j- b x文件(e> 編輯(e> 査看終端 轉(zhuǎn)到(q 帑助(jh)|r log in: connect ion closed 叵root<«iodeo root# ca t /cius ter_user sh!/b in/shif -z $1 thenecho * usage : c lus ter_user usernant *exit 1c ise# add a user and se i i t

16、 s passed useradd $1 passed $1#0# copy the user conf ig f i les lo other nodes i=0uhile $i -it 63 doi" expr si 1echo 'copy config files lo node$i*rep /e tc/passd node$i:/e tc/passvd rep /e tc/group node$ i:/e tc/groupdone(i|roolode() rool” /clusher_uw$h clu“crvlroolnodeo:、1 月 02 li21:193單一文

17、件系統(tǒng)(single file system)的構(gòu)建nfs是-種unix/linux之間通過網(wǎng)絡(luò)共亨文件的標(biāo)準(zhǔn)方式。使用nfs,就能夠透明的安裝和訪問網(wǎng)絡(luò) 上遠(yuǎn)程主機(jī)的文件系統(tǒng),將其安裝(mount)在本地的文件系統(tǒng)屮,類似于windows下的映対驅(qū)動(dòng)器。在 示例機(jī)群屮,節(jié)點(diǎn)nodeo是服務(wù)器,把日錄/home和/cluster進(jìn)行共朝 節(jié)點(diǎn)node 1到node63是客戶端,把 服務(wù)器的/home和cluster女裝到自己的文件系統(tǒng)當(dāng)中。下面分別進(jìn)行討論:1. 首先在節(jié)點(diǎn)nodeo匕建立目錄/cluster,然后將該11錄授權(quán)給川戶cluster。jlshan的主目錄-bx(上:巫州出儀石(

18、0 終她 轉(zhuǎn)到(q ffiwxw從這里開冋收站rool<?node0 root mode0 rroot -hodeo 總用楚8 drvvxr-xr-x :drxr-xr-x root mode0root# nkd ir /c lus terroot# chou)clus ter : clus ter /cluster/ root# is -a i /cluster/2 clus ter clus ter 21 root root root# |4096 1月 2 13:56 4096 1月 2 13:56 roolnodeo:i月02日13:58圖102. 可以通過如圖11所示的服務(wù)器設(shè)

19、置工具配置共寧目錄,也可以通過圖12-13所示的直接修改 /etc/exports文件改變1=1錄的共享。圖13表示將口錄/home和/cluster以可讀可寫的方式共享給 /24 范圍(ip 從 到 54)內(nèi)的所冇機(jī)器。ilshan的主冃錄v roomxteo:if上:巫州出 k!ix) 終她 q ffiwxwroot# nkd ir /c lus terroot# chow)clus ter : clus ler /cluster/ root# is -a i /cluster/2 clustercluster40961

20、月2 13:5621 rootroot40961/2 13:56root# rool<?nodeo root mode0 r roolhodeost x drvvxr-xr-x :drxr-xr-x root mode0、服務(wù)卷i殳世、修改和刪除nfs共享府nfs眼務(wù)樓©附件首選項(xiàng)尊網(wǎng)絡(luò)服務(wù)器5l聯(lián)網(wǎng)辦公圖形聲音和視頻 系統(tǒng)工具融主文件夾 盤柄助g運(yùn)行程庫q査找文件口打丿國近的pnnling 聲卡檢測(cè) 安全級(jí)別 日期&時(shí)間 顯示根口令添加/刪除應(yīng)用樫肆 用戶和組群磴錄屛洛右http服務(wù)器ilshan的主冃錄冋收站8sl月02日13:58圖111匚hroolnodeo:1

21、 :二14:04jlshan的主冃錄從這里丿f始冋收站q root imxfeorl-lkzlx文件(e)編耕(e); d 轉(zhuǎn)到g葫如旦)/horn?/24( rw)a/ciuslorl1卜1/24( rw)l1卜1i.l1ll11l一 imli月02日14:30圖133運(yùn)行命令exportfs -a完成目錄的共享。rjlshan的主目錄|vrim)t?nodc():n xl工件(巳 編輯®終畑 ' li) ffiluxw從這里開始冋收站rool ?mode() root ihodco r rookwiodeo 總用彊8 drwr-

22、xr-x drwr-xr-x root ihodco r rookwiodeoroot# nkdir /clusterroot# chown ciustor:ciuster /cluster/ root# is -a i /cluster/2 clus ter cius ter21 root root root# vi /cic/cxports root# expor t fs -a4096 1月 2 14:31 4096 1月 2 14:31 .rootnodeo1月02日14:34圖144.客八端節(jié)點(diǎn)同樣需要首先建立/cluster日錄,然后修改分區(qū)配置文件/etc/fstab,在其中加入

23、xj/home和/cluster的映射。jlshan的主目錄v rootnode 1:文件(e>徧輯(e)終端轉(zhuǎn)到(q帝助(11)從這里開始rootriode! root# nkd ir /clus ter rootriode 1 root# vi /etc/fstab回收站rootnode 1:圖15jlshan的主目錄文件(e> 編輯(e) 杳看(y) 終端 轉(zhuǎn)到 mwj(h)從這里丿l:始回收站label*/ext3defau 1 ts1 1none/dev/ptsdevptsg id=5 , nude =6200 0lauel=/honr/honrext3defau 1 i

24、s1 2nonezprocprocdefau 1 is0 0none/dev/shmtnpfsdefau 11 s0 0/dev/sda2swapswapdefau 1 ts0 0/dev/edrom/nnt/edromudf, iso9660 noauto.ouner kudzu. ro 0 0/dcv/fdo/iml/floppyau lonoauto»ouncr.kudzu 0 0nodeo:/honr/honrnfsnodeo:/clus ter/clusternfsli月0321:07圖165.運(yùn)行命令mount -a完成目錄的共享。jlshan的主目錄從這里開始回收站文件

25、(e>編輯®終錦轉(zhuǎn)到(q帝助(u)rootriode! root#iikd ir /clus lerrootnodel root#v i /e tc/fs tabrootriode 1 root#iroun t -arootriode 1 root#df -h文件系統(tǒng)9ft已用可用已用掛裁點(diǎn)zdev/sdai2.9g1.7g1.1g 63%/dev/sda3888mi9m825m3%/honrnone30m030m0%/dev/shmnodeo:/horn?888m19m825m3%/honrnode0:/cluster2.9g1.8g1.1g 63%/clusterrootr

26、iode! root# |rootnode 11月0321:10圖176.通過圖18中的腳本可以將該分區(qū)配置文件拷貝到機(jī)群中所冇其他節(jié)點(diǎn)。jlshan的主目錄y roolotkxieo:文件® 編銀® ft v) 終端轉(zhuǎn)到(q衍助qp從這甲丿l:始rookwodeo root# ca t /clus ter_nfs sh #!/b in/sh冋收站$i -it 63 fitflf copy the nfs conf ig files lo other nodes i-1 uh i le doi= expr $i + 1echo * copy conf ig files io

27、 node$i* rep node 1:/c tc/fs tab nodc$i:/ctc/fstabdone(root(snode() root# /clus ternfs 5h rootnodeo:i月02日21:15圖184 并行編程環(huán)境(parallel programming environment)的構(gòu)建mpi (message passing interface):消息傳遞接口 mpi忖前是最流行的分布存儲(chǔ)并行編程環(huán)境。mpich 是由美國的argonne國家實(shí)驗(yàn)室開發(fā)的基于mpi標(biāo)準(zhǔn)的一套開放源碼的軟件包,日前最新的版本是124。 從鏈接hltd:/www-unix.mcs.an

28、/mdi/mdich/口以獲得更多關(guān)于mpich的資料以及下載該軟件包。其具 體配置步驟如下:1.首先需要結(jié)壓縮安裝文件包并通過configure腳本完成初始配置。其中-prefix指定 /cluster/mpich為女裝h錄;一with-device指明所使用的通信系統(tǒng)類型為tcp/ip通信系統(tǒng); with-arch指明所使用的操作系統(tǒng)為linux。ishan的主目錄kxmtgnodco:/( iuslrl文件(£)查看(藝 終端 轉(zhuǎn)到(q桶助(也從這里丿f始冋收站irootriode0 root# cd /cluster/ rooliodeo cluster# is i

29、rpich tar gzi roo tviodeo【roo t riode 0 itpich-1 .2 6roo triode 0clus ter# tar zxf np ich lagz cluster# isnpich lar gzcluster# |root*nodeo:/cluster1月0303:04圖19ilshan的主冃錄文件(£)查看(藝 終端 轉(zhuǎn)到(q桶助(也從這甲丿l:始冋收站rootriode0 root# cd /clus ter/npich-1.26/rootriode0 npich-1 .2.6# ./configure prefix-/clus tcr/

30、npich wi th-dev ice ch4 一wi th-arch=llnljxconfiguring wi t h args prefix=/clus ter/npich wi th-dev ice=ch_p4 wi th-arch=ll nuxconfiguring npich version 1.2.6 (release) of : 2004/08/04 11:10:38 check ing check ing check ing check mgwho thcr f i lesys tcm respects case in f i ic nanvs . yes for curren

31、t d irectory nanv /cluster/npich-126 for ins ta 11for ran 1 ibcheck ing gnurwke yes us ing -no-pr in t-d i rec toryhc thcr imkc suppor is include yesosf for for forcheck ing check ing check ing check ing check mgv3 m)ke . nov i r tua 1 pa th forrib t . vpath xlcgf3| roottmxieo:/chtstor/m pich-! 262.

32、完成初始配置z后即"j以使用make、make insuill完成mpich的女裝。1月0303:07jlshan的主目錄rooi(ip!m>dco;/dus tcr/nwidr j 2文件(£> mw(b>查看y 終端 轉(zhuǎn)到(q 桶助(也從這里丿f始冋收站check ing check ing check ing check ing check ing upda t ing crcaiing crea t ing crea t ing crea t ing creai ing creaiinguhelhcr i inr.h and sys/t inr h

33、 miy both be included yes hc thcr s iruct im is in sys/1 inr .h or linv.h i im? .h for work ing cons t ye$ for restrict _restr ictfor long long yescache /conflg.cachc./conf ig s ta tusmkefilenpptes tconfhnp id/ch_p4/mke f i lenpid/tests/mkef i lenpichconf.hlipichconfh is unchangedityou shou id reg i

34、 s ter your copy of p1 qi wi th us by send ing rra to iwjordond/mtvs anlgov con (a in ing the iw ssage subscr ibc npi usersth is wi 11 a i low us to notify you of new re leases of pich.you can a iso check the npich honr page a t hl tp: /ww.nvs an i gov/irpi/np ichconfigurai ion conpleled. rootiodeo

35、npich-1.2.6# rake3| roottmxieo:/chtstor/m pich-! 261月0303:15圖21jlshan的主目錄文件(£)查看(藝 終端 轉(zhuǎn)到(q桶助(也從這甲丿l:始send bugs and comwn t s to up i-bugs®n:s .an i .govbugs and comwnts in the suppor i shou id be sent to npi2cpp-deve lbs i .bugs and comwn t s in the npi-1o suppor t shou id be sent to

36、 romio-!w in tdrrs .an i gov冋收站w th any bug repor t. please sendthe vers ion of 卜pi ch (e g 1 .2 .6)the output of (e g npirunrunn ing your program wi th the -np ivers ion arguiwn i -np1 a.oul -npivers ion)the output ofunanr-afor your sys tern h inv1 f you are on an sgi sys tem. a isowi lh a scr ipt

37、i ike configure or np i run. run i he scr ipl wi t hi f the problem isthe -echo argunrnt (e.g. npirun -echo -np 4 a .out >i f you are us ing a ne tu)rk of u)rks ta i ions. a iso send the output of bin/tstrrachincs root3iode0 npich-1 .2 .6# nake ins ta 113| roottmxieo:/chtstor/m pich-! 261月0303:21

38、3. 修改mpich的節(jié)點(diǎn)配置文件/cluster/mpich/shar/machines.linux,指明該機(jī)禪所包含的節(jié)點(diǎn)。jlshan的主目錄h-: 'i : :/clustcr/nn)idi/sliaic文件(£)查看q) 終畑 轉(zhuǎn)到(q 桶助(也b x從這里丿f始冋收站/clus ter/npich/bin/npicxx -c he 1 lo*.ccin f i ic inc ludcd from /usr/ inc ludc/c*/3.2.2/l)ackoi d/ ios i reamh:31 from he i io* cc:29:/usr/ include/c

39、+/3 2 2/backxard/backard_arn ing h: 32:2: arn ing: #arn ing th i s f ile includes a t leas t one depreca ted or an t iqua ted header please cons ider us in g one of the 32 headers found in sect ion 17 >4 12 of the q* s landard. exanplcs inc ludc subs t i tuiing the <x> headcr for i he <x

40、.h> header for inc ludcs. or <s s t reani> ins lead of the depreca ted header <s t r s tream.h> . to d isable this warning use -¥>o-depreca ted./clus ter/npich/bin/npicxx /clus ter/np ich/b in/np i (77 /cluster/np ich/b in/up if 77 /cluster/np ich/b in/np if 77 /clus ter/np ic

41、h/b in/np i f77 /clus ter/rrpich/bin/irpicc-o hello" he 1 io+ o-c pi3fo pi3 pi3.o-c pi3p.f-o pi3p pi3po-c cpilogc/cluster/npich/bin/npicc epilog cpiiogo lnpc -im /bin/rm -f *.o pi* cpi pi3 si叩icio he 1 io* pi3f90 cpilog /bin/rm - rf sunvv>_cache ii.fi les pi3f90. f pi3p cpip . i i . i i ins

42、ta 1 led much in /clus ter/叩 ich/clus ter/rrp ich/sb in/lip iun ins ta 11 rray be used to renuve the ins la 1 la t ion rootiodeo npich-i.2.6# cd /clus ter/npich/share/ rootiodco sharejft is exanples irachines .linux “chines . saiiple mkef i le .sanple iroo t 5hode0 share# v i nach ines.linuxrootimxi

43、eo:/chister/mp>ch/share圖2301月0303:24jlshan的主冃錄jootfinodeo;zdusiazmdidmsha 他b x文件(£)查看q) 終畑 轉(zhuǎn)到(q 桶助(也從這甲丿l:始冋收站nunber of processors in an snp the hos tnaiw shou id i he resu 11 from the comm nd "hos tnanv*25l. 415c3| roottmxieo :/chtsto r/m pich/ s ha rea1月0303:304.在安裝目錄的example子目錄下可以找到其

44、所提供的示例源程序,通過編譯運(yùn)行cpi程序可以測(cè)試該mpi編程環(huán)境是否建立成功。ilshan的主目錄從這里丿f始冋收站|文朱£) 編他e) 住看(丫) 終瑞 轉(zhuǎn)到(q 幫助(11)rooliodco root# cd /clustcr/iipich/cxaiiples/hroot<<qiodeo exanples# iwke cpi/clus ter/npich/bin/irpicc -c cpi.c/clus ter/np ich/b in/np icc -o cp i cpi.o -imlrootriode0 exanples su clusterclusicrhod

45、co exanplcs$ ./lipirun -np 2 cpiprocess 0 on nodeoprocess i on node ipi is approx irrately 3.1416009869231241 error is 0.()000083333333309 wall clock tinr = 0.171943clusterhodeo exanples$blclusternodeoz/cluster/nipich/exan1月0303:34圖255單一作業(yè)管理系統(tǒng)(single job management system)的構(gòu)建pbs是由nas (national acade

46、my of sciences)刃:發(fā)的面向批作業(yè)調(diào)度以及系統(tǒng)資源管理的軟件包。它主要用于管理使用unix或linux的同構(gòu)或異構(gòu)的機(jī)群系統(tǒng)。這里主要介紹openpbs的安裝及簡單使用。1.首先需要解壓縮女裝文件包并通過configure腳本完成初始配置。其小-prefix指定/pbs_ home為 安裝目錄;-set-server-home指定openpbs的spool目錄,其用丁存放各守護(hù)進(jìn)程的配置文件、 log文件以及任務(wù)調(diào)度的臨時(shí)數(shù)據(jù)。一set-default-server指定該機(jī)群系統(tǒng)的作業(yè)服務(wù)守護(hù)進(jìn)程 (job server)所處的節(jié)點(diǎn)為nodeoorishan的主目曝文件<e

47、 編輯® se<v) 終端 轉(zhuǎn)到(q 幫助(蟲從這里開始叵1收站roothodeo root# cd /clus ter/root phodeo clus ter# isnp ich np ich-126 np ich lar gz (renpbs 2 s _ 1 * t a r g z pbs .psxh rool<9hodeo roofiqiodeo 叩ich np i ch-1.2.6 r root shodeo rookiodeoc lus ler# tar zxf openpbs_2_36lagz cluster# is叩ich tar .gzq)cnpbs_2

48、_36 tar .gz(”cnpbs_2_3g pbs .pa tchcluster* cp pbs.patch /q)enpbsj2j36 cluster# cd openpbs.2_3.16newroo tjqiodeo cpenpbs_2_36# pa tch -pl -b < pbs .patch paich ing f i le bu iidu t iis/rrakedepend-sh pa tch i ng file src/1ib/liblog/pbs_log c pa tching f ile src/server/svr_connect.croot>odeo q)

49、cnpbs_2_3_16# ./configurc 一prefixr/pbsjionv/ set-server-hoire/ pbs.horw/spool se t-defaul servernodeoj|rool*node07clusler/opeiipbs _2 _:ih 0305:01圖262.完成初始配置z后即可以使用make、make install完成openpbs的安裝。rj ishan的主目錄j(xxnjcq;/du5lcr/qppnpbs/j 16文件 編輯(e)査看 終l«cd wmjj'w從這里開始冋收站newcrealing crca t ing cr

50、ca t ing crea t ing crea t ing crealing crca t ing crca t ing crea t ing crea t ing crea t ing crea t ing creaiing crea t ing crea ting crea t ing crea t ing creaiing crea t ing crea ting crea t ing crea t ing creaiingsrc/tools/mkefi lesrc/ lools/xpbsiron/mikcf i ic src/ i ib/mkef i le sre/gui/mkef i l

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論