spmd inner matrix dimensions' problem

3 ビュー (過去 30 日間)
Lian
Lian 2015 年 6 月 11 日
コメント済み: Aarti Ghatkesar 2015 年 6 月 16 日
I have a main function calls an inner function which works OK in series manner, i.e. without spmd. However after converting to spmd, an error of 'inner matrix dimensions must agree' happens immediately at the second line of the inner function. I tried with 1 labor, as if the code still runs in series manner, the error also occurs.
So what does it mean by inner matrix? I have some other codes with spmd, which all work fine.
Any one can point me a direction? Many thanks in advance.
  2 件のコメント
Lian
Lian 2015 年 6 月 11 日
Problem just found. It is due to the global variables. So looks like spmd does not accept global variables. The error message is very misleading.
Just to benefit anyone who has the same problem.
Aarti Ghatkesar
Aarti Ghatkesar 2015 年 6 月 16 日
Hi Lian,
The error you are getting is a very generic one. Could you post your code here in order to see what is causing this error? Also, you are right about global variables not being allowed while using spmd.
What do you mean by inner function? Is it a nested function? If so, there are limitations while using nested functions with spmd. Check out the limitations of spmd at the link: Limitations of spmd

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeParallel for-Loops (parfor) についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by