How to set the max number of workers in parpool/matlabpool from console?

末鹿安然 提交于 2019-12-04 01:58:14

You want the parpool function. With no arguments it creates a default number of workers, with an integer argument it creates that many workers. If you just use a parfor loop without calling it, you get the default number for your profile, but I'm not sure where that is set. There's more documentation on the mathworks website: http://www.mathworks.com/help/distcomp/parpool.html

The maximum number of workers should be effectively as large as you want, but you will stop gaining any efficiency if you create more workers than you have processors. Let me know if you need any advice on picking a good number of workers.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!