部署HPC集群的實施方案
濟南友泉軟體有限公司
一、系統配置
1.1 網路拓撲
| 服務器 | 內網IP | 計算專網IP | 域名 | 備注 |
| 登陸節點 | 172.17.22.16 | loginserver-chaosuan |
| |
| 管理節點 | 172.17.22.13 |
|
| |
| 計算節點1 | 172.17.29.11 | 192.168.1.11 | compute11 | 主節點 |
| 計算節點2 | 172.17.29.12 | 192.168.1.12 | compute12 |
|
| 計算節點3 | 172.17.29.13 | 192.168.1.13 | compute13 |
|
| 計算節點4 | 172.17.29.14 | 192.168.1.14 | compute14 |
|
1.2 作業系統
登錄節點:CentOS Linux release 7.3.1611
管理節點:CentOS Linux release 7.3.1611
計算節點:CentOS Linux release 7.9.2009,
二、計算節點、登錄節點配置
2.1 域名設定
在登錄節點、所有計算節點上執行以下命令,完成節點域名配置
vi /etc/hostname
vi /etc/hosts


2.2 免密登錄
以loginserver-chaosuan為例,在登錄節點、所有計算節點上執行以下命令,設定免密登錄
a) 生成公鑰私鑰
ssh-keygen -t rsa
b) 拷貝公鑰到其他節點
ssh-copy-id compute11
ssh-copy-id compute12
ssh-copy-id compute13
ssh-copy-id compute14
2.3 關閉防火墻
在登錄節點、計算節點執行以下操作,
a) 查看防火墻狀態
systemctl status firewalld.service
b) 關閉運行的防火墻
systemctl stop firewalld.service
c) 開機關閉防火墻
systemctl disable firewalld.service
d) 修改selinux
vi /etc/selinux/config
將SELINUX=enforcing改為:SELINUX=disabled,并執行setenforce 0使他立即生效,當然你也可以重啟機器
三、建立NFS服務
使用compute11作為NFS服務器,loginserver-chaosuan 、compute12、compute13、compute14等作為NFS客戶端,
3.1 NFS服務器
a) 安裝RPC和NFS軟體包
yum -y install rpcbind nfs-utils
b) 啟動服務和設定開啟啟動
systemctl start rpcbind #先啟動rpc服務
systemctl enable rpcbind #設定開機啟動
systemctl start nfs-server nfs-secure-server #啟動nfs服務和nfs安全傳輸服務
systemctl enable nfs-server nfs-secure-server
firewall-cmd --permanent --add-service=nfs #配置防火墻放行nfs服務
firewall-cmd --reload
c) 配置共享檔案目錄,編輯組態檔
chmod go+w /home #開通自己組group和其他人other的寫權限
vi /etc/exports
/home 172.17.22.16(rw,async,no_root_squash)
/home 192.168.1.0/24(rw,async,no_root_squash)
systemctl reload nfs #重新加載NFS服務,使組態檔生效
![]()
3.2 NFS客戶端(計算節點)
a) 安裝RPC和NFS軟體包
yum -y install rpcbind nfs-utils
b) 查看服務器拋出的共享目錄資訊
showmount -e 192.168.1.11
c) 在客戶端創建目錄,并掛載共享目錄
vi /etc/fstab #在該檔案中掛載,使系統每次啟動時都能自動掛載
192.168.1.11:/home /home nfs defaults 0 0
mount -a #是檔案/etc/fstab生效
d) 檢查
df -Th

3.3 NFS客戶端(登錄節點)
a) 安裝RPC和NFS軟體包
yum -y install rpcbind nfs-utils
b) 查看服務器拋出的共享目錄資訊
showmount -e 172.17.29.11
c) 在客戶端創建目錄,并掛載共享目錄
vim /etc/fstab #在該檔案中掛載,使系統每次啟動時都能自動掛載
172.17.29.11:/home /home nfs defaults 0 0
mount -a #是檔案/etc/fstab生效
d) 檢查
df -Th

四、建立NIS服務
使用compute11作為NFS服務器,loginserver-chaosuan 、compute12、compute13、compute14等作為NFS客戶端,
4.1 NIS服務器
a) 安裝軟體包
yum install yp-tools ypbind
b) 設定開機域名
vi /etc/sysconfig/network
NISDOMAIN=hpc
c) 指定NIS查詢的主機名稱
vi /etc/yp.conf
ypserver compute11
d) 啟動NIS
systemctl enable ypbind.service
systemctl restart ypbind.service
systemctl status ypbind.service
e) 驗證
ypwhich
ypcat passwd
f) 使用NIS資料庫設定服務搜索順序
vi /etc/nsswitch.conf,將相關行改成以下值
passwd:files nis
shadow:files nis
group:files nis
hosts:files nis dns
g) 重啟NIS
systemctl restart ypbind.service

4.2 NIS客戶端(計算節點)
a) 安裝軟體包
yum install yp-tools ypbind
b) 設定開機域名
vi /etc/sysconfig/network
NISDOMAIN=hpc
c) 指定NIS查詢的主機名稱
vi /etc/yp.conf
ypserver compute11
d) 啟動NIS
systemctl enable ypbind.service
systemctl restart ypbind.service
systemctl status ypbind.service
e) 驗證
ypwhich
ypcat passwd
f) 使用NIS資料庫設定服務搜索順序
vi /etc/nsswitch.conf,將相關行改成以下值
passwd:files nis
shadow:files nis
group:files nis
hosts:files nis dns
g) 重啟NIS
systemctl restart ypbind.service

4.3 NIS客戶端(登錄節點)
操作程序同上,

五、編譯器配置
5.1 安裝編譯器
安裝Intel Parallel Studio XE 2019 Cluster Edition編譯器,解壓之后直接運行./install.sh即可,
5.2 配置環境變數
在登錄節點、所有計算節點上修改~/.bash_profile檔案,
vi ~/.bash_profile

5.3 撰寫節點串列檔案

5.4 運行Intel MPI測驗程式
mpirun -np 20 -f /home/hycom/machinefile ./hello-mpi
六、作業調度系統
LSF、TORQUE等作業調度系統,具體視情況而定,
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/240477.html
標籤:其他
