warning messages when using parfor in appdesigner app

33 visualizzazioni (ultimi 30 giorni)
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)

Risposta accettata

Edric Ellis
Edric Ellis il 25 Nov 2020
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 Commenti
Edric Ellis
Edric Ellis il 30 Nov 2020
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 il 30 Nov 2020
Yes, this is most helpful and has helped resolve this issue. Thank you. I was not aware of using static methods in appdesigner.

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Develop Apps Using App Designer in Help Center e File Exchange

Prodotti


Release

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by