warning messages when using parfor in appdesigner app

28 visualizaciones (últimos 30 días)
Nick Bennett
Nick Bennett el 24 de Nov. de 2020
Comentada: Nick Bennett el 30 de Nov. de 2020
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)

Respuesta aceptada

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

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Develop Apps Using App Designer en Help Center y File Exchange.

Productos


Versión

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by