Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Getting errors for parfor while running with for does not give any error

1 visualización (últimos 30 días)
Surjya padhi
Surjya padhi el 2 de Sept. de 2014
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
I am trying the matlab parallel processing and during this I tried to apply this thing to my code. Below is the code.
matlabpool open 2
pop = create_population(match_matrix,PopSize);
ftns = zeros(PopSize,1);
parfor i=1:PopSize
ftns(i) = get_fitness(pop{i});
end
matlabpool close
The error I am getting is following
Error using parallel_function (line 589)
In an assignment A(I) = B, the number of elements in B and I must be the same.
Error stack:
SWIFTga>(parfor body) at 127
Error in SWIFTga (line 126)
parfor i=1:PopSize
I am getting no errors if I replace the parfor with for. Please suggest what may be going wrong....

Respuestas (0)

La pregunta está cerrada.

Community Treasure Hunt

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

Start Hunting!

Translated by