필터 지우기
필터 지우기

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 CenterFile Exchange에서 Parallel Computing Fundamentals에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by