4. RESCALE CONFIDENTIAL • Information disclosure for evaluation purposes only. Any violation or breach of company confidential information will be enforced to the fullest extent permitted in accordance with the laws of the State of Delaware. 4
本日のアジェンダ
●ScaleX ファイル管理基本機能紹介&デモ
- Rescale ScaleXストレージとは?
- ファイルのアップロード
- ファイルのダウンロード
●ScaleX ジョブ管理基本機能紹介&デモ
- ジョブのクローン
- ジョブの共有
- ジョブのテンプレート
- 予算/通知設定
- CLI/APIによるジョブ実行
●ScaleX 実験計画法(DOE)ジョブ紹介&デモ
●まとめ: Rescale Intelligent Platform
5. RESCALE CONFIDENTIAL • Information disclosure for evaluation purposes only. Any violation or breach of company confidential information will be enforced to the fullest extent permitted in accordance with the laws of the State of Delaware. 5
Rescale ScaleX アーキテクチャとストレージ
Rescale
プラットフォーム
Rescale
ストレージ
クラウド
リソース
・サービス/管理ポータル
・Web UI/CLI/API提供
・ユーザ/組織の管理
・課金/請求
・ソフトウエアリポジト
リ/ビルダー
・オーケストレーション
(自動化)エンジン
・ユーザデータ(入力/結
果)をセキュアに保管
・インスタンス(計算ノ
ード/デスクップ)の提供
ユーザ
・ブラウザ/CLI/API
アクセス
7. RESCALE CONFIDENTIAL • Information disclosure for evaluation purposes only. Any violation or breach of company confidential information will be enforced to the fullest extent permitted in accordance with the laws of the State of Delaware. 7
ファイルのアップロード(Web UI)
ファイルのアップロード
デフォルトで転送モードが「高速」に設定さ
れている(Transfersメニューから確認)
ファイル画面でここよりアップロードし
たのちに、ジョブ作成の入力ファイルの
設定時に「クラウドストレージのファイ
ルを使用する」で指定することも可能
ジョブ作成時の入力ファイルをこ
こからアップロード
8. RESCALE CONFIDENTIAL • Information disclosure for evaluation purposes only. Any violation or breach of company confidential information will be enforced to the fullest extent permitted in accordance with the laws of the State of Delaware. 8
ファイルのダウンロード
• ジョブの結果ファイルのダウンロードが主な目的
• ファイル(合計)サイズがGBオーダーの場合はファイル転送ツール
もしくはCLIの使用が基本
- ファイル転送ツールはWindows環境に対応するRescale提供アプリケーション
- Windows環境以外を利用の場合はCLI(Rescale提供コマンド)を選択
- ファイル転送ツール/CLIにはダウンロードを高速化する仕組みが実装済
※後述するAPIキーの発行が必要
※Firewall等のネットワーク設定によってはこの高速アップロードの仕組みが動作しない(エラーと
なる)場合があり、その場合は後述するファイル転送設定を「基本」に変更する必要あり
• ブラウザ(Web UI)でのダウンロードも可能
- Web UIではアップロードとは異なり高速化の仕組みが実装されていないため、
ファイル転送ツールやCLIに比べて低速
- サーバ上でZIP圧縮後にダウンロードする操作にも対応
9. RESCALE CONFIDENTIAL • Information disclosure for evaluation purposes only. Any violation or breach of company confidential information will be enforced to the fullest extent permitted in accordance with the laws of the State of Delaware. 9
ファイルのダウンロード(ファイル転送ツール)
ジョブ結果画面から「Download with
Rescale Transfer Manager」ボタンでファイ
ル転送ツールを起動しダウンロード
Web UIのジョブ結果画面「Download with Rescale Transfer Manager」ボタンからファイル転送ツールを起
動し結果ファイル全てをダウンロード
10. RESCALE CONFIDENTIAL • Information disclosure for evaluation purposes only. Any violation or breach of company confidential information will be enforced to the fullest extent permitted in accordance with the laws of the State of Delaware. 10
ファイルのダウンロード(ファイル転送ツール)
ダウンロード先のディレクトリを指定後に
ダウンロード開始
11. RESCALE CONFIDENTIAL • Information disclosure for evaluation purposes only. Any violation or breach of company confidential information will be enforced to the fullest extent permitted in accordance with the laws of the State of Delaware. 11
ファイルのダウンロード(CLI)
「rescale-cli sync -j $JOBID」 による実行済ジョブ結果ファイル全体のダウンロード例
% rescale-cli -X https://platform.rescale.jp sync -p xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -j dQkTd
2020-11-24 10:18:27,100 - Authenticated as xxxxxxxxxxxxxx@rescale.com
2020-11-24 10:18:27,114 - Syncing output files for job dQkTd
2020-11-24 10:18:27,252 - Job dQkTd: Downloading files to /Users/xxxx/Documents/tmp/test/rescale_job_dQkTd
2020-11-24 10:18:27,880 - Downloading /Users/xxxx/Documents/tmp/test/rescale_job_dQkTd/process_output.log
2020-11-24 10:18:28,301 - Downloading process_output.log:
...
2020-11-24 10:18:30,187 - ##############################| 2.86KB / 2.86KB
…
% ls -lR rescale_job_dQkTd
total 98032
-rw-r--r-- 1 xxxx staff 2918 11 24 10:18 config_CFD.cfg
-rw-r--r-- 1 xxxx staff 2917 11 24 10:18 config_SOL.cfg
-rw-r--r-- 1 xxxx staff 14185170 11 24 10:18 flow.dat
-rw-r--r-- 1 xxxx staff 8042 11 24 10:18 forces_breakdown.dat
-rw-r--r-- 1 xxxx staff 1983705 11 24 10:18 history.dat
-rw-r--r-- 1 xxxx staff 5959428 11 24 10:18 mesh_ONERAM6_turb_hexa_43008.su2
-rw-r--r-- 1 xxxx staff 18743545 11 24 10:18 mesh_ONERAM6_turb_hybrid_258969.su2
-rw-r--r-- 1 xxxx staff 674319 11 24 10:18 process_output.log
-rw-r--r-- 1 xxxx staff 7427468 11 24 10:18 restart_flow.dat
-rw-r--r-- 1 xxxx staff 278891 11 24 10:18 surface_flow.csv
-rw-r--r-- 1 xxxx staff 408052 11 24 10:18 surface_flow.dat
-rw-r--r-- 1 xxxx staff 10224 11 24 10:18 turb_ONERAM6.cfg
-X: プラットフォームアクセス先指定
-p: APIキー指定
12. RESCALE CONFIDENTIAL • Information disclosure for evaluation purposes only. Any violation or breach of company confidential information will be enforced to the fullest extent permitted in accordance with the laws of the State of Delaware. 12
APIキー確認とファイル転送ツール/CLIのダウンロード
プロファイル設定(画面右上▼より)のAPIメニューからAPIキー確認およびツール/CLIのダウンロードが可能
CLIインストーラを「Latest Release」
より対象のプラットフォームを選択し
ダウンロード
インストーラをダウンロード
APIキーの確認
※「APIのアクセスが無効」と表示され
作成できない場合は販売代理店もしくは
Rescaleサポートまで連絡ください
13. RESCALE CONFIDENTIAL • Information disclosure for evaluation purposes only. Any violation or breach of company confidential information will be enforced to the fullest extent permitted in accordance with the laws of the State of Delaware. 13
ファイルのダウンロード(Web UI①)
ジョブ結果画面からの単一ファイル(ダウンロードアイコン使用)ダウンロード
ファイル毎のダウンロードアイコンクリック
で単一ファイルダウンロード
14. RESCALE CONFIDENTIAL • Information disclosure for evaluation purposes only. Any violation or breach of company confidential information will be enforced to the fullest extent permitted in accordance with the laws of the State of Delaware. 14
ファイルのダウンロード(Web UI②)
ジョブ結果画面での「Download Job」ボタンによるジョブ結果全体のダウンロード
ジョブ結果ファイル全体のダウンロード
※予めサーバ側でZIP圧縮されたファイ
ルをダウンロード
15. RESCALE CONFIDENTIAL • Information disclosure for evaluation purposes only. Any violation or breach of company confidential information will be enforced to the fullest extent permitted in accordance with the laws of the State of Delaware. 15
ファイルのダウンロード(Web UI③)
ジョブ結果画面からのファイル選択(単一もしくは複数)後のダウンロード
対象ファイルを選択しダウンロード操作
※サーバ側で選択ファイルをZIP圧縮後
ダウンロード開始となるため、ファイル
サイズが大きい場合はダウンロード開始
まで時間がかかる
16. RESCALE CONFIDENTIAL • Information disclosure for evaluation purposes only. Any violation or breach of company confidential information will be enforced to the fullest extent permitted in accordance with the laws of the State of Delaware. 16
ファイルのダウンロード(Web UI④)
ファイル画面からのファイル選択(単一もしくは複数)後のダウンロード
対象ファイルを選択しダウンロード操作
※サーバ側で選択ファイルをZIP圧縮後
ダウンロード開始となるため、ファイル
サイズが大きい場合はダウンロード開始
まで時間がかかる
ファイルリンクをクリックすることで単一フ
ァイルダウンロード(ZIP圧縮なし)
17. RESCALE CONFIDENTIAL • Information disclosure for evaluation purposes only. Any violation or breach of company confidential information will be enforced to the fullest extent permitted in accordance with the laws of the State of Delaware. 17
ファイル管理機能関連マニュアルリンク
• ジョブの結果ファイルのダウンロード
- From the Job Result pane (https://docs.rescale.com/articles/file-transfer-to-local-workstation/#from-the-job-results-pane)
- From the File Tab (https://docs.rescale.com/articles/file-transfer-to-local-workstation/#from-the-files-tab)
• ファイル転送ツール(セットアップ/使い方)
- File Transfer Manager (https://docs.rescale.com/articles/rescale-transfer-manager/)
• CLI(セットアップ)
- Setting up Rescale CLI (https://docs.rescale.com/articles/setting-up-rescale-cli-110/)
• ジョブ実行中ファイルのダウンロード
- Snapshot of a running job (https://docs.rescale.com/articles/file-transfer-to-local-workstation/#snapshot-of-a-running-job)
- Copy files to and from a compute node with SCP (https://docs.rescale.com/articles/file-transfer-to-local-
workstation/#copy-files-to-and-from-a-compute-node-with-scp)
- WinSCP - Windows users (https://docs.rescale.com/articles/file-transfer-to-local-workstation/#winscp---windows-users)
• デスクトップでのファイル転送
- Transferring files in/out of Rescale Desktops (https://docs.rescale.com/articles/file-transfer/#transferring-files-
inout-of-rescale-desktops)
18. RESCALE CONFIDENTIAL • Information disclosure for evaluation purposes only. Any violation or breach of company confidential information will be enforced to the fullest extent permitted in accordance with the laws of the State of Delaware. 18
ジョブのクローン
• ジョブを複製(クローン)する操作
- 入力ファイルおよびジョブ設定が複製され新規にジョブIDが割り当てられる
※結果ファイルは複製されない
ジョブ画面およびジョブ
リスト画面より
「Clone」のアイコンを
クリック
ジョブ画面およびジョブ
リスト画面より
「Clone」のアイコンを
クリック
元のジョブ名に「(Cloned)」が付加
されたかたちでジョブ作成画面へ遷
移(そのままもしくは各種設定を変
更し「Save」や「Submit」)
19. RESCALE CONFIDENTIAL • Information disclosure for evaluation purposes only. Any violation or breach of company confidential information will be enforced to the fullest extent permitted in accordance with the laws of the State of Delaware. 19
ジョブの共有
• ジョブを他のユーザと共有する機能
- 実行前保存済, 実行中, 実行済ジョブが対象
- 実行済ジョブは結果ファイルを含む
※結果ファイルは共有先ユーザのストレージへ複製されるわけではなくあくまでもファイルの共有
- 実行中ジョブの共有ユーザのクラスタへのSSHアクセス許可設定可能
- 共有先としてWorkspace名入力によりWorkspaceに属する全ユーザと共有
- Rescaleサポートへのジョブ共有も同じ操作
20. RESCALE CONFIDENTIAL • Information disclosure for evaluation purposes only. Any violation or breach of company confidential information will be enforced to the fullest extent permitted in accordance with the laws of the State of Delaware. 20
ジョブの共有実行
ジョブ画面およびジョブ
リスト画面より
「Clone」のアイコンを
クリック
ジョブ画面およびジョブ
リスト画面より
「Clone」のアイコンを
クリック
ジョブ画面およびジョブ
リスト画面より
「Share」のアイコンを
クリック
Rescaleサポートへのジョブ共有時はチ
ェック(共有先ユーザ入力不要に)
共有先ユーザ(ScaleXログインアカウント
)もしくはWorkspace名とメッセージを
入力し「Share」ボタンでジョブ共有可能
(別のWorkspaceに属するユーザへ共有
する場合はWorkspace IDも入力,
Organization設定により許可されていない
場合あり)
ジョブ実行中のSSHアクセス許可のオ
プション
21. RESCALE CONFIDENTIAL • Information disclosure for evaluation purposes only. Any violation or breach of company confidential information will be enforced to the fullest extent permitted in accordance with the laws of the State of Delaware. 21
共有されたジョブの確認および操作
メールでジョブ共有の通知
あり(デフォルト設定)
Rescaleサポートへのジョブ共有時はチ
ェック(共有先ユーザ入力不要に) 共有ジョブは「Shared with me」
に分類される
ファイルのダウンロードやデスクトップ
へのアタッチに対応
(デスクトップ上でのジョブ結果ファイ
ルの更新/追記内容の同期はできない)
共有されたジョブは再度共有する操
作には未対応だが、クローンや削除
(共有停止)操作は可能
22. RESCALE CONFIDENTIAL • Information disclosure for evaluation purposes only. Any violation or breach of company confidential information will be enforced to the fullest extent permitted in accordance with the laws of the State of Delaware. 22
ジョブの共有停止
ジョブ共有表示アイコンをクリックす
ることで共有を停止が可能
23. RESCALE CONFIDENTIAL • Information disclosure for evaluation purposes only. Any violation or breach of company confidential information will be enforced to the fullest extent permitted in accordance with the laws of the State of Delaware. 23
ジョブのテンプレート
• ジョブのひな形をテンプレートとして作成保存する機能
- テンプレート化に必要な項目はソフトウエア(バージョン含む)及びハードウ
エアの選択のみ
- ジョブと同様に他ユーザやワークスペースと共有が可能
「+新しいジョブ」という
メニューがなくなり「ジョ
ブ」画面に「Create New
Job」で新規ジョブおよび
テンプレート作成
テンプレートはジョブ画面上部に並び、
編集やテンプレートからのジョブ作成操
作が可能
テンプレートはジョブリストにも表示され
「TEMPLATE」と表記されジョブと区別
24. RESCALE CONFIDENTIAL • Information disclosure for evaluation purposes only. Any violation or breach of company confidential information will be enforced to the fullest extent permitted in accordance with the laws of the State of Delaware. 24
ジョブの作成中にソフトウエアとハードウ
エアの設定が完了した時点で「Save as
Template」という操作が可能に
ジョブテンプレートの作成
Teplateとして保存時に説明書
き(Description)を記載する
25. RESCALE CONFIDENTIAL • Information disclosure for evaluation purposes only. Any violation or breach of company confidential information will be enforced to the fullest extent permitted in accordance with the laws of the State of Delaware. 25
バッチジョブと同様にデスクトップでもテ
ンプレート作成と保存に対応し、画面構成
もジョブ画面と同様のレイアウトに変更
参考) デスクトップもテンプレート対応となり画面構成が新しく
デスクトップ作成画面もジョブ作成と同
様のソフトウエア選択画面に変更,ソフ
トウエア選択後はハードウエアには対応
済のもののみリストされる
起動中/起動済デスクトップとテンプレートがが
表示され、下部のアイコンでデスクトップへの接
続/停止やテンプレート編集や共有削除が可能に
ハードウエア選択後に右側でWalltime
設定, ジョブ結果ファイルのアタッチは
「ジョブ」を展開し対象ジョブをチェッ
クし選択
26. RESCALE CONFIDENTIAL • Information disclosure for evaluation purposes only. Any violation or breach of company confidential information will be enforced to the fullest extent permitted in accordance with the laws of the State of Delaware. 26
予算/通知設定
• 予算設定
- ユーザ自身が予算を設定
※Organization/Workspace管理者による予算設定機能については別途開催予定のWebinarにて説明
• 通知設定
- 予算消費状況やジョブのステータスなどをメールで通知する項目を設定
プロファイル設定→「Budgets」画面
にて予算設定 プロファイル設定→「通知情報」画面
にて通知のON/OFFおよび通知内容の
選択設定
27. RESCALE CONFIDENTIAL • Information disclosure for evaluation purposes only. Any violation or breach of company confidential information will be enforced to the fullest extent permitted in accordance with the laws of the State of Delaware. 27
ジョブのCLI/APIでの実行
• 主なユースケース/目的
- 複数ジョブの一斉投入の自動化
- ジョブ投入時刻の制御
- 最適化ソフトウエアとの連携
計算リソースとしてScaleXを用い最適化ソフトウエアからCLI/APIにてジョブを起動
- 既存のジョブワークフロー(インタフェース/スケジューラ)を使用した
ScaleXジョブ実行
ユーザにScaleXのインタフェースを提供しない/利用させない
28. RESCALE CONFIDENTIAL • Information disclosure for evaluation purposes only. Any violation or breach of company confidential information will be enforced to the fullest extent permitted in accordance with the laws of the State of Delaware. 28
ジョブのCLI/APIでの実行
• CLI
- Rescale提供コマンド(インストール必要)によりジョブ実行や管理が可能
※APIキーの発行が必須
- ジョブの参照や実行および「入力ファイルのアップロード→ジョブ作成→ジョ
ブ実行→ジョブ結果ダウンロード」といった一連の操作にも対応
- Rescale CLI Tutorial (https://docs.rescale.com/articles/rescale-cli-tutorial-110/)
• API (RESTful API)
- HTTPSプロトコル経由でURI/URLで表したリソースに対してHTTPメソッド
(GET/POST)を用いScaleXの操作や管理が可能
- コマンドのインストールが不要
- 利用にはスクリプト(Python, shell+cURL, PowerShell等)の作成が必要
- Rescale API Tutorial
Python: https://engineering.rescale.com/api-docs/?python#tutorials
shell+cURL: https://engineering.rescale.com/api-docs/?shell#tutorials
29. RESCALE CONFIDENTIAL • Information disclosure for evaluation purposes only. Any violation or breach of company confidential information will be enforced to the fullest extent permitted in accordance with the laws of the State of Delaware. 29
ジョブのCLI実行デモ
• End-to-End(一気通貫の動作)
- 以下の動作を1つのコマンドで実行
入力ファイルのアップロード
ジョブの作成および実行
ジョブ動作状況のモニタリング
結果ファイルのダウンロード
• 各ステップ
① 入力ファイルのアップロード
② ジョブの作成および実行
③ ジョブ動作状況のモニタリング
30. RESCALE CONFIDENTIAL • Information disclosure for evaluation purposes only. Any violation or breach of company confidential information will be enforced to the fullest extent permitted in accordance with the laws of the State of Delaware. 30
CLIによるジョブの実行(End-to-End)
% ls -l
total 8
drwxr-xr-x@ 8 takeuh staff 256 11 26 15:49 airfoil2D
-rw-r--r-- 1 takeuh staff 253 11 26 15:48 submit.sh
% cat submit.sh
#!/bin/bash
#RESCALE_NAME="OpenFOAM+ CLI Submission Test #1"
#RESCALE_ANALYSIS=openfoam_plus
#RESCALE_ANALYSIS_VERSION=v1706+-intelmpi
#RESCALE_LOW_PRIORITY=true
#RESCALE_CORE_TYPE=Onyx
#RESCALE_CORES=1
#RESCALE_WALLTIME=1
cd airfoil2D ; ./Allrun
% rescale-cli -X https://platform.rescale.jp submit -i submit.sh -E -p
xxxxxxxxxxxxxxxxxxxxxxxxx
2020-11-26 15:51:47,829 - Authenticated as xxxxxxxxxxxxx@rescale.com
2020-11-26 15:51:47,856 - Executing Command.
2020-11-26 15:51:47,861 - Parsing Input Files
2020-11-26 15:51:47,861 - No existing files to include
2020-11-26 15:51:57,410 - Found Analysis: openfoam_plus
2020-11-26 15:51:57,592 - No project with the specified name was found: null
2020-11-26 15:51:57,593 - Zipping Files
2020-11-26 15:51:57,598 - Creating temporary encrypted zip at
/var/folders/8_/rw4zp9111wv8rmr9cg8gdw_m0000gn/T/rescale-cli-
work7685024645991593926/input.zip
2020-11-26 15:51:57,775 - Finished writing encrypted file
2020-11-26 15:51:57,776 - Uploading Files
2020-11-26 15:51:57,778 - Uploading:
/var/folders/8_/rw4zp9111wv8rmr9cg8gdw_m0000gn/T/rescale-cli-
work7685024645991593926/run.sh
2020-11-26 15:51:57,780 - Uploading run.sh:
2020-11-26 15:52:00,118 - ##############################| 256B / 256B
2020-11-26 15:52:00,364 - Uploading:
/var/folders/8_/rw4zp9111wv8rmr9cg8gdw_m0000gn/T/rescale-cli-
work7685024645991593926/input.zip
2020-11-26 15:52:00,364 - Uploading input.zip:
2020-11-26 15:52:00,622 - ##############################| 643.23KB / 643.23KB
2020-11-26 15:52:01,520 - Job: Saving Job
2020-11-26 15:52:02,529 - Job eLeCgb: Saved
2020-11-26 15:52:02,529 - Job eLeCgb: Submitting
2020-11-26 15:52:03,793 - Job eLeCgb: Starting polling cycle
2020-11-26 15:53:03,850 - Job eLeCgb: Status - Validated
2020-11-26 15:54:04,370 - Job eLeCgb: Status - Validated
2020-11-26 15:55:04,873 - Job eLeCgb: Status - Validated
2020-11-26 15:56:05,885 - Job eLeCgb: Status - Executing
2020-11-26 15:57:06,016 - Job eLeCgb: Status - Completed
2020-11-26 15:57:06,016 - Job eLeCgb: Finished...
2020-11-26 15:57:06,016 - Job eLeCgb: Downloading files to xxx
2020-11-26 15:57:08,102 - Downloading xxx/process_output.log
…
2020-11-26 15:57:11,109 - ##############################| 256B / 256B
2020-11-26 15:57:11,181 - Finished downloading files.
% ls -l
total 8
drwxr-xr-x@ 8 takeuh staff 256 11 26 15:49 airfoil2D
drwxr-xr-x 5 takeuh staff 160 11 26 15:57 output
-rw-r--r-- 1 takeuh staff 253 11 26 15:48 submit.sh
% cd output
% ls -l
total 16
drwxr-xr-x 20 takeuh staff 640 11 26 15:57 airfoil2D
-rw-r--r-- 1 takeuh staff 271 11 26 15:57 process_output.log
-rw-r--r-- 1 takeuh staff 253 11 26 15:57 run.sh
% cd airfoil2D
% ls -l
total 1768
drwxr-xr-x 6 takeuh staff 192 11 26 15:57 0
drwxr-xr-x 8 takeuh staff 256 11 26 15:57 100
...
-rw-r--r-- 1 takeuh staff 212 11 26 15:57 Allclean
-rw-r--r-- 1 takeuh staff 249 11 26 15:57 Allrun
drwxr-xr-x 6 takeuh staff 192 11 26 15:57 constant
-rw-r--r-- 1 takeuh staff 896779 11 26 15:57 log.simpleFoam
drwxr-xr-x 3 takeuh staff 96 11 26 15:57 postProcessing
drwxr-xr-x 5 takeuh staff 160 11 26 15:57 system
Basic Job Tutorial(OpenFOAM airfoil2D) でのCLIによるend-to-end実行例
Submission File
Input fileディレク
トリ (Zip前)
31. RESCALE CONFIDENTIAL • Information disclosure for evaluation purposes only. Any violation or breach of company confidential information will be enforced to the fullest extent permitted in accordance with the laws of the State of Delaware. 31
CLIによるジョブの実行(各ステップ)
①ファイルアップロード
% rescale-cli -X https://platform.rescale.jp upload -p xxxxxxxxxxxxxxxxxxxxxxxx -f
../motorBike.tgz -e
2021-01-21 14:52:26,852 - Authenticated as xxxxxxxxxxxxxx@rescale.com
2021-01-21 14:52:26,858 - Uploading to target user/user_xxxxxxxx
2021-01-21 14:52:26,861 - Uploading motorBike.tgz:
2021-01-21 14:52:29,149 - ##############################| 24.98MB / 24.98MB
2021-01-21 14:52:29,396 - Successfully uploaded ../motorBike.tgz to Rescale platform.
{"success":true,"startTime":1611208346855,"endTime":1611208349482,"files":[{"name":"mo
torBike.tgz","pathParts":{"path":"user/user_xxxxxx/motorBike.tgz-6d9e2531-0e17-4d71-
8b24-5a81e9c0028e","container":"jpprod-rescale-
platform"},"storage":{"storageType":"S3Storage","id":"pCTMk","encryptionType":"default
","connectionSettings":{"region":"ap-northeast-
1"}},"encodedEncryptionKey":"6C5+vTdtWvqOAkUx5U/+HsGDTO3/TsFRNeQv6wxOowc=","isUploaded
":true,"decryptedSize":26193713,"typeId":1,"fileChecksums":[{"hashFunction":"sha512","
fileHash":"c72322b44ac7ca09efb9f8d32599a3a80d8726d3251d6dd61fada041bfeb56d4ea9348d269d
fb6f588cd59d4f7800041aba2c71cfec208c9338f4bf388671580"}],"id":"DRseLd"}]}
②ジョブ実行
% ls -l
total 16
-rw-r--r-- 1 takeuh staff 233 1 20 10:47 allrun.sh
-rw-r--r-- 1 takeuh staff 266 1 21 14:55 submit.sh
takeuh@hiroshinoMacBook-Pro OpenFOAM_MotorBike % cat submit.sh
#!/bin/bash
#RESCALE_NAME="OpenFOAM MotorBike CLI Submission Test #1"
#RESCALE_ANALYSIS=openfoam
#RESCALE_ANALYSIS_VERSION=5.0
#RESCALE_LOW_PRIORITY=true
#RESCALE_CORE_TYPE=ferrite
#RESCALE_CORES=8
#RESCALE_WALLTIME=2
#RESCALE_EXISTING_FILES=DRseLd
./allrun.sh
% cat allrun.sh
#!/bin/bash
sed -i -- "s/numberOfSubdomains .*/numberOfSubdomains $RESCALE_CORES_PER_SLOT;/g"
system/decomposeParDict
source $WM_PROJECT_DIR/bin/tools/RunFunctions
decomposePar
runParallel simpleFoam
reconstructPar
rm -rf processor*- Parsing Input Files
% rescale-cli -X https://platform.rescale.jp submit -p xxxxxxxxxxxxxxxxx -i submit.sh
2021-01-21 15:01:11,750 - Authenticated as xxxxxxxxxxxxx@rescale.com
2021-01-21 15:01:11,771 - Executing Command.
2021-01-21 15:01:11,774 - Parsing Input Files
2021-01-21 15:01:27,258 - Found Analysis: openfoam
2021-01-21 15:01:27,408 - No project with the specified name was found: null
2021-01-21 15:01:27,408 - Zipping Files
…
…
2021-01-21 15:01:27,442 - Uploading run.sh:
2021-01-21 15:01:30,032 - ##############################| 272B / 272B
…
2021-01-21 15:01:30,305 - Uploading input.zip:
2021-01-21 15:01:30,448 - ##############################| 320B / 320B
2021-01-21 15:01:30,814 - Job: Saving Job
2021-01-21 15:01:32,305 - Job nkUXS: Saved
2021-01-21 15:01:32,305 - Job nkUXS: Submitting
2021-01-21 15:01:35,008 - Job nkUXS: --end-to-end flag not set, polling should be
done manually.
③ジョブモニタリング
% rescale-cli -X https://platform.rescale.jp status –p xxxxxxxxxxxxxxxxxxx -j nkUXS
2021-01-21 15:02:00,863 - Authenticated as xxxxxxxxxxxxxxx@rescale.com
The status of job nkUXS is Queued
% rescale-cli -X https://platform.rescale.jp status –p xxxxxxxxxxxxxxxxxxx -j nkUXS
2021-01-21 15:06:01,190 - Authenticated as xxxxxxxxxxxxxxx@rescale.com
The status of job nkUXS is Validated
% rescale-cli -X https://platform.rescale.jp status –p xxxxxxxxxxxxxxxxxxx -j nkUXS
2021-01-21 15:08:36,255 - Authenticated as xxxxxxxxxxxxxxx@rescale.com
The status of job nkUXS is Executing
% rescale-cli -X https://platform.rescale.jp status –p xxxxxxxxxxxxxxxxxxx -j nkUXS
2021-01-21 15:18:04,853 - Authenticated as xxxxxxxxxxxxxxx@rescale.com
The status of job nkUXS is Completed
OpenFOAM MotorBike ExampleでのCLIによる入力ファイルアップロードおよびジョブ実行/モニタリング例
File IDを確認
確認したFile IDを指定
Job IDを確認
確認したJob IDを指定
33. RESCALE CONFIDENTIAL • Information disclosure for evaluation purposes only. Any violation or breach of company confidential information will be enforced to the fullest extent permitted in accordance with the laws of the State of Delaware. 33
ジョブのAPI実行デモ(shell+cURL)
• 各ステップ
① ジョブの作成
② ジョブの実行
③ ジョブのモニタリング
34. RESCALE CONFIDENTIAL • Information disclosure for evaluation purposes only. Any violation or breach of company confidential information will be enforced to the fullest extent permitted in accordance with the laws of the State of Delaware. 34
APIによるジョブの実行(各ステップ)
①ジョブ作成
% cat createjob.sh
#!/bin/bash
cat <<EOF > data.json
{
"name": "OpenFOAM airfoil2D API Test #1",
"jobanalyses": [
{
"useMpi": false,
"command": "cd airFoil2D ; ./Allrun",
"analysis": {
"code": "openfoam_plus",
"version": "v1706+-intelmpi"
},
"hardware": {
"coresPerSlot": 1,
"slots": 1,
"coreType": "emerald"
},
"inputFiles": [
{
"id": "mZASzd"
}
]
}
]
}
EOF
curl -X POST --data @data.json
-H "Authorization: Token xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
-H "Content-Type: application/json"
https://platform.rescale.jp/api/v2/jobs/
% sh createjob.sh | jq .
…
{
"id": "WihTdb",
"isLowPriority": false,
"name": "OpenFOAM airfoil2D API Test #1",
"description": "",
…
②ジョブ実行
% cat submitjob.sh
#!/bin/bash
curl -X POST -H 'Authorization: Token xxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
https://platform.rescale.jp/api/v2/jobs/WihTdb/submit/
% sh submitjob.sh
③ジョブモニタリング
% cat statusjob.sh
#!/bin/bash
curl -H 'Authorization: Token xxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
https://platform.rescale.jp/api/v2/jobs/WihTdb/statuses
% sh statusjob.sh |jq .
…
{
"count": 5,
"next": null,
"previous": null,
"results": [
{
"status": "Validated",
"statusReason": null,
"statusDate": "2021-01-21T07:08:25.088000Z",
"id": "gmuSQc",
"jobId": "WihTdb"
},
{
"status": "Started",
"statusReason": null,
"statusDate": "2021-01-21T07:08:24.947000Z",
"id": "SJAfFc",
"jobId": "WihTdb"
},
…
Basic Job Tutorial(OpenFOAM airfoil2D) でのAPIによるジョブ作成およびジョブ実行/モニタリング例
※入力ファイルは事前にアップロード済
ジョブ定義JSON
/jobs/<Job ID>/submit/
へPOSTメソッドで送信
ジョブ定義JSONを
POSTメソッドで
/jobs/へ送信
JSON形式の返値中
の”id”がJob ID
/jobs/<Job ID>/statuses/
へGETメソッドでステータ
ス情報がJSON形式の返値
35. RESCALE CONFIDENTIAL • Information disclosure for evaluation purposes only. Any violation or breach of company confidential information will be enforced to the fullest extent permitted in accordance with the laws of the State of Delaware. 35
APIによるジョブの作成にあたって
ジョブ作成時のJSON指定パラメタについて
• コアタイプおよびソフトウエア/バージョンは下記APIにて得られる”code: ”もしくは”versionCode: “の
値を用いる
% curl -H "Authorization: Token xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
"https://platform.rescale.jp/api/v2/coretypes/?page_size=1000" |jq ".results[].code"
…
"amberv2"
"ammonite"
"beryl"
"carbon"
"catseye"
"citrine"
"diamond"
"dolomite"
"emerald"
"ferrite"
"gpu-kepler"
"granite"
"graphite"
"halite"
"hi-io-plus"
"hi-mem-hpc"
"hpc-3"
"hpc-plus"
"ivory"
"jasper"
"luna"
"maple"
"melanite"
"mercury"
"moonstone"
"oak"
"obsidian”
…
% curl -H "Authorization: Token xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
"https://platform.rescale.jp/api/v2/analyses/?page_size=1000" | jq .
…
{
"code": "openfoam_plus",
"description": "<p><b>OpenFOAM</b> is the free, open source CFD software
released and developed primarily by <b>OpenCFD</b> Ltd since 2004. It has a large user
base across most areas of engineering and science, from both commercial and academic
organisations. OpenFOAM has an extensive range of features to solve anything from
complex fluid flows involving chemical reactions, turbulence and heat transfer, to
acoustics, solid mechanics and electromagnetics.</p>",
…
"versions": [
{
"id": "WvwQW",
"allowedCoreTypes": [
…
"version": "v1812+ (Intel MPI)",
"versionCode": "v1812+-intelmpi",
…
36. RESCALE CONFIDENTIAL • Information disclosure for evaluation purposes only. Any violation or breach of company confidential information will be enforced to the fullest extent permitted in accordance with the laws of the State of Delaware. 36
実験計画法(DOE)ジョブ
• パラメータスタディをScaleX上で単一のジョブ(ワークフロー)と
して実現するための機能
- 入力ファイル中に定義されている初期条件や境界条件などをパラメータスタデ
ィ対象(変数)とし指定した範囲や組み合わせでの複数の計算を自動/並列実行
- 指定した計算結果(値)をScaleX画面上でグラフにプロットし可視化すること
が可能
Job Typeを「実験計画法」へ変更
37. RESCALE CONFIDENTIAL • Information disclosure for evaluation purposes only. Any violation or breach of company confidential information will be enforced to the fullest extent permitted in accordance with the laws of the State of Delaware. 37
実験計画法ジョブ デモ
• OpenFOAM 2次元翼型周りの流れ
- 初期/境界条件の速度(x_velocity, y_velocity)をパラメータとし揚力係数(Cl)
抗力係数(Cd)をプロット(Tutorial Job: https://docs.rescale.com/articles/openfoam-doe/ )
x_vel y_vel
20 3
20 4
20 5
…
airfoil2D_DOE.zip
(0/U以外のファイル群)
U_inp.template
(0/Uの元ファイル
パラメタを変数化) 20 3
20 4
20 5
run1
run2
run3
…
extract.py
(Cl, Cdを抽出)
Cl1, Cd1
Cl2, Cd2
Cl3, Cd3
結果ファイル
結果ファイル
結果ファイル
①ジョブ設定 ②ジョブ実行 ③結果の確認
ソルバの並列実行
パラメータリスト
ScaleX上で散布図などに
値をプロットして確認
…
38. RESCALE CONFIDENTIAL • Information disclosure for evaluation purposes only. Any violation or breach of company confidential information will be enforced to the fullest extent permitted in accordance with the laws of the State of Delaware. 38
実験計画法ジョブ 並列設定
パラメータをCSVファイルとして準備する or 変数を指定する
変数の指定を選択した場合は変数とそ
の範囲を画面上で指定する
CSVファイルを選択した場合はアップロード
もしくはクラウド上のファイル指定
39. RESCALE CONFIDENTIAL • Information disclosure for evaluation purposes only. Any violation or breach of company confidential information will be enforced to the fullest extent permitted in accordance with the laws of the State of Delaware. 39
実験計画法ジョブ テンプレート
テンプレートファイルをアップロード/指定し変数代入後のファイル配置パス/ファイル名の指定する
ファイル配置パスおよびファイル名
テンプレートファイル
% cat U.inp_template
…
dimensions [0 1 -1 0 0 0 0];
internalField uniform (${x_velocity?string("0.00")} ${y_velocity?string("0.00")} 0);
boundaryField
{
inlet
{
type freestream;
freestreamValue uniform (${x_velocity?string("0.00")} ${y_velocity?string("0.00")} 0);
}
outlet
{
type freestream;
freestreamValue uniform (${x_velocity?string("0.00")} ${y_velocity?string("0.00")} 0);
}
…
テンプレートファイル内の記述
「Template Dry Run」をチェックし
Submitすると、計算ノードの起動及び計
算は実行されずパラメータの分布のみ実
行されジョブが終了
40. RESCALE CONFIDENTIAL • Information disclosure for evaluation purposes only. Any violation or breach of company confidential information will be enforced to the fullest extent permitted in accordance with the laws of the State of Delaware. 40
実験計画法ジョブ スロットの設定
スロット(並列走行数)の設定により複数ケースが同時に計算される
このケースでは8コア1ノードが起動
し8つのケースが並列走行する
41. RESCALE CONFIDENTIAL • Information disclosure for evaluation purposes only. Any violation or breach of company confidential information will be enforced to the fullest extent permitted in accordance with the laws of the State of Delaware. 41
実験計画法ジョブ Post Processingの設定
結果としてプロット対象とする値を計算終了後に抽出するためのスクリプトおよびコマンドを指定する
このケースではextract.pyスクリプ
トを用いてlog.simplefoamからCd,
Clという値を抽出し出力している
42. RESCALE CONFIDENTIAL • Information disclosure for evaluation purposes only. Any violation or breach of company confidential information will be enforced to the fullest extent permitted in accordance with the laws of the State of Delaware. 42
実験計画法ジョブ ジョブ実行中
指定したスロット数で計算が並列走行する
スロット数分計算が並列走行し、「解析」
中の番号を選択することで通常通りログの
テイル確認などが可能
43. RESCALE CONFIDENTIAL • Information disclosure for evaluation purposes only. Any violation or breach of company confidential information will be enforced to the fullest extent permitted in accordance with the laws of the State of Delaware. 43
実験計画法ジョブ 結果ファイルの構成
ジョブの結果中に「Child Run」というかたちで各パラメータでの計算結果がまとめられる
「Child Runs」というかたちで実験計画法
ジョブ内で走行した各計算(Run)に番号が
振られ、指定したパラメータ値とともに表
形式で表示される
各計算(Run)をクリックすると通常の結果フ
ァイルと出力した結果(ここではCd, Cl)が
確認できる
44. RESCALE CONFIDENTIAL • Information disclosure for evaluation purposes only. Any violation or breach of company confidential information will be enforced to the fullest extent permitted in accordance with the laws of the State of Delaware. 44
実験計画法ジョブ 結果のチャート表示
「チャート」タブ画面で結果の値をグラフにプロットし表示が可能
「散布図」「等高線図」「表面図」の3種類
から選択し、グラフの各軸をパラメータお
よび結果の紐付けることでプロット
45. 45
RESCALE CONFIDENTIAL • Information disclosure for evaluation purposes only. Any violation or breach of company confidential information will be enforced to the fullest extent permitted in accordance with the laws of the State of Delaware.
VIRTUALIZED CLOUD HOSTED BARE METAL ON PREMISE
キーコンポーネント
Rescale API
→マルチ/ハイブリッドクラウド, 多様なスケジューラに対応
Rescale Intelligence
→ワークロードやインフラの成熟度に応じたH/W選択可
Operational Workflows
→ポリシベースのセキュリティやリソース, 予算管理機能提供
R&D Workflows
→設計/解析者向けの簡便なインタフェース提供
まとめ: Rescale Intelligent Platform
提供するベネフィット
マルチ/ハイブリッドクラウド環境でのコスト
効率とパフォーマンス
グローバル/複数の組織や事業に対してスケー
ルする単一の制御機能
顧客の研究開発業務の効率化/加速