フィルターのクリア

Matlab 2020a-AWS cluster

1 回表示 (過去 30 日間)
Kevin Lin
Kevin Lin 2020 年 8 月 26 日
回答済み: Raymond Norris 2020 年 8 月 26 日
Hi , am just set up a cluster on AWS with the setting:
MATLAB Version:R2020a
Shared State:Personal
Auto-Manage Cluster Access:Yes
Worker Machine Type:Double Precision GPU (p3.8xlarge, 16 core, 4 GPU)
Workers per Machine:16
Use a dedicated headnode:Yes
Headnode Machine Type:Standard (m5.xlarge, 2 core)
Machines Requested:2
Machines Available:0
Allow cluster to auto-resize:No
Access to MATLAB Drive:Yes
Initial Worker Count:16
and got it running online, however, when I set this cluster as a defult for my matlab, when I use gpuDevice, I think I am only finding the gpu on my own computer, not the cluster. What did I do wrong or is there a mis-setting.

回答 (1 件)

Raymond Norris
Raymond Norris 2020 年 8 月 26 日
Hi Kevin,
Start a parallel pool and then run your GPU code from within a parallel construct. For example:
% Time x = A\b on CPU and GPU
% Start parallel pool on AWS
parpool(32);
spmd
sz = 2^14;
t0 = tic;
A = rand(sz);
b = rand(sz,1);
x = A\b;
cpu_t = toc(t0)
t1 = tic;
gA = gpuArrya.rand(sz);
gb = gpuArray.rand(sz,1);
gx = gA\gb;
x2 = gather(gx);
gpu_t = toc(t1)
end
Keep in mind that the GPU might need to warm up the first time through, so you might need to run it again.
Raymond

カテゴリ

Help Center および File ExchangeParallel Computing Fundamentals についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by