Borrar filtros
Borrar filtros

Matlab 2020a-AWS cluster

1 visualización (últimos 30 días)
Kevin Lin
Kevin Lin el 26 de Ag. de 2020
Respondida: Raymond Norris el 26 de Ag. de 2020
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.

Respuestas (1)

Raymond Norris
Raymond Norris el 26 de Ag. de 2020
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

Categorías

Más información sobre Parallel Computing Fundamentals en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by