optimplot optimization monitoring if the optimfunction has a parfor loop inside doesn't redraw the figure.
1 次查看(过去 30 天)
显示 更早的评论
Hello, everyone.
I have a very heavy optimization process, with each step requiring several hours of running.
To increase the speed at least a little bit, I use the follwoing:
- I set 'Use Parallel' 'always' as an optimoption to compute gradients in parallel.
- I use a parfor over a dataset inside every objective function computation.
My dataset is typically about 20 points, and the amount of variables is 10. In total, my cluster has 36 cores ( 18 dual-core Celeron machines).
I ask Matlab to plot the objective function value, as well as the variables themselves.
The problem is, however, that the main monitoring figure is only redrawn when the control returns to the main Matlab instance, which only happens between the optimization steps, and not for a long time. Moreover, if I move the monitoring figure, or resize it, the plots disappear, and ever the menubar takes a few minutes to ger drawn. The figure menu is also completely unresponsive.
I would like to use drawnow or snapnow, but I don't know where to plug them is, since the objective function's 'drawnow' is executed at the nodes, not the main machine.
I use Matlab Distributed Computing Toolbox and Matlab Parallel Computing Toolbox 2013a.
2 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Parallel Computing Fundamentals 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!