Reputation: 3
So I have been trying to run a parfor loop containg GPU arrays and the following error pops up even though MATLAB computes the result. I have read about a similar error occurring when the size of the data passed is huge, however, each array here has 500 ints and just to be sure I tried reducing the size of the array to 100 and still the same thing occurs furthermore, I tried running this without the use of parfor and it works fine.
Warning: Error caught during construction of remote parfor code. The parfor construct will now be run locally rather than on the remote parallel pool. The most likely cause of this is an inability to send input arguments to the workers because of a serialization error. The error report from the caught error is:
No method 'acquireLabs' with matching signature found for class 'com.mathworks.toolbox.distcomp.pmode.ParforControllerImpl'.
Error in distcomp.remoteparfor (line 72) obj.NumWorkers = p.acquireLabs(int32(maxLabsToAcquire));
Error in parallel_function>iMakeRemoteParfor (line 1060) P = distcomp.remoteparfor(pool, W, @make_channel, parfor_C);
Error in parallel_function (line 444) [P, W] = iMakeRemoteParfor(pool, W, parfor_C);
My code is something like this...
parfor s = 1:part
temp1 = temp_rand(s)<=p;
temp3 = temp1-[0 temp1(1:end-1)];
temp4 = update_part.*temp3;
p_temp(s)=sum(temp4);
end;
p=p_temp+dist_div*temp5;
where apart from dist_div
all are arrays of 500.
Upvotes: 0
Views: 451
Reputation: 25140
This looks like a problem in the implementation of parfor
when the loop range is a gpuArray
. You can work around this by instead running
parfor s = 1:gather(part)
...
end
Upvotes: 0