Must have valid initData to build channel

I have a parallel Matlab of 56 workers, I get the following error as I increase the upper (end) value of the parfor loop.
"Must have valid initData to build channel"
Can you please help me to solve this problem
Thanks

1 commentaire

Edric Ellis
Edric Ellis le 4 Juil 2019
This is an internal consistency error and definitely not expected - do you have any reproduction steps that you can post?

Connectez-vous pour commenter.

Réponses (3)

Halil Eyyuboglu
Halil Eyyuboglu le 4 Juil 2019

0 votes

Thanks for the reply. I get the error message, "Must have valid initData to build channel" I run the code below
-------------------------------------------------------------------------------------------------------------
patd = 'C:\PhaseFluctuations_Data\Paper_data\DataSLmV1L01km_Dmat200';
Psmat = load(patd,'-mat');Psmat = Psmat.Psmaty;Psmat = imag(Psmat);
iatla = 201;nreals = 2000;nreals = 50;%PsL01 = [];
parfor is = 1:nreals
PsL01(:,:,is) = Psmat(iatla*(is -1) + 1:is*iatla,1:iatla);
end
---------------------------------------------------------------------------------------------------------------------------
Notes
1) Error does not occur, if "nreals" = 10, but error occurs when "nreals" is changed to 50 or higher.
2) Psmat is a matrix of 402000 x 200 elements and the loop attempts to rearrange this matrix into 200 x 200 x 2000
3) No error is generated if "for" is used instead of "parfor"
Edric Ellis
Edric Ellis le 5 Juil 2019
Modifié(e) : Edric Ellis le 5 Juil 2019
I expect this is a misleading error as a consequence of running out of memory on the workers. You're duplicating Psmat and attempting to put a full copy of it on each of your 56 workers. (By restricting nreals, you're limiting the number of workers used).
I doubt this sort of manipulation is a good fit for parfor in any case. You might be better off doing:
permute(reshape(Psmat.', 200, 200, 2000), [2 1 3])
or something similar. Here's my vastly-simplified example:
>> data = [ 1, 2; 3, 4; 11, 12; 13, 14; 101, 102; 103, 104]
data =
1 2
3 4
11 12
13 14
101 102
103 104
>> permute(reshape(data.', 2, 2, 3), [2 1 3])
ans(:,:,1) =
1 2
3 4
ans(:,:,2) =
11 12
13 14
ans(:,:,3) =
101 102
103 104

Catégories

En savoir plus sur Parallel Computing Toolbox dans Centre d'aide et File Exchange

Produits

Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by