parallel computing // how to use parfor

1 visualización (últimos 30 días)
kyoung won Min
kyoung won Min el 3 de Dic. de 2020
Respondida: Pranav Verma el 11 de Dic. de 2020
My code is as below. But error occurs.
("Solve Variable Classification Issues in parfor-Loops" )
I don't know why error occur.
How to solve it??
%% definition of variables
nov = 30 ;
nov_down = -512 ;
nov_up = 512 ;
iter = 5000 ;
nohm = 4 ;
HMCR_down = 0.8 ;
HMCR_up = 1 ;
PAR_down = 0.2 ;
PAR_up = 0.4 ;
bw_down = 0.01 ;
bw_up = 1 ;
runn = 1 ;
HMS = 15 ;
initial=xlsread('HMS15,nov30,-512,512.xlsx');
HM=zeros(nohm,HMS,nov);
parfor i = 1:nohm
HMCR(i) = round(HMCR_down + (HMCR_up-HMCR_down)*rand,2) ;
PAR(i) = round(PAR_down + (PAR_up-PAR_down)*rand,2) ;
bw(i) = round(bw_down + (bw_up-bw_down)*rand,2) ; ;
virtual=zeros(HMS,nov);
virtual(1:HMS,1:nov)=initial;
HM(i,1:HMS,1:nov)= virtual ;
end

Respuestas (1)

Pranav Verma
Pranav Verma el 11 de Dic. de 2020
Hi kyoung,
Please provide with error and your .xls file so that we can reproduce the error.
In the meanwhile, you can go through the Problem with parfor classified variable and see if it helps.
Thanks

Categorías

Más información sobre Parallel for-Loops (parfor) en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by