Does parfor inside lsqnonlin with UseParallel=True work properly?
Ältere Kommentare anzeigen
Hello,
I'm solving a system of 150 nonlinear equations using lsqnonlin. The system is an outcome of a bulky (parallelized) optimization, which involves large vectors. (Large = 1 mil. elements) I'm wondering if my parfor loops in the optimization work properly with -UseParallel- enabled lsqnonlin.
I know parfor cannot be nested in another parallel structure. According to the lsqnonlin documentation, -UseParallel- governs the gradient calculation, and turning it on does not mean the solver plays with multiple guesses simultaneously, as multistart does. I guess then my parfor should work well, but not sure. I can play with a toy code of course, but I want to get a clear-cut answer.
Thanks!
Akzeptierte Antwort
Weitere Antworten (1)
Bruno Luong
am 3 Okt. 2023
0 Stimmen
If your function use parfor internally then you should NOT set UseParallel to true.
1 Kommentar
Sunham Kim
am 3 Okt. 2023
Kategorien
Mehr zu Surrogate Optimization finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!