Controlling new parallel feature "Automatically create a parallel pool when parallel keywords are executed"
显示 更早的评论
Hi all,
is there a possibility to control this feature (e.g. temporarily deactivate or read the settings value) from within a script?
Background is that I have a script that contains a parfor loop. For this parfor loop to work on workers there needs to be done some initializing though before entering the loop. This initialization is omitted when the matlabpool is automatically created when reaching the parfor loop.
This means I either need to start the matlabpool before reaching the loop so I can do the initialization (which I don't want to do by default) or (as an ugly workaround) I could add a dummy parfor loop to trigger the automatic startup of the matlabpool due to the new setting early.
Is there a proper way to control the preference (without user interaction)?
Regards Eduard
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Parallel for-Loops (parfor) 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!