warning messages when using parfor in appdesigner app

조회 수: 35 (최근 30일)
Nick Bennett
Nick Bennett 2020년 11월 24일
댓글: Nick Bennett 2020년 11월 30일
I have been migrating an application which I previously built with GUIDE to appdesigner. One part of that application involves using the parallel toolbox for an expensive computation.
When running this portion of the application (which I call 'ASI') implemented wtih appdesigner, I see the following warning messages. There are 6 workers in my parallel pool, and it seems that each one of them is sending back the same message. These kind of warning messages do not appear when running the corresponding version of the application in GUIDE. The computation is completing successfully. It is just worrying that these warning messages are present.
Suggestions?
Warning: Unable to save App Designer app object. Save not supported for matlab.apps.AppBase objects.
Warning: Unable to save App Designer app object. Save not supported for matlab.apps.AppBase objects.
Warning: While loading an object of class 'ASI':
Unable to load App Designer app object. Load not supported for matlab.apps.AppBase objects.
> In parallel.internal.pool.deserialize (line 33)
In parallel.internal.pool.deserializeFunction (line 17)
In remoteParallelFunction (line 29)
Warning: While loading an object of class 'ASI':
Unable to load App Designer app object. Load not supported for matlab.apps.AppBase objects.
> In parallel.internal.pool.deserialize (line 33)
In parallel.internal.pool.deserializeFunction (line 17)
In remoteParallelFunction (line 29)
Warning: While loading an object of class 'ASI':
Unable to load App Designer app object. Load not supported for matlab.apps.AppBase objects.
> In parallel.internal.pool.deserialize (line 33)
In parallel.internal.pool.deserializeFunction (line 17)
In remoteParallelFunction (line 29)
Warning: While loading an object of class 'ASI':
Unable to load App Designer app object. Load not supported for matlab.apps.AppBase objects.
> In parallel.internal.pool.deserialize (line 33)
In parallel.internal.pool.deserializeFunction (line 17)
In remoteParallelFunction (line 29)
Warning: While loading an object of class 'ASI':
Unable to load App Designer app object. Load not supported for matlab.apps.AppBase objects.
> In parallel.internal.pool.deserialize (line 33)
In parallel.internal.pool.deserializeFunction (line 17)
In remoteParallelFunction (line 29)
Warning: While loading an object of class 'ASI':
Unable to load App Designer app object. Load not supported for matlab.apps.AppBase objects.
> In parallel.internal.pool.deserialize (line 33)
In parallel.internal.pool.deserializeFunction (line 17)
In remoteParallelFunction (line 29)

채택된 답변

Edric Ellis
Edric Ellis 2020년 11월 25일
It looks like you're either implicitly or explicitly using ASI within your parfor loop. You don't show the problematic code, but at a guess you might be doing something like this:
parfor idx = ...
doStuff(ASI.something, ...);
end
If that is the problem, then the fix is straightforward - extract the fields you need from ASI ahead of the parfor loop.
thing = ASI.something;
parfor idx = ...
doStuff(thing, ...);
end
  댓글 수: 3
Edric Ellis
Edric Ellis 2020년 11월 30일
I must confess to being an absolute beginner with App Designer. Here's what I came up with:
By making func be Static, you don't need to pass in the "app" instance. Does that help?
Nick Bennett
Nick Bennett 2020년 11월 30일
Yes, this is most helpful and has helped resolve this issue. Thank you. I was not aware of using static methods in appdesigner.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by