Filter löschen
Filter löschen

Matlab parfor transparency violation error.

4 Ansichten (letzte 30 Tage)
Leon
Leon am 24 Jul. 2021
Kommentiert: Edric Ellis am 26 Jul. 2021
It is my first time to use Matlab parfor, and I'm getting the transparency violation error as below:
Error using A02_use (line 25)
Transparency violation error.
See Workspace Transparency in MATLAB Statements.
Here is what my line 25 look like:
parfor i = 1:400
I have a super long matrix and I'm trying to divide them into 400 sections and do the calcualtions separately.
Many thanks.
  1 Kommentar
Edric Ellis
Edric Ellis am 26 Jul. 2021
We need to see the rest of the parfor loop - unfortunately, errors from parfor are reported as occurring on the first line of the loop, even if that isn't where the error is really coming from. It would help if you could try to narrow down your problem to a minimal reproduction that demonstrates the problem.
Transparency violation errors occur when you do things that try to access the workspace of the body of the parfor loop in ways that the parfor code analyser cannot understand. This includes: eval, assignin, load, save, running scripts etc.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Parallel for-Loops (parfor) finden Sie in Help Center und File Exchange

Produkte


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by