|
Hi @ all!
I have a problem implementing Parallel Computing into a relatively complex program I use at university for a scientific project in information technology.
The Problem is that, no matter if I run the program on a Dual Core or Quad Core computer, the version with Parallel Computing (with a parfor-loop or spmd) always needs a longer time to process than the one without it.
The section where I use Parallel Computing is the following:
memLength = [3 5 3 5];
quant_bits = [4 4 6 6];
histo_quant_bits = 6;
seqLength = 1;
A = [1 2 3 4; 5 6 7 8; 9 10 11 12; 13 14 15 16];
...
matlabpool 2;
spmd(2)
tic
ii = labindex;
A(1:3,ii) = mlse2(i_channels_shift_out, bitstream_fec, memLength(ii), quant_bits(ii), histo_quant_bits, seqLength);
ii= labindex+2;
A(1:3,ii) = mlse2(i_channels_shift_out, bitstream_fec, memLength(ii), quant_bits(ii), histo_quant_bits, seqLength);
toc
end
Results_lab1 = A{1};
Results_lab2 = A{2};
matlabpool close;
Processing time is about 20 sec, with a normal for-loop about 9 sec (Dual Core).
I also can see in my Status Monitor that with PP both cores are used at 100% the entire 20 seconds and without only one core is used 100%.
So the assigning of the jobs to the processor cores seems to work.
Thanks for help!
|