古いバージョンのTorque-2.4.17をCentOS 7にインストールする。
TORQUE/macOSの検証用としてサーバ機能を作ってみた

入手

http://www.adaptivecomputing.com/products/open-source/torque-old/torque-archived-versions-library/から入手
そこには:

Note: Build torque-2.4.17.tar.gz is currently the latest 2.4.x release, and will be the last release in the 2.4 branch. Adaptive Computing support for the 2.4.x branch will end on August 31, 2012.

とある。

[root@c ~]# cd src/
[root@c src]#
[root@c src]# ls -lh torque-2.4.17.tar.gz
-rw-r--r-- 1 root root 5.5M  8月 25 18:04 torque-2.4.17.tar.gz
 
[root@c src]#

下拵え

このソースには specファイルが備わっていた。
なのでrpmでインストールできるように調整してみた

[root@c src]# tar tvfz torque-2.4.17.tar.gz |grep spec
-rw-rw-r-- 603/603       12350 2012-05-29 23:02 torque-2.4.17/torque.spec
-rw-rw-r-- 603/603       12363 2011-10-05 07:20 torque-2.4.17/buildutils/torque.spec.in
[root@c src]#
[root@c src]# mkdir -p ~/rpmbuild/{SOURCES,SPECS}      #  rpmbuildの場所準備
[root@c src]# tar xzvf torque-2.4.17.tar.gz  torque-2.4.17/torque.spec --strip=1     # ディレクトリを作らずファイルを抽出
torque-2.4.17/torque.spec
 
[root@c src]# ls -l torque.spec
-rw-rw-r-- 1 603 603 12350  5月 29  2012 torque.spec
 
[root@c src]# mv ./torque.spec ~/rpmbuild/SPECS/                 # specファイルを SPECS へ
[root@c src]# chown root:root ~/rpmbuild/SPECS/torque.spec
[root@c src]# mv ./torque-2.4.17.tar.gz ~/rpmbuild/SOURCES/      # sourceファイルを SOURCES へ

と下準備を終えて、「torque.spec」を修正します

[root@c ~]# cp -p rpmbuild/SPECS/torque.spec  rpmbuild/SPECS/torque.spec.orig
[root@c ~]# vi rpmbuild/SPECS/torque.spec

変更箇所は torqueのhomeの場所(/var/lib/torque)です
「--enable-cpuset」を試すとcgroupsの勉強が必要みたい

[root@c ~]# diff -u rpmbuild/SPECS/torque.spec.orig rpmbuild/SPECS/torque.spec
--- rpmbuild/SPECS/torque.spec.orig     2012-05-29 23:02:15.000000000 +0900
+++ rpmbuild/SPECS/torque.spec  2017-08-26 04:39:35.732181859 +0900
@@ -38,7 +38,7 @@
 
 ### Macro variables
 %{!?torque_user:%global torque_user torque}
-%{!?torque_home:%global torque_home %{_var}/spool/%{name} }   # 本来は「}」の二連続です。表示上不具合のためスペースを挿入
+%{!?torque_home:%global torque_home %{_var}/lib/%{name} }     # 本来は「}」の二連続です。表示上不具合のためスペースを挿入
 %{!?torque_server:%global torque_server localhost}
 
 ### Do not strip executables
[root@c ~]#

調理

他でもrpmbuildが必要になるかもしれないので「-ba」オプションで rpm と srpm を作成

[root@c ~]# rpmbuild -ba rpmbuild/SPECS/torque.spec

っで完成品がこちら

[root@c ~]# ls -l rpmbuild/RPMS/x86_64/
合計 2864
-rw-r--r-- 1 root root  615056  8月 26 04:44 torque-2.4.17-1.cri.x86_64.rpm
-rw-r--r-- 1 root root  153324  8月 26 04:44 torque-client-2.4.17-1.cri.x86_64.rpm
-rw-r--r-- 1 root root 1752980  8月 26 04:45 torque-debuginfo-2.4.17-1.cri.x86_64.rpm
-rw-r--r-- 1 root root  105960  8月 26 04:44 torque-devel-2.4.17-1.cri.x86_64.rpm
-rw-r--r-- 1 root root   43060  8月 26 04:44 torque-scheduler-2.4.17-1.cri.x86_64.rpm
-rw-r--r-- 1 root root  251796  8月 26 04:44 torque-server-2.4.17-1.cri.x86_64.rpm
 
[root@c ~]# ls -l rpmbuild/SRPMS/
合計 5548
-rw-r--r-- 1 root root 5678881  8月 26 04:44 torque-2.4.17-1.cri.src.rpm
[root@c ~]#

*macOS向けの調理はTORQUE/macOS参照

全体像

クラスターの形式はTORQUE#c173a3d2と同じです。
2015y11m07d_110530467.png

各役割とIP、およびインストールするパッケージは下記のようにします。

役目ホスト名IPアドレスcore数2.4.17のインストールパッケージ
管理ノードpbs.sybyl.local192.168.0.171torque、torque-server、(torque-scheduler)
CentOS 7
計算ノードn1.sybyl.local192.168.0.141torque、torque-client
CentOS 7
n2.sybyl.local192.168.0.152
n3.sybyl.local192.168.0.163
ジョブ発行ノードmini.sybyl.local192.168.0.131torque
macOS Sierra 10.12.4

管理ノード

torque-2.4.17-1.cri.x86_64.rpm」と「torque-server-2.4.17-1.cri.x86_64.rpm」を管理ノード「pbs.sybyl.local」に送って
yum localinstallにてインストールします。

[root@pbs ~]# yum localinstall ./torque-2.4.17-1.cri.x86_64.rpm ./torque-server-2.4.17-1.cri.x86_64.rpm
[root@pbs ~]# ps -ef|grep pbs
root      6037     1  0 04:53 ?        00:00:00 pbs_server -t create
root      6095  5789  0 04:53 pts/1    00:00:00 grep --color=auto pbs
[root@pbs ~]#

留意 インストール直後に「pbs_server -t create」が起動します。
これでデータベースファイルを作ってくれてます。

[root@pbs ~]# ls -l /var/lib/torque/server_priv/serverdb
-rw------- 1 root root 958  8月 26 04:53 /var/lib/torque/server_priv/serverdb
[root@pbs ~]#

っが、終わってくれない....init.dのスクリプトを使っても駄目。なので kill します

[root@pbs ~]# kill 6037

っで強制終了。
その他に、hostnameの登録を行います

[root@pbs ~]# hostname > /var/lib/torque/server_name

次に、計算ノードを記したファイルを用意します。前述の全体像に従い3台登録してみます

[root@pbs ~]# vi /var/lib/torque/server_priv/nodes
n1.sybyl.local np=1
n2.sybyl.local np=2
n3.sybyl.local np=3
[root@pbs ~]#

っで、サーバー機能を起動してみる
systemctlではなく、init.d系の起動スクリプトが用意されている。chkconfigにて確認すると

[root@pbs ~]# chkconfig --list pbs_server
pbs_server      0:off   1:off   2:on    3:on    4:on    5:on    6:off
[root@pbs ~]#

と既に調整済み。では実行してみる

[root@pbs ~]# /etc/init.d/pbs_server start
Starting pbs_server (via systemctl):                       [  OK  ]
[root@pbs ~]#

無事起動したみたい。

管理ノードの構築その2、ジョブスケジューラ

計算ノードを記したファイルにプロパティーを追記して、キューで使用するマシンを定義したいので標準の「torque-scheduler」ではなく
maui」を使います
インストールらはTORQUE#s0512ad7と同じ

計算ノード

torque-2.4.17-1.cri.x86_64.rpm」と「torque-client-2.4.17-1.cri.x86_64.rpm」をインストールします

[root@n1 ~]# yum localinstall ./torque-2.4.17-1.cri.x86_64.rpm ./torque-client-2.4.17-1.cri.x86_64.rpm

次に、設定ファイル /var/lib/torque/mom_priv/config を修正して、

$pbsserver pbs.sybyl.local
$usecp *:/home /home

momを起動します。これもinit.d系なので

[root@n1 ~]# chkconfig --list pbs_mom
pbs_mom         0:off   1:off   2:on    3:on    4:on    5:on    6:off

と起動時自動起動されるのを確認して

[root@n1 ~]# /etc/init.d/pbs_mom start
Starting pbs_mom (via systemctl):                          [  OK  ]
[root@n1 ~]#

とあがればOK

他2台(n2、n3)の計算ノードにも同様にパッケージをインストール

っで稼動確認。管理ノードでにて下記のように表記されればOK

[root@pbs ~]# pbsnodes
n1.sybyl.local
     state = free
     np = 1
     ntype = cluster
     status = rectime=1503680389,varattr=,jobs=,state=free,netload=1313545,(略
 
n2.sybyl.local
     state = free
     np = 2
     ntype = cluster
     status = rectime=1503680388,varattr=,jobs=,state=free,netload=1277740,(略
 
n3.sybyl.local
     state = free
     np = 3
     ntype = cluster
     status = rectime=1503680388,varattr=,jobs=,state=free,netload=1620481,(略
 
[root@pbs ~]#

キューの作成

mauiを使っているので管理ノードのnodesファイルにプロパティーを定義して、その値でキューを作成できるはず

[root@pbs ~]# vi /var/lib/torque/server_priv/nodes
n1.sybyl.local np=1 bio
n2.sybyl.local np=2 chem
n3.sybyl.local np=3 chem
[root@pbs ~]#

っで キュー「bio」と「chem」を用意してみる

[root@pbs ~]# qmgr
create queue bio queue_type=execution
set queue bio resources_default.neednodes=bio
set queue bio started=true
set queue bio enabled=true
set queue bio resources_default.nodes=1
set queue bio resources_default.walltime = 240:00:00
set queue bio resources_default.cput = 480:00:01
 
 
[root@pbs ~]# qmgr
create queue chem queue_type=execution
set queue chem resources_default.neednodes=chem
set queue chem started=true
set queue chem enabled=true
set queue chem resources_default.nodes=1
set queue chem resources_default.walltime = 240:00:00
set queue chem resources_default.cput = 480:00:01

キューのテスト

ごくごく簡単に管理ノードからジョブを発行してみます

[illya@pbs ~]$ cat a.sh
#!/bin/sh
#PBS -q bio
#PBS -l nodes=1:ppn=1
#PBS -j oe
 
cd $PBS_O_WORKDIR
cat $PBS_NODEFILE
echo `hostname`
 
[illya@pbs ~]$

なるジョブを作って

[illya@pbs ~]$ qsub a.sh

にて実施。

(メモ)キューのリソースを上回るジョブを発行すると

状態が「Q」のままずっと居ます。
例えば、bioは一台のマシンで1プロセスしか投げれません。にも拘らず

#!/bin/sh
#PBS -q bio
#PBS -l nodes=1:ppn=2
#PBS -j oe
cd $PBS_O_WORKDIR
cat  $PBS_NODEFILE
echo `hostname`

なジョブを投げると当然宛先がないので、止まったままになります。

何が原因で「Q」のままなのかは

後者の出力は

(略)
Flags:       RESTARTABLE
 
job is deferred.  Reason:  NoResources  (cannot create reservation for job '2' (intital reservation attempt)
(略)

と表示します。

最新の60件
2026-09-05 2026-08-31 2026-08-27 2026-08-24 2026-08-20 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-24 2026-06-21 2026-06-17 2026-06-14 2026-06-13 2026-06-09 2026-06-08 2026-06-05 2026-06-04 2026-06-03

edit


トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2017-08-26 (土) 19:26:29