Must have valid initData to build channel
2 views (last 30 days)
Show older comments
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 Comment
Edric Ellis
on 4 Jul 2019
This is an internal consistency error and definitely not expected - do you have any reproduction steps that you can post?
Answers (3)
Edric Ellis
on 5 Jul 2019
Edited: Edric Ellis
on 5 Jul 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
0 Comments
See Also
Categories
Find more on Parallel for-Loops (parfor) in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!