fmincon parallel pool goes idle after first iteration

9 次查看(过去 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.
  1 个评论
Raimundas Steponavicius
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
Siyuan Dong 2019-11-20
I have exactly the same problem. Have you figured it out? Thanks!

类别

Help CenterFile Exchange 中查找有关 Solver Outputs and Iterative Display 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by