How to run the GPU in parallel with the CPU with the parallel computing toolbox?
1 view (last 30 days)
Show older comments
I want to split the processing of a large dataset between the GPU and CPU. I tried the spmd command but the function running on the GPU crashes even though it runs fine outside of the spmd block.
My code looks like this:
spmd
if labindex~=12
A=fun_CPU(x(labindex)); % run on CPU
else
A=fun_GPU(x(labindex)); % run on GPU
end
end
where fun_CPU and fun_GPU are m-file functions and fun_GPU is:
function y=fun_GPU(x)
% GPU processing
y=gather(y_GPU);
The error I get states: "spmd : The client lost connection to lab 1. This might be due to network problems, or the interactive matlabpool job might have errored. This is causing: java.io.IOException: An existing connection was forcibly closed by the remote host"
Is there a problem using gather to retrieve data from the GPU inside the spmd block? Or could this be hardware related ?
I am using a demo version of the parallel processing tb with matlab R2011b. I have a Tesla C1060 with driver v4.1.
0 Comments
Answers (0)
See Also
Categories
Find more on GPU Computing 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!