필터 지우기
필터 지우기

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 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