警告:在kmeans matlab中使用没有matlabpool的parfor

时间:2014-10-21 15:38:32

标签: matlab parallel-processing cluster-analysis matlabpool

我想使用4实验室运行matlab kmeans

我打开matlabpool

if ~matlabpool('size')
    matlabpool open 4; % Invokes workers
end

我为kmeans设置选项

stream = RandStream('mlfg6331_64');  % Random number stream
options = statset('UseParallel','always','UseSubstreams','always',...
    'Streams',stream);

然后我运行kmeans

            [clustersFirstHalf,fCentr] = kmeans(first_partition,cIdx,'Options',options,...
                'distance','sqEuclidean',...
                'emptyaction','singleton',...
                'replicates',37,...
                'start','cluster');

我收到此警告信息......

Warning: Using parfor without matlabpool. 
> In processParallelAndStreamOptions>parforValidateStreamOptions at 173
  In processParallelAndStreamOptions at 78
  In kmeans at 254
  In kmeans>loopBody at 360
  In smartForReduce>(parfor body) at 111
  In parallel_function>make_general_channel/channel_general at 879
  In remoteParallelFunction at 30 

matlabpool是开放的...所以这很奇怪......

我在Linux上使用MATLAB R2012b .... 你们有人可以帮助我吗?

0 个答案:

没有答案