TORQUE

本家様 http://crd.lbl.gov/departments/computer-science/CLaSS/research/BLCR/

CentOS7ではビルドできませんでした。CentOS6ならいけた。
LinuxなTORQUEでjobをsuspend状態にはできないけど、hibernateにはできるのがこれみたい。
だが、
2016y04m10d_135630071.png
出典:http://docs.adaptivecomputing.com/torque/4-2-10/Content/topics/2-jobs/jobCheckpointAndRestart.htm

とあり計算ノードを複数使うジョブには適用できないみたい。

BLCRはカーネルにモジュールを組み込みさせます。なので計算ノードらはすべて同一のカーネルが望ましく
っとなると PXE とかで DiskLess クラスター を用意したほうが楽なのかも

BLCR構築

本家様より SRPM を取得して rpmbuild にてパッケージを作成した。

[root@pbs ~]# rpm -Uvh blcr-0.8.5-1.src.rpm
[root@pbs ~]# rpmbuild -bb rpmbuild/SPECS/blcr-0.8.5.spec  --define 'with_multilib 0'
[root@pbs ~]# ls -l rpmbuild/RPMS/x86_64/
合計 1232
-rw-r--r-- 1 root root  77872  4月  9 09:29 2016 blcr-0.8.5-1.x86_64.rpm
-rw-r--r-- 1 root root  32084  4月  9 09:29 2016 blcr-devel-0.8.5-1.x86_64.rpm
-rw-r--r-- 1 root root  40336  4月  9 09:29 2016 blcr-libs-0.8.5-1.x86_64.rpm
-rw-r--r-- 1 root root 899620  4月  9 09:29 2016 blcr-modules_2.6.32_573.22.1.el6.x86_64-0.8.5-1.x86_64.rpm
-rw-r--r-- 1 root root 200716  4月  9 09:29 2016 blcr-testsuite-0.8.5-1.x86_64.rpm
[root@pbs ~]#
[root@pbs ~]# cd rpmbuild/RPMS/x86_64
[root@pbs x86_64]# yum localinstall ./blcr-0.8.5-1.x86_64.rpm \
                                    ./blcr-libs-0.8.5-1.x86_64.rpm \
                                    ./blcr-devel-0.8.5-1.x86_64.rpm \
                                    ./blcr-modules_2.6.32_573.22.1.el6.x86_64-0.8.5-1.x86_64.rpm
[root@pbs x86_64]#

*'with_multilib 0'は32bit向けの対応なのだが64bitしかない環境なので disable(0) にした

TORQUE構築

BLCRと連携するTorqueも SRPM を取得して展開する

[root@pbs ~]# yum install epel-release
[root@pbs ~]# yum -y install yum-utils
[root@pbs ~]# yumdownloader --source torque
 
[root@pbs ~]# rpm -Uvh torque-4.2.10-9.el6.src.rpm

ここでSPECファイルに対して、BLCRの有効化とNUMAサポート削除を行った。変更箇所は下記のとおりである

[root@pbs ~]# cp -p rpmbuild/SPECS/torque.spec rpmbuild/SPECS/torque.spec.orig
[root@pbs ~]# diff -u rpmbuild/SPECS/torque.spec.orig rpmbuild/SPECS/torque.spec
--- rpmbuild/SPECS/torque.spec.orig     2016-02-21 15:17:47.000000000 +0900
+++ rpmbuild/SPECS/torque.spec  2016-04-09 09:56:48.917187898 +0900
@@ -382,7 +382,9 @@
   --with-sendmail=%{_sbindir}/sendmail --disable-static \
   --with-tcp-retry-limit=2 --without-debug \
   --enable-drmaa --enable-munge-auth --with-munge \
-  --enable-cpuset --enable-numa-support \
+  --enable-cpuset \
+  --with-blcr=/usr --with-blcr-include=/usr/include --with-blcr-lib=/usr/lib64 \
+  --with-blcr-bin=/usr/bin \
   %{server_nameflags} %{guiflags} %{tclflags} %{rcpflags}
 
 make %{?_smp_mflags}
[root@pbs ~]#

ビルドに必要な関連パッケージをインストールして rpmbuild にてパッケージを作成した。

[root@pbs ~]# yum -y install desktop-file-utils pam-devel xauth readline-devel ncurses-devel \
 gperf openssl-devel hwloc-devel libxml2-devel munge-devel tcl-devel tk-devel graphviz \
 texlive-latex
 
[root@pbs ~]# rpmbuild -bb rpmbuild/SPECS/torque.spec

これら作ったパッケージを管理ノード、計算ノード、ジョブ発行ノードに適時インストールした。

パッケージのインストール

各ノードで必要なパッケージは下表参照

役目ホスト名IPアドレスcore数備考
管理ノードpbs.sybyl.local192.168.0.571torque, torque-libs, torque-client, torque-server
blcr-libs
計算ノードn1.sybyl.local192.168.0.521torque, torque-libs, torque-mom
blcr, blcr-libs, blcr-modules
n2.sybyl.local192.168.0.531
n3.sybyl.local192.168.0.541
ジョブ発行ノードclient.sybyl.local192.168.0.201torque, torque-libs, torque-client
blcr-libs

その他の各ノードの調整はほとんどがTORQUEと同じです

パスワードなしsshの有効化

非常に重要な用件なのだが、計算ノードから管理ノードへ scp ができるように調整が必要
参照:ssh/ホストベース認証

Torque with BLCRのテスト

題材として
http://docs.adaptivecomputing.com/torque/4-2-10/help.htmの「Appendix M: BLCR acceptance tests」を取り上げてみる。使用するサンプルプログラム至って簡単。一秒毎にカウントを表示するプログラムです。

[illya@client ~]$ cat test.c
#include <stdio.h>
int main( int argc, char *argv[] )
{
int i;

    for (i=0; i<100; i++)
    {
        printf("i = %d\n", i);
        fflush(stdout);
        sleep(1);
    }
}
[illya@client ~]$

これをコンパイルして、実行してみます。途中終了は[Ctl-C]です。

[illya@client ~]$ gcc -o test ./test.c
[illya@client ~]$ ./test
i = 0
i = 1
i = 2
i = 3
^C
[illya@client ~]$

では実際にジョブを停止して、再開させてみる。
この test を含むシェルスクリプトを用意して

[illya@client ~]$ mkdir pbs && cd pbs
[illya@client pbs]$ cat test.sh
#!/bin/bash
/home/illya/test
 
[illya@client pbs]$ qsub -c enabled test.sh
29.pbs.sybyl.local
[illya@client pbs]$
[illya@client pbs]$ qstat
Job ID                    Name             User            Time Use S Queue
------------------------- ---------------- --------------- -------- - -----
29.pbs                     test.sh          illya                  0 R batch
[illya@client pbs]$

と計算が実行される。そして qhold コマンドでとめてみる

[illya@client pbs]$ qhold 29
[illya@client pbs]$ qstat
Job ID                    Name             User            Time Use S Queue
------------------------- ---------------- --------------- -------- - -----
29.pbs                     test.sh          illya           00:00:00 H batch
[illya@client pbs]$

この段階で、管理ノードの checkpoint ディレクトリにファイルが用意される

[root@pbs torque]# cd
[root@pbs ~]# cd /var/lib/torque
[root@pbs torque]# ls -l checkpoint/29.pbs.sybyl.local.CK/
合計 752
-r-------- 1 illya fate 766510  4月 10 14:53 2016 ckpt.29.pbs.sybyl.local.1460267627
[root@pbs torque]#

再び、計算を再開させる

[illya@client pbs]$ qrls 29
[illya@client pbs]$ qstat
Job ID                    Name             User            Time Use S Queue
------------------------- ---------------- --------------- -------- - -----
29.pbs                     test.sh          illya           00:00:00 R batch
[illya@client pbs]$

とうまく一時停止させて、再開することができた。

最新の60件
2026-08-18 2026-08-17 2026-08-16 2026-08-15 2026-08-13 2026-08-12 2026-08-11 2026-08-09 2026-07-30 2026-07-25 2026-07-24 2026-07-20 2026-07-18 2026-07-17 2026-07-16 2026-07-08 2026-07-07 2026-07-06 2026-07-04 2026-07-02 2026-06-27 2026-06-25 2026-06-24 2026-06-21 2026-06-17 2026-06-14 2026-06-13 2026-06-09 2026-06-08 2026-06-06 2026-06-05 2026-06-04 2026-06-03 2026-05-31 2026-05-22 2026-05-21

edit


トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2016-04-10 (日) 16:33:33