Matlab workers in Parloop are not using the path order
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Leandro
am 25 Jan. 2017
Kommentiert: Adam
am 2 Feb. 2018
Hello, I'm using this code
parfor k=1:10
[..]=pca(..)
end
I have 2 definitions of pca (the matlab package and another package). I've set the search path to use the matlab package by default, but inside the parloop the other function is used instead. I didn't found a way to arrange this without removing the other package. Thanks
3 Kommentare
Adam
am 2 Feb. 2018
I would have thought if one of them was in a package that you would have to specify it with the package name prepended, which would remove the ambiguity anyway.
Akzeptierte Antwort
Edric Ellis
am 26 Jan. 2017
This appears to be a problem with the automatic path mirroring that is used when setting up a parallel pool. Things work correctly if you modify the client MATLAB path only after creating the parallel pool.
2 Kommentare
Thomas Pfau
am 2 Feb. 2018
But which path is matlab using then? I have a very similar situation:
2 Toolboxes, both have the same function name. In our code we dynamically change the path depending on which of the toolboxes is required. However, as soon as there is a parfor loop, we are in trouble, as the path seems to be ignoring anything we do before.
- Changing the path before the pool is created -> No Effect
- Changing the path after the pool is created -> No Effect.
The only thing I see is to change the path in the parfor loop, but this (at least in our case) would create an overhead that would make parfor pointless.
I'm really wondering, whether there is any way to manipulate the path of a cluster or how the cluster determines its path.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Parallel for-Loops (parfor) finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!