6と7のリビジョン間の差分
2018-08-23 09:06:48時点のリビジョン6
サイズ: 3315
編集者: KanaeAsai
コメント:
2018-08-24 06:35:55時点のリビジョン7
サイズ: 4530
編集者: KanaeAsai
コメント:
削除された箇所はこのように表示されます。 追加された箇所はこのように表示されます。
行 47: 行 47:

== ジョブの削除 ==
バッチ・キューにあるジョブの削除は次のコマンドでできる。
{{{
condor_rm

*************************************************************************************
【Options】
-help
Display usage information
-version
Display version information
-pool centralmanagerhostname[:portnumber]
Specify a pool by giving the central manager's host name and an optional port number
-name scheddname
Send the command to a machine identified by scheddname
-addr "<a.b.c.d:port>"
Send the command to a machine located at "<a.b.c.d:port>"
-debug
Causes debugging information to be sent to stderr, based on the value of the configuration variable TOOL_DEBUG.
-forcex
Force the immediate local removal of jobs in the 'X' state (only affects jobs already being removed)
cluster
Remove all jobs in the specified cluster
cluster.process
Remove the specific job in the cluster
user
Remove jobs belonging to specified user
-constraint expression
Remove all jobs which match the job ClassAd expression constraint
-all
Remove all the jobs in the queue
*************************************************************************************
}}}

CERN Batch System (HTCondor)

バッチ・システム

大量のデータを解析する必要がある場合、あるいは計算に時間が掛かる場合は一つのプログラムを延々と走らせ続けるよりも、 プログラムを複数同時に走らせた方が短い時間で結果を得られる。素粒子実験のデータ解析においてはデータが独立な事象ごとに 分かれているため、簡単に並列化ができる。 CERN lxplusは多くのユーザーが作業をする共用のコンピュータなので、ここで重い計算をすることは避けるべきで、lxplusでは30分(?) 以上走り続けているプログラムは強制終了される。

多数のプログラムを同時に走らせたい場合や処理時間の長いプログラムを走らせる必要がある場合のために、作業用のコンピュータではなく プログラムを走らせるためだけの専用のコンピュータが多数用意されている。このようなコンピュータ・システムをバッチ・システムといい、 そこでプログラムを走らせることを通常「バッチ・システムにジョブを投げる」という表現をする。

バッチ・システムには直接ログインできないため、

  • 実行するプログラム
  • 入力ファイル
  • 出力ファイル
  • 標準出力に表示されるメッセージを保存するファイル

等を指定してバッチ・システムに知らせる必要がある。

CERN batch system: http://information-technology.web.cern.ch/services/batch
Quick start guide: http://batchdocs.web.cern.ch/batchdocs/local/quick.html

ジョブの設定

バッチ・システムにジョブを投げるには通常、実行したいプログラムやそれに必要な環境設定や後処理をまとめたスクリプトを用意する。 そして、CERNで使っているHTCondorというバッチ・システムでは、その他にプログラムを実行して結果を得るために必要なジョブの内容を設定ファイルに記述する。 スクリプト(sayhello.sh)と設定ファイル(job1.sub)の例を載せてある。

ジョブのsubmit

ジョブを投げる準備が整ったら、以下のコマンドでジョブを投げる。

condor_submit job1.sub

これをやると、ジョブはバッチ・システムのキューに入る。バッチ・システムに大量のジョブが溜まっている場合は、実行されるまでにしばらく待たなくてはいけないが、 通常は数10秒程度で実行が開始される。

ジョブのモニター

バッチ・キューにあるジョブのリストは次のコマンドで確認できる。

condor_q

出力ファイルの確認

バッチ・システム上のコンピュータからで作成したファイルは、lxplusからアクセスできる領域にコピーする必要がある。 HTCondorでは、バッチ・システムのコンピュータ上で作成したファイルは自動的にジョブをsubmitしたディレクトリに コピーされるようである。

ジョブの削除

バッチ・キューにあるジョブの削除は次のコマンドでできる。

condor_rm

*************************************************************************************
【Options】
-help
Display usage information 
-version
Display version information 
-pool centralmanagerhostname[:portnumber]
Specify a pool by giving the central manager's host name and an optional port number 
-name scheddname
Send the command to a machine identified by scheddname 
-addr "<a.b.c.d:port>"
Send the command to a machine located at "<a.b.c.d:port>" 
-debug
Causes debugging information to be sent to stderr, based on the value of the configuration variable TOOL_DEBUG. 
-forcex
Force the immediate local removal of jobs in the 'X' state (only affects jobs already being removed) 
cluster
Remove all jobs in the specified cluster 
cluster.process
Remove the specific job in the cluster 
user
Remove jobs belonging to specified user 
-constraint expression
Remove all jobs which match the job ClassAd expression constraint 
-all
Remove all the jobs in the queue 
*************************************************************************************

CernBatchSystem (最終更新日時 2018-08-24 07:17:58 更新者 KanaeAsai)