Error while using the function codistributor1d, which says, "Distribution partition must be a length NUMLABS row-vector of non-negative integer-valued numeric values"

When I run parallel loops in Matlab I use 2 workers, but while using 'codistributor1d' function as -> codistr = codistributor1d(1,[1 1]), always shows an error, "Distribution partition must be a length NUMLABS row-vector of non-negative integer-valued numeric values" and n = numlabs always gives me n = 1, which implies that I can't use the partition vector of length greater than 1, whereas I am using 2 workers and I should get numlabs = 2 and I should be able to use the partition vector of length 2 which I am using as [1 1]. How to solve this issue?

1 件のコメント

Edric Ellis
Edric Ellis 2017 年 6 月 20 日
numlabs always has the value 1 outside an spmd block. Where are you trying to construct your codistributor?

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeParallel Computing についてさらに検索

質問済み:

2017 年 6 月 16 日

コメント済み:

2017 年 6 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by