spmd inner matrix dimensions' problem

3 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by