Filter löschen
Filter löschen

fmincon parallel pool goes idle after first iteration

4 Ansichten (letzte 30 Tage)
Dio
Dio am 6 Aug. 2018
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 Kommentar
Raimundas Steponavicius
Raimundas Steponavicius am 11 Feb. 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.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Siyuan Dong
Siyuan Dong am 20 Nov. 2019
I have exactly the same problem. Have you figured it out? Thanks!

Community Treasure Hunt

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

Start Hunting!

Translated by