1 © 2016 The MathWorks, Inc.
MATLAB
®
における並列・分散コンピューティング
~ Parallel Computing Toolbox
™& MATLAB Distributed Computing Server
™~
MathWorks
®Japan
Application Engineering Group
Takashi Yoshida
System Configuration
MATLAB Local Desktop Computer Computer Cluster SchedulerScale-out
3
Parallel Computing Toolbox
ローカル環境によるスケールアップ
並列・分散コンピューティング向けアプリ開発環境を提供
–
最大 512CPUコアをサポート
–
GP-GPU (NVIDIA社製グラフィックスカード Compute
Capability 2.0以上) をサポート
https://developer.nvidia.com/cuda-gpus
–
初心者から上級者向けまでの機能を提供
ビルトイン関数の並列化
Parallel FOR-loop
MPI プログラミング
MATLAB Desktop (Client) Local Desktop ComputerMATLAB Distributed Computing Server
クラスタ環境へのスケールアウト
クラスタ上での並列・分散コンピューティング環境を提供
–
大規模解析・シミューレーション
–
MATLAB / Simulink
®Product
Family をサポート
–
汎用スケジューラとの連携
IBM® Platform LSF
Microsoft® Windows® HPC Server Altair PBS Professional®
TORQUE
Generic Scheduler
Grid Engine / SLURM / etc.
Computer Cluster
Scheduler
5
クラウドを利用したソフトウェア開発
PaaS (Platform as a Service)
MATLAB / Simulink のクラウド利用の例
–
MATLABのライセンスは”Bring Your Own License”
Remote Access
Activation
クラウドを利用した計算環境の拡張
IaaS (Infrastructure as a Service)
MATLAB Distributed Computing Server のクラウド利用の例
–
MATLABのライセンスは”Bring Your Own License”
計算
ライセンス
認証
License Server license.dat7
Distributed Simulation
パラメータ・スウィープなシミューレーションを分散処理
既存モデルの繰り返し実行の例
parforQROUT = zeros(320,320,10);
parfor
n = 1:10
QROUT(:,:,n) = QR_Trans_PCT_wrapper(n);
end
Offload Simulation
シミューレーション実行環境の移行
既存モデルのオフロード実行の例
batch
>> %% Run a model on a cluster using BATCH
>> mycluster = parcluster(’mycluster’); % Select a cluster profile
>> job = batch('callmodelscript'); % Create a job and submit it
>> wait(job); % Wait until the submitted job has done
>> out = load(job); % Retrieve the output from a worker
>>
>> %% Do a post-process
>> delete(job); % Delete the job object
>> datastr = get(out.ans, 'ScopeData'); % Get the output from outport block
>> clear out% Discard large data
>> %% Plot the result of simulation
9
Benchmark Testing
評価モデル
–
Dual Clutch Transmission Model
詳細に関しては以下をご覧ください
http://www.mathworks.com/matlabcentral/fileexchange/32246-dual-clutch-transmission-model-in-simulink http://www.mathworks.com/videos/shift-schedule-optimization-of-a-dual-clutch-transmission-81828.html
Benchmark Testing
Offload Simulation
環境
CPU
Memory
Storage Type
OS
Lenovo T520
Intel Core i7 2640M @ 2.80GHz(2 physical cores / 2 virtual cores)
8GB
HDD
Windows 7 SP1 64bit Enterprise Editionc3.2xlarge
Intel Xeon E5-2680v2 @ 2.80GHz(4 physical cores / 8 virtual cores)
15GB
SSD
Windows Server 2012 R2 Standard
c4.8xlarge
Intel Xeon E5-2666v3 @ 2.90GHz × 2(Total : 18 physical / 36 virtual cores)
60GB
SSD
Windows Server 2012 R2 Standard4 5
11
Benchmark Testing
Distributed Simulation
環境
CPU
Memory
Storage Type
OS
Lenovo T520
Intel Core i7 2640M @ 2.80GHz(2 physical cores / 2 virtual cores)
8GB
HDD
Windows 7 SP1 64bit Enterprise Editionc3.2xlarge
Intel Xeon E5-2680v2 @ 2.80GHz(4 physical cores / 8 virtual cores)
15GB
SSD
Windows Server 2012 R2 Standard
c4.8xlarge
Intel Xeon E5-2666v3 @ 2.90GHz × 2(Total : 18 physical / 36 virtual cores)
60GB
SSD
Windows Server 2012 R2 Standard0 100 200 300 400
全 161 シミュレーションの計算時間 (秒)
まとめ
シミュレーション時間の短縮
1回のシミュレーション
時間短縮
複数回のシミュレーション
時間短縮
開発はローカル、実行はサーバ
開発と実行、両方をサーバ
13
まとめ
HPC環境へのリモートアクセス
シミュレーション時間の短縮
1回のシミュレーション
時間短縮
複数回のシミュレーション
時間短縮
開発はローカル、実行はサーバ
開発と実行、両方をサーバ
サーバ環境に MATLAB/Simulink を用意
MATLABライセンスはBYOL
Cloud (Amazon EC2) On-premise Remote accessまとめ
HPC環境を使った Offload Simulation
シミュレーション時間の短縮
1回のシミュレーション
時間短縮
複数回のシミュレーション
時間短縮
開発はローカル、実行はサーバ
開発と実行、両方をサーバ
ローカルホストには Parallel Computing Toolbox
サーバ環境には MATLAB Distributed
Computing Server
On-premiseMATLAB Distributed Computing Server
15
まとめ
HPC環境へのリモートアクセスと分散シミュレーション
シミュレーション時間の短縮
1回のシミュレーション
時間短縮
複数回のシミュレーション
時間短縮
開発はローカル、実行はサーバ
開発と実行、両方をサーバ
サーバ環境に MATLAB/Simulink、そして
Parallel Computing Toolbox
MATLAB Distributed
Computing Sever による拡張
Cloud (Amazon EC2) Parallel Computing Toolbox On-premise Parallel Computing Toolbox Remote accessまとめ
HPC環境を用いた分散シミュレーション
シミュレーション時間の短縮
1回のシミュレーション
時間短縮
複数回のシミュレーション
時間短縮
開発はローカル、実行はサーバ
開発と実行、両方をサーバ
ローカルホストには Parallel Computing Toolbox
サーバ環境には MATLAB Distributed
Computing Server
On-premiseMATLAB Distributed Computing Server