Matlab 2020a-AWS cluster
조회 수: 1 (최근 30일)
이전 댓글 표시
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.
댓글 수: 0
답변 (1개)
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
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Parallel Computing Fundamentals에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!