最佳答案
回答者:网友
在较旧版本的MATLAB上使用这个命令:
matlabpool local 4
"4"指你的cpu核心数,而不是线程数。现在的cpu一般是n核心,2n线程(n=2、4、6、8……等偶数)。
在新版本的MATLAB上会遇到如下警告:
警告: matlabpool will be removed in a future release.
Use parpool instead.
命令执行成功后提示:
Starting matlabpool using the 'local' profile ... connected to 4 workers.
看看任务管理器:
如果你在local后面使用的数字超过了你的cpu核心数,就会失败:
错误使用 matlabpool (line 148)
Failed
to start a parallel pool. (For information in addition to the causing
error, validate the profile 'local' in the Cluster Profile Manager.)
原因:
错误使用 parallel.internal.pool.InteractiveClient/start (line