fmincon parallel pool goes idle after first iteration
3 ビュー (過去 30 日間)
古いコメントを表示
I'm using fmincon to minimize the weight of an aircraft wing. My code feeds input files to a finite element solver, runs the solver and reads its output files. To ensure the parallel workers are not trying to read/write the same files simultaneously, I'm giving each input/output file a unique name using tempname. I'm running on a quad-core laptop.
My problem is: on the first iteration (14 function calls for 13 variables) the parallel pool is active and works fine in the gradient search. However, once the initial iteration ends and the first line is printed in the command line, the parallel pool goes idle. For the remainder of the optimization, parallel pool does no work and all gradient searches are done serially, taking much more time.
My problem is similar to Mike's (he's not using fmincon though): https://au.mathworks.com/matlabcentral/answers/179509-parallel-programming-toolbox-shutting-down, however my initial iteration only takes about 1 min, and IdleTimeout has been disabled, so it doesn't seem to be due to IdleTimeout.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/193276/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/193277/image.png)
1 件のコメント
Raimundas Steponavicius
2021 年 2 月 11 日
I have a similar problem too. I use fmincon for a large problem (nearly half a million variables), with the following options/settings:
options=optimoptions('fmincon','Algorithm','interior-point','Hessian','lbfgs','SubproblemAlgorithm','cg','InitBarrierParam',1,'InitTrustRegionRadius',sqrt(length(x0))*1e-3,...);
After every iteration the parallel pool goes idle for some time, and this idling time between the iterations is gradually increasing with iterations. I do not know why and how to deal with this.
回答 (1 件)
Siyuan Dong
2019 年 11 月 20 日
I have exactly the same problem. Have you figured it out? Thanks!
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!