Transparency violation error for cvx

2 visualizaciones (últimos 30 días)
Waqar Ahmed
Waqar Ahmed el 6 de Oct. de 2021
Respondida: Raymond Norris el 6 de Oct. de 2021
I am having cvx inside the parfor loop and I am getting error below
Error using cvx_begin (line 41)
Transparency violation error.
See Workspace Transparency in MATLAB Statements.
My question is it is possible to use cvx code using parfor loop. if yes how can I avoid transparency error.

Respuestas (1)

Raymond Norris
Raymond Norris el 6 de Oct. de 2021
It doesn't appear so. cvx_begin is calling assignin on line 41. This would be akin to calling
local = parcluster('local');
pool = local.parpool(1);
parfor idx = 1:1
assignin('caller','A',rand)
end
It's a transparency violation to try to have a worker assign back to the caller a variable (A in this case).

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by