How does selectGPU work in MDCE?
1 view (last 30 days)
Show older comments
I have 4 workers and 2 GPUs (set the "compute mode" to be "default") in my PC. When I use the "local" cluster profile (the path of "selectGPU" is added) to run several tasks (say 4), they only use the first GPU but leave the second one in idle. It seems the function selectGPU does not work in this condition.
However if I type the following codes in the command window:
spmd
gd = gpuDevice;
idx = gd.Index;
disp(['Using GPU ',num2str(idx)]);
end
the outputs are:
Starting parallel pool (parpool) using the 'local' profile ... connected to 4 workers.
Lab 1:
Using GPU 1
Lab 3:
Using GPU 1
Lab 2:
Using GPU 2
Lab 4:
Using GPU 2
which reveal that the function selectGPU does work in this spmd condition.
So I am wondering how does selectGPU work? Can I make it work in MDCE?
0 Comments
Answers (0)
See Also
Categories
Find more on Parallel Computing Fundamentals in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!