ARAVision Proprietary and Confidential All rights reserved ARAComputing

  • Slides: 41
Download presentation
ARAVision Proprietary and Confidential. All rights reserved. 交通大學應用數學 ARAComputing System 操作手冊 簡嘉宏 nelsonjian@aracity. com

ARAVision Proprietary and Confidential. All rights reserved. 交通大學應用數學 ARAComputing System 操作手冊 簡嘉宏 nelsonjian@aracity. com 0982838185

ARAVision Proprietary and Confidential. All rights reserved. • Part I: 使用者須知與操作說明

ARAVision Proprietary and Confidential. All rights reserved. • Part I: 使用者須知與操作說明

ARAVision Proprietary and Confidential. All rights reserved. Architecture 專案範圍 Matlab 2009 a(五人同時使用授權) Service Node

ARAVision Proprietary and Confidential. All rights reserved. Architecture 專案範圍 Matlab 2009 a(五人同時使用授權) Service Node NIS/NFS Matlab 2008 a WAN/LAN 250 GB dl 320 Compiler: Intel 11. 1 -059 Plot: Tecplot 360 Compute Node Intel 5430 Intel 5570 clw 01 clw 02 clw 03 clw 04 Switch 140. 113. 22. 0/255. 0 140. 113. 25. 0/255. 0 RHEL 5. 3 NIS NFS: /data Network=

ARAVision Proprietary and Confidential. All rights reserved. 帳號整理 • 原舊帳號保留,密碼未設,無法登入 帳號名稱 UID GID 目錄

ARAVision Proprietary and Confidential. All rights reserved. 帳號整理 • 原舊帳號保留,密碼未設,無法登入 帳號名稱 UID GID 目錄 shuming 501 500 dl 320: /home/shuming cchuang 502 500 /data/cchuang dl 320: /home/cchuang sung 503 500 /data/sung wwlin 504 500 /data/wwlin qiang 505 500 /data/qiang tcwu 506 500 /data/tcwu giang 507 500 /data/giang min 508 500 /data/min yeno 326 509 500 /data/yeno 326 yen 0326 510 500 /data/yen 0326 femstu 1 511 500 /data/femstu 1 femstu 2 512 500 /data/femstu 2 femstu 3 513 500 /data/femstu 3 femstu 4 514 500 /data/femstu 4 femstu 5 515 500 /data/femstu 5 test 1 516 500 /data/test 1 test 2 517 500 /data/test 2 test 3 518 500 /data/test 3 guest 519 500 /data/guest ellie 520 500 clw 01: /home/ellie chuang 521 500 clw 01: /home/chuang

ARAVision Proprietary and Confidential. All rights reserved. 帳號整理(續) • 原舊帳號移至T群組的UID/GID分配、目錄與預設密碼 帳號名稱 UID GID 家目錄

ARAVision Proprietary and Confidential. All rights reserved. 帳號整理(續) • 原舊帳號移至T群組的UID/GID分配、目錄與預設密碼 帳號名稱 UID GID 家目錄 其他目錄 billing 1001 1000 /data/T/billing clw 01: /home/billing matlabuser 1002 1000 /data/T/matlabuser smchang 1003 1000 /data/T/smchang dl 320: /home/smchang ytli 1004 1000 /data/T/ytli dl 320: /home/ytli mclai 1005 1000 /data/T/mclai clw 01: /home/mclai ctw 1006 1000 /data/T/ctw clw 01: /home/ctw 預設密碼 • 廠商管理群組 群組名稱 GID aracity 600 • 廠商管理帳號 帳號名稱 UID GID 家目錄 註: aracity 600 /home/aracity dl 320, clw 01~04都有單獨的家目錄/home/aracity

ARAVision Proprietary and Confidential. All rights reserved. 如何登入系統 在 Windows 環境的客戶端下連結本系統(4) • 設定PUTTY連線時,將X 11

ARAVision Proprietary and Confidential. All rights reserved. 如何登入系統 在 Windows 環境的客戶端下連結本系統(4) • 設定PUTTY連線時,將X 11 Forward過來 – 接著,在使用putty遷入系統時,別急 著按Open,先到Category中, Connection -> SSH -> X 11 – 將Enable X 11 forwarding選項打開 – 接著再按Open,打開terminal – 輸入帳號密碼,登入系統

ARAVision Proprietary and Confidential. All rights reserved. 如何登入系統 在 Linux 環境下的客戶端連結本系統 • • 我們使用aracity這個帳號來展示,請在使用時,依實際情況,換成您的帳號名稱。

ARAVision Proprietary and Confidential. All rights reserved. 如何登入系統 在 Linux 環境下的客戶端連結本系統 • • 我們使用aracity這個帳號來展示,請在使用時,依實際情況,換成您的帳號名稱。 系統遷入 – 如果您是在xwindow下,請先開啟 terminal – 使用ssh連入:$> ssh aracity@140. 113. 22. 105 • 檔案傳遞 – 如果您是在 xwindow下,請先開啟terminal – 第一招 - 使用sftp • • • $> sftp aracity@140. 113. 22. 105 sftp> put <file> 將檔案放上去 sftp> get <file> 將檔案傳回來 – 第二招 – 使用scp • • 將檔案file. dat傳上去到家目錄目錄下 $> scp file. dat aracity@140. 113. 22. 105: /home/aracity 將在Cluster上的檔案/home/aracity/file. dat給傳回來 $> scp aracity@140. 113. 22. 105: /home/aracity/file. dat. / 將目錄myjob整個傳上去到家目錄下 $> scp –r myjob aracity@140. 113. 22. 105: ~/ X 11桌面:不需設定,在使用ssh連入時加上-X就可以了 – $> ssh –X 140. 113. 22. 105

ARAVision Proprietary and Confidential. All rights reserved. 一般使用者如何更改密碼? • 範例: – 使用aracity帳號,請登入clw 01~clw 04任何一台電腦

ARAVision Proprietary and Confidential. All rights reserved. 一般使用者如何更改密碼? • 範例: – 使用aracity帳號,請登入clw 01~clw 04任何一台電腦 – 請勿登入dl 320上去更改密碼,會無法更改成功 – $> yppasswd Changing NIS account information for aracity on dl 320. Please enter old password: <- 鍵入舊密碼 Please enter new password: <- 鍵入新密碼 Please retype new password: <- 再鍵入一次新密碼 The NIS password has been changed on dl 320. <- 出現這行,表示成功更改密碼囉!

ARAVision Proprietary and Confidential. All rights reserved. Intel編譯器的使用 • • 請登入至clw 04(140. 113. 22.

ARAVision Proprietary and Confidential. All rights reserved. Intel編譯器的使用 • • 請登入至clw 04(140. 113. 22. 105, clw 04. math. nctu. edu. tw)裡 序列程式,沒有多執行緒的單線緒程式 – 一般最佳化 icc(ifort) –O 2 –x. S myprogram. c(myprogram. f 90) –o myprogram. exe – 完全最佳化 icc(ifort) -fast myprogram. c –o myprogram. exe 註:但在clw 04以完全最佳化編譯好的程式無法到clw 01跑,因為CPU架構不 – Compiler flags for optimized compiling • Optimized job compiled – General Optimized » IPO : if you don’t link other library icc(ifort) –O 3 –ipo -static –x. T » General : if you want to link other library icc(ifort) –O 2 –x. T – General SSE vectorized optimized with Pentium 4 » icc(ifort) –O 2 –ax. W (with SSE 2 extensions) » icc(ifort) –O 2 –ax. T (with SSE 3 extensions) » icc(ifort) –O 2 –ax. S (with SSE 4. 1 extensions) Because libraries are often compiled by using “ –O 2” flag without “-ipo” optimization

ARAVision Proprietary and Confidential. All rights reserved. Intel編譯器的使用 • Precision Improve – Maintain the

ARAVision Proprietary and Confidential. All rights reserved. Intel編譯器的使用 • Precision Improve – Maintain the floating point precision • Sometimes compiler do the optimization overly, it will cause the precision problem • icc(ifort) –mp 1 ( speed impact is less than –mp ) • General Compiling Flag – include directory • <compiler> -I <include directory> – ex: ifort –I ~/myinclude – Link Libraries • <compiler> -L <library directory> -l<libname> – ex: You have a library named libfftw. a and placed in ~/mylib ifort –L ~/mylib –lfftw – give the execution filename • <compiler> -o <execution filename> – ex: ifort …. –o myprogram. exe

ARAVision Proprietary and Confidential. All rights reserved. Intel編譯器的使用 • Parallel Job – compile OMP

ARAVision Proprietary and Confidential. All rights reserved. Intel編譯器的使用 • Parallel Job – compile OMP job • c pragma or fortran directive inline: – icc –fast –openmp myprogram. c –o myprogram. exe – ifort –fast –openmp myprogram. f 90 –o myprogram. exe • auto-parallelized: – icc –fast -parallel myprogram. c –o myprogram. exe

ARAVision Proprietary and Confidential. All rights reserved. 執行你的 作 • Sequential Job – 使用ssh登入到任一計算節點clw

ARAVision Proprietary and Confidential. All rights reserved. 執行你的 作 • Sequential Job – 使用ssh登入到任一計算節點clw 01~clw 04 – 更改目錄(ex ~/myprogram)到置放執行檔(ex: a. out)的地方 $> cd myprogram – 執行 $>. /a. out • OMP Parallel Job – 使用ssh登入到任一計算節點clw 01~clw 04 – 更改目錄(ex ~/myprogram)到置放執行檔(ex: a. out)的地方 $> cd myprogram – set OMP number of threads runtime environment variable : • export OMP_NUM_THREADS=<number_of_threads> – Set OMP runtime stacksize • export KMP_STACKSIZE=128 m – 執行 $>. /a. out

ARAVision Proprietary and Confidential. All rights reserved. Mat. Lab的使用方式 • 使用putty + Xming 啟動

ARAVision Proprietary and Confidential. All rights reserved. Mat. Lab的使用方式 • 使用putty + Xming 啟動 • 請登入到相關的計算節點上,如要使用matlab 2008 a,則登入到clw 01, 如要使用matlab 2009 a,則登入到clw 02~clw 04 • 2008 a(安裝在clw 01) – $> matlab 2008 a • 2009 a(安裝在clw 01 ~ clw 04,有五個人的浮動授權) – $> matlab 2009 a

ARAVision Proprietary and Confidential. All rights reserved. • Part II: 管理者須知與操作說明

ARAVision Proprietary and Confidential. All rights reserved. • Part II: 管理者須知與操作說明

ARAVision Proprietary and Confidential. All rights reserved. 資源限制(續) – 範例: • #> edquota smchang

ARAVision Proprietary and Confidential. All rights reserved. 資源限制(續) – 範例: • #> edquota smchang Disk quotas for user smchang (uid 1003): Filesystem blocks soft /dev/sdb 1 6195276 19922944 Block device 目前以使用 的blocks數 hard 20971520 blocks數量的限制 軟 硬 inodes 105917 目前已使用 的inode數 soft 0 inodes數量的限制 軟 硬 PS:blocks的單位為KB,所以如果是 20 GB = 20 x 1024 KB = 20975120 KB • 記憶體與程序數量限制 – 設置檔:/etc/security/limits. conf – 主機:在clw 01~clw 04各自有一個設置檔 – 內容: • @S hard maxlogins 1 @S hard nproc 15 @S hard rss 25165824 @V hard maxlogins 1 @V hard nproc 8 @V hard rss 4194304 hard 0

ARAVision Proprietary and Confidential. All rights reserved. 超級管理者 – super群組 • 群組名稱 gid 成員

ARAVision Proprietary and Confidential. All rights reserved. 超級管理者 – super群組 • 群組名稱 gid 成員 super 700 root, aracity, smchang, ytli, billing • 權限 – 能夠以sudo指令在無須密碼下執行root身份的 作 – 轉換成為root帳號 $> sudo su – • 設置方式 – 登入dl 320,轉成root帳號 – 鍵入如下指令,來編輯/etc/group檔,在super群組下加入或刪減成員 #> vigr – 至dl 320,clw 01~clw 04下,轉成root帳號 – 鍵入如下指令,來編輯/etc/sudoer檔 #> visudo 加入如下設定 %super ALL=(ALL) NOPASSWD: ALL

ARAVision Proprietary and Confidential. All rights reserved. 設定磁碟配額 • 請登入dl 320,並轉到root帳號 • 屬於T群組的帳號,有20 GB的配額(19

ARAVision Proprietary and Confidential. All rights reserved. 設定磁碟配額 • 請登入dl 320,並轉到root帳號 • 屬於T群組的帳號,有20 GB的配額(19 GB的軟配額) – #> setquota -u <帳號名稱> 19922944 20971520 0 0 /data • 屬於S群組的帳號,有2 GB的配額(1. 9 GB的軟配額) – #> setquota -u <帳號名稱> 1992294 2097152 0 0 /data • 屬於V群組的帳號,有200 MB的配額 – #> setquota -u <帳號名稱> 204800 0 0 /data

ARAVision Proprietary and Confidential. All rights reserved. 新增一個帳號的SOP • 建立一個帳號,名稱為gauss,屬於T群組(GID=1000),其流水編號為 1007,依照規則,他的家目錄為/data/T/gauss,其磁碟空間限制為 20 GB 1.

ARAVision Proprietary and Confidential. All rights reserved. 新增一個帳號的SOP • 建立一個帳號,名稱為gauss,屬於T群組(GID=1000),其流水編號為 1007,依照規則,他的家目錄為/data/T/gauss,其磁碟空間限制為 20 GB 1. 登入dl 320,並使用sudo轉成root帳號(不需鍵入root密碼嗎?答:不需) $> sudo su – #> 1. 新建帳號 #> useradd –u 1007 –g 1000 –d /data/T/gauss –m gauss 2. 建立密碼 #> passwd gauss 3. 更新NIS資訊 #> /aracluster/sytem/script/ypupdate. sh 4. 設定磁碟配額 #> setquota -u gauss 19922944 20971520 0 0 /data

ARAVision Proprietary and Confidential. All rights reserved. 刪除一個帳號的SOP • 刪除一個帳號,名稱為gauss,屬於T群組(GID=1000),其流水編號為 1007,依照規則,他的家目錄為/data/T/gauss,其磁碟空間限制為 20 GB 1.

ARAVision Proprietary and Confidential. All rights reserved. 刪除一個帳號的SOP • 刪除一個帳號,名稱為gauss,屬於T群組(GID=1000),其流水編號為 1007,依照規則,他的家目錄為/data/T/gauss,其磁碟空間限制為 20 GB 1. 登入dl 320,並使用sudo轉成root帳號 $> sudo su – #> 2. 設定磁碟配額 #> setquota -u gauss 0 0 /data 3. 刪除帳號 1. 保留家目錄 #> userdel gauss 2. 不保留家目錄 #> userdel –r gauss 4. 更新NIS資訊 #> /aracluster/sytem/script/ypupdate. sh

ARAVision Proprietary and Confidential. All rights reserved. SSH設定 • 在dl 320上 – 檔案:/etc/sshd_config –

ARAVision Proprietary and Confidential. All rights reserved. SSH設定 • 在dl 320上 – 檔案:/etc/sshd_config – 內容: • Permit. Root. Login no • Allow. Users smchang@140. 113. 22. * smchang@140. 113. 25. * ytli@140. 113. 22. * ytli@140. 113. 25. * mclai@140. 113. 22. * mclai@140. 113. 25. * billing@140. 113. 22. * billing@140. 113. 25. * aracity@* • 在clw 01~clw 04上 – 檔案:/etc/sshd_config – 內容: • Permit. Root. Login no • Allow. Users *@140. 113. 22. * *@140. 113. 25. * aracity@* PS:在更改過/etc/sshd_config後,請重新� 動sshd,方法如下: #> service sshd restart

ARAVision Proprietary and Confidential. All rights reserved. Thank You! Q&A

ARAVision Proprietary and Confidential. All rights reserved. Thank You! Q&A