并行计算的问题---Failed to open matlabpool

一:问题


在查看一篇论文公布的Matlab源代码时,有这么一行代码:


matlabpool('open',8);


代码运行到此时,会出现错误:


Failed to open matlabpool. (For information in addition to the causing error, validate the configuration 'local' in the Configurations Manager.)


此错误提示并不太明晰,但是matlab命令行窗口又会提示:


Caused by:
    Error using distcomp.interactiveclient/start (line 88)
    Failed to start matlabpool.
    This is caused by:
    You requested a minimum of 8 workers, but the scheduler's ClusterSize property is currently set to allow


a maximum of 6 workers.  To run a parallel job on more workers than this,increase the ClusterSize property setting in the 'local' configuration using the Configurations Manager. The default value for ClusterSize with a local scheduler is the number of cores on the local machine.


至此,问题已经很清楚,默认最大只有6个worker(不知道准确的翻译应该是什么),而此时需要8个worker.


二:解决方法


打开菜单Parallel--->Manage Configurations,选中local,右键选择Properties,会出现如下窗口:



图中红色圈出的就是我们需要更改的地方,此处我们填上8,之后一切正常。
三:题外话
如何直观的看出并行,我做了一个测试:

在未开启matlabpool时,查看进程管理,只有一个MATLAB.exe,但是在开启matlabpool后,有9个MATLAB.exe.!!!如下图所示:




 每个都是将近100多M,看样子,落后的机器真是跑不起来了啊。

而且在主窗口的右下角还有一个图标,如下图所示:


并行计算的问题---Failed to open matlabpool - Free thought - Free Thought
 鼠标放上去之后会提示:MATLAB pool open with 8 labs.
 
注:matlab环境:Win 7 64 bit + Matlab R2011b.
 
 四:关于matlabpool
查看matlab的帮助,有如下一段:
Open or close a pool of MATLAB sessions for parallel computation matlabpool enables the parallel language features within the MATLAB language (e.g., parfor) by starting a parallel job that connects this MATLAB client session with a number of labs.
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值