fmincon parallel pool goes idle after first iteration
9 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentario
Raimundas Steponavicius
el 11 de Feb. de 2021
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.
Respuestas (1)
Siyuan Dong
el 20 de Nov. de 2019
I have exactly the same problem. Have you figured it out? Thanks!
0 comentarios
Ver también
Categorías
Más información sobre Solver Outputs and Iterative Display en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!