TimeLimit option in Patternsearch being ignored?
Show older comments
Hi everyone,
I have a problem which I am solving via the patternsearch function. Essentially, I have an objective function (func) which includes a parfor loop, using the parallel computation toolbox and a (large) parpool (several hundred cores). I have an issue in that I need to ensure that this runs within a certain time frame, which is proving difficult and I'm not sure why.
When I set the time-limit parameter in the options, patternsearch does not adhere to it. It will eventually time out, but the period is approx 2-4 times longer than the option set. The same set up in a different solver (ga) adheres exactly, without an issue.
Does anyone know how or why this is occurring? Any suggestions?
My intuition is that it has to do with the communication between the parpool agents, similar to a documented issue with ga when used in parallel, but since this is not a parallel computation I don't think this can be the same issue.
For example, here are the same problem being run with the same time-limit in patternsearch and ga:
PS:
Time limit reached: increase options.TimeLimit.
Elapsed time is 84952.876117 seconds.
GA:
Optimization terminated: time limit exceeded.
Elapsed time is 36458.878759 seconds.
Accepted Answer
More Answers (0)
Categories
Find more on Parallel Computing Fundamentals in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!