「pione-client」の版間の差分
 (→オプション一覧)  | 
				|||
| (同じ利用者による、間の6版が非表示) | |||
| 行1: | 行1: | ||
| − | '''pione-client'''とは[[PIONE定義書]]  | + | '''pione-client'''とは[[PIONE定義書]]や[[隠蔽化パッケージ]]から処理を実行する[[PIONE]]の[[コマンド]]です。  | 
== オプション一覧 ==  | == オプション一覧 ==  | ||
| 行13: | 行13: | ||
		<td>location</td>  | 		<td>location</td>  | ||
		<td>必須</td>  | 		<td>必須</td>  | ||
| − | 		<td>実行する[[PIONE定義書]]または[[  | + | 		<td>実行する[[PIONE定義書]]または[[隠蔽化パッケージ]]</td>  | 
	</tr>  | 	</tr>  | ||
	<tr>  | 	<tr>  | ||
| 行32: | 行32: | ||
		<td></td>  | 		<td></td>  | ||
		<td>プロセス間通信で使用するIPアドレス:ポート番号</td>  | 		<td>プロセス間通信で使用するIPアドレス:ポート番号</td>  | ||
| + | 	</tr>  | ||
| + | 	<tr>  | ||
| + | 		<td>--delegate-tuple-space</td>  | ||
| + | 		<td>なし</td>  | ||
| + | 		<td>なし</td>  | ||
| + | 		<td>[[タプル空間]]の管理を[[タプル空間ブローカ]]に委譲する(未実装)</td>  | ||
	</tr>  | 	</tr>  | ||
	<tr>  | 	<tr>  | ||
| 行314: | 行320: | ||
</pre>  | </pre>  | ||
val=123としてmessage.txtに書き込まれました。<br>  | val=123としてmessage.txtに書き込まれました。<br>  | ||
| + | <br>  | ||
| + | |||
| + | === オプション --rehearse ===  | ||
| + | ==== 入力ファイルの準備 ====  | ||
| + | [[シナリオ]]を含んだ[[パッケージ]]を入力ファイルとします。<br>  | ||
| + | <br>  | ||
| + | |||
| + | Multiplying.pione<br>  | ||
| + | <pre>  | ||
| + | .@ PackageName	:: "Multiplying"  | ||
| + | |||
| + | param val := 1  | ||
| + | |||
| + |  Rule Main  | ||
| + |  	input 'test.in'  | ||
| + |  	output 'test.out'  | ||
| + |  Action   | ||
| + |  	awk '{ print $1*{$val} }' {$I[1]} > {$O[1]}   | ||
| + |  End  | ||
| + | </pre>  | ||
| + | 上記の[[PIONE定義書]]は入力データtest.inを必要としていますので、test.inのディレクトリ名を相対パスで設定します。<br>  | ||
| + | <br>  | ||
| + | |||
| + | /SnarioMulti/input/test.in  | ||
| + | <pre>  | ||
| + | 1  | ||
| + | 2  | ||
| + | 3  | ||
| + | 4  | ||
| + | |||
| + | </pre>  | ||
| + | <br>  | ||
| + | |||
| + | /SnarioMulti/Scenario.pione  | ||
| + | <pre>  | ||
| + | .@ ScenarioName	:: "Multi4"  | ||
| + | .@ ParamSet		:: "{val:4}"  | ||
| + | </pre>  | ||
| + | 今回はtest.inの値を4倍にするシナリオとしています。<br>  | ||
| + | <br>  | ||
| + | |||
| + | これらのファイルを[[pione package build]]でパッケージ化します。(/testディレクトリに作成した場合)<br>  | ||
| + | <pre>  | ||
| + | $ pione package build test/  | ||
| + | info: update the package info file: local:/test/pione-package.json  | ||
| + | info: update the scenario info file: local:/test/SinarioMulti/pione-scenario.json  | ||
| + | info: Package local:/Multiplying.ppg has been built successfully.  | ||
| + | </pre>  | ||
| + | <br>  | ||
| + | |||
| + | ==== 実行結果 ====  | ||
| + | <pre>  | ||
| + | $ pione-client Multiplying.ppg --rehearse "Multi4"  | ||
| + |   ==> &Multiplying:Root([test.in],{})  | ||
| + |     --> Rule Application: &Multiplying:Root([test.in],{})  | ||
| + |       --> Distribution: &Multiplying:Root([test.in],{})  | ||
| + |             >>> &Multiplying:Main([test.in],{})  | ||
| + |   ==> &Multiplying:Main([test.in],{})  | ||
| + |    SH ------------------------------------------------------------  | ||
| + |    SH 	awk '{ print $1*4 }' test.in > test.out   | ||
| + |    SH ------------------------------------------------------------  | ||
| + |   <== &Multiplying:Main([test.in],{})  | ||
| + |       <-- Distribution: &Multiplying:Root([test.in],{})  | ||
| + |     <-- Rule Application: &Multiplying:Root([test.in],{})  | ||
| + |   <== &Multiplying:Root([test.in],{})  | ||
| + | info: Rehearsal Result: Succeeded  | ||
| + | </pre>  | ||
| + | |||
| + | /process/output/test.out  | ||
| + | <pre>  | ||
| + | 4  | ||
| + | 8  | ||
| + | 12  | ||
| + | 16  | ||
| + | |||
| + | </pre>  | ||
| + | test.inに対して全ての値が4倍されています。<br>  | ||
| + | <br>  | ||
| + | |||
| + | ==== outputの確認 ====  | ||
| + | [[シナリオ]]の中にoutputディレクトリを含めることもできますが、これは作成されたファイルとこの中のデータを比較して一致していることと存在していることを確かめることに使用します。<br>  | ||
| + | |||
| + | ===== 一致する場合 =====  | ||
| + | /SnarioMulti/output/test.out  | ||
| + | <pre>  | ||
| + | 4  | ||
| + | 8  | ||
| + | 12  | ||
| + | 16  | ||
| + | |||
| + | </pre>  | ||
| + | 上記を含めて[[パッケージ]]を作成し、実行してみます。<br>  | ||
| + | <br>  | ||
| + | |||
| + | <pre>  | ||
| + | $ pione-client Multiplying.ppg --rehearse "Multi4"  | ||
| + |   ==> &Multiplying:Root([test.in],{})  | ||
| + |     --> Rule Application: &Multiplying:Root([test.in],{})  | ||
| + |       --> Distribution: &Multiplying:Root([test.in],{})  | ||
| + | |||
| + | -中略-  | ||
| + | |||
| + |     <-- Rule Application: &Multiplying:Root([test.in],{})  | ||
| + |   <== &Multiplying:Root([test.in],{})  | ||
| + | info: Rehearsal Result: Succeeded  | ||
| + | </pre>  | ||
| + | Rehearsal Result: Succeededと表示され、出力ファイルが想定通りであると判断できます。<br>  | ||
| + | <br>  | ||
| + | |||
| + | ===== データが違う場合 =====  | ||
| + | /SnarioMulti/output/test.out  | ||
| + | <pre>  | ||
| + | 1  | ||
| + | 2  | ||
| + | 3  | ||
| + | 4  | ||
| + | |||
| + | </pre>  | ||
| + | 上記を含めて[[パッケージ]]を作成し、実行してみます。<br>  | ||
| + | <br>  | ||
| + | |||
| + | <pre>  | ||
| + | $ pione-client Multiplying.ppg --rehearse "Multi4"  | ||
| + |   ==> &Multiplying:Root([test.in],{})  | ||
| + |     --> Rule Application: &Multiplying:Root([test.in],{})  | ||
| + |       --> Distribution: &Multiplying:Root([test.in],{})  | ||
| + | |||
| + | -中略-  | ||
| + | |||
| + |     <-- Rule Application: &Multiplying:Root([test.in],{})  | ||
| + |   <== &Multiplying:Root([test.in],{})  | ||
| + | Rehearsal Result: Failed  | ||
| + | - test.out is different from expected result.  | ||
| + | </pre>  | ||
| + | ... is different from expected result.と表示され、出力ファイルが意図した通りでないことが分かります。<br>  | ||
| + | <br>  | ||
| + | |||
| + | ===== ファイルが存在しない場合 =====  | ||
| + | /SnarioMulti/output/test.output  | ||
| + | <pre>  | ||
| + | 4  | ||
| + | 8  | ||
| + | 12  | ||
| + | 16  | ||
| + | |||
| + | </pre>  | ||
| + | 上記を含めて[[パッケージ]]を作成し、実行してみます。<br>  | ||
| + | <br>  | ||
| + | |||
| + | <pre>  | ||
| + | $ pione-client Multiplying.ppg --rehearse "Multi4"  | ||
| + |   ==> &Multiplying:Root([test.in],{})  | ||
| + |     --> Rule Application: &Multiplying:Root([test.in],{})  | ||
| + |       --> Distribution: &Multiplying:Root([test.in],{})  | ||
| + | |||
| + | -中略-  | ||
| + | |||
| + |     <-- Rule Application: &Multiplying:Root([test.in],{})  | ||
| + |   <== &Multiplying:Root([test.in],{})  | ||
| + | Rehearsal Result: Failed  | ||
| + | - test.output doesn't exist.  | ||
| + | </pre>  | ||
| + | ... doesn't exist.と表示され、想定しているファイルが作成されなかったことが分かります。<br>  | ||
<br>  | <br>  | ||
2015年3月31日 (火) 04:31時点における最新版
pione-clientとはPIONE定義書や隠蔽化パッケージから処理を実行するPIONEのコマンドです。
目次
オプション一覧
| オプション | 型 | デフォルト | 説明 | 
|---|---|---|---|
| 引数 | location | 必須 | 実行するPIONE定義書または隠蔽化パッケージ | 
| -b | LOCATION | ./process/ | 処理のベースディレクトリ | 
| --client-ui | TYPE | Type of the client's user interface | |
| --communication-address | URI | プロセス間通信で使用するIPアドレス:ポート番号 | |
| --delegate-tuple-space | なし | なし | タプル空間の管理をタプル空間ブローカに委譲する(未実装) | 
| --dry-run | なし | なし | ドライランモード | 
| --features | FEATURES | 特性(PIONE) | |
| --file-cache-method | NAME | simple | ファイルキャッシュ方式名: simple, no_cache | 
| --file-sliding | [BOOLEAN] | ファイルスライド処理 | |
| -i | LOCATION | Set input directory | |
| --notification-receiver | URI | 通知を受けるアドレス:ポート番号(ポート番号は省略可) | |
| --notification-target | URI | 通知として送信するブロードキャストアドレス:ポート番号(ポート番号は省略可) | |
| --params | #オプション --params参照 | なし | パラメータの設定 | 
| --parent-front | URI | set parent front URI | |
| --rehearse | [SCENARIO] | デフォルトシナリオ | パッケージ内で実行するシナリオ名 | 
| --request-from | URI | URI that the client requested the job from | |
| --request-task-worker | N | タスクワーカの要求数 | |
| --session-id | ID | Session id of the job | |
| --stand-alone | なし | なし | スタンドアローンモード | 
| --stream | [BOOLEAN] | ストリームモード | |
| -t | N | タスクワーカの最大プロセス起動数 | |
| --timeout | SEC | 0 | タイムアウト設定(秒)(0のときはタイムアウトしない) | 
| --color | BOOLEAN | true | 出力結果の文字に色を付ける | 
| --debug | [TYPE] | system | デバッグモードで実行 | 
| -h | [FORMAT] | txt | ヘルプを表示 | 
| -v | なし | なし | バージョンを表示 |