2

The script is as follows:

    Lambdass = [0.0001, 0.001, 0.01, 0.1, 1, 10, 100, 1000];
    numcores = feature('numcores'); % get the number of cpu cores
    num_slices = floor(length(Lambdass)/numcores); % get the number of slices for parallel computing
    if mod(length(Lambdass), numcores)~=0
        num_slices = num_slices + 1;
    end
    for slice_i=1:num_slices
        if slice_i~=num_slices
            Lambdas = Lambdass(((slice_i-1)*numcores+1):((slice_i)*numcores));
        else
            Lambdas = Lambdass(((slice_i-1)*numcores+1):end);
        end

        % start the parallel processing
        myparpool = parpool(length(Lambdas))
        parfor li = 1:length(Lambdas)
        % spmd
            lambda = Lambdas(li);
            save_path1 = sprintf('results/lambda_%f/', lambda);
            if ~exist([save_path1, '/fs_results.mat'], 'file') 
                do_something_and_save_results(lambda, save_path1);
            end
        end
        delete(myparpool)
    end

This script could be run correctly in one computer, but in another computer, the parfor seems to not work correctly and there are some warning information as follows, and the parfor finally runs without parallel mode, just seems the for in sequential. Could anyone help give some advice, please?

    Starting parallel pool (parpool) using the 'local' profile ... Warning: Could not launch SMPD process manager. Using fallback parallel mechanism.
    > In SmpdGateway>SmpdGateway.canUseSmpd at 81
    In Local.hSubmitCommunicatingJob at 15
    In CJSCommunicatingJob>CJSCommunicatingJob.submitOneJob at 81
    In Job.Job>Job.submit at 302
    In InteractiveClient>InteractiveClient.start at 327
    In Pool.Pool>iStartClient at 537
    In Pool.Pool>Pool.hBuildPool at 434
    In parpool at 104
mining
  • 3,557
  • 5
  • 39
  • 66
  • Well, what is the difference between the computers? (hardware, OS, version of MATLAB). The reason presumably lies somewhere in there, rather that in the specifics of your code. – nkjt Jan 23 '15 at 11:01
  • I'm voting to close this question as off-topic because this is a software installation problem or system configuration problem, not a programming problem. – Edric Jan 23 '15 at 15:48
  • @Edric, and therefore should be on superuser? – A. Donda Jan 23 '15 at 16:10
  • @hubber winston: Try to reinstall the Parallel Computing Toolbox. – A. Donda Jan 23 '15 at 16:11
  • Or try MathWorks' forums: [Matlab Central](http://www.mathworks.com/matlabcentral/answers/). – horchler Jan 23 '15 at 22:51
  • @nkjt, thank you! I've made a post in https://cn.mathworks.com/matlabcentral/answers/171265-warning-could-not-launch-smpd-process-manager-using-fallback-parallel-mechanism. If convenient, could you help visit it? – mining Jan 24 '15 at 04:16
  • @horchler, thank you! I've made a post in https://cn.mathworks.com/matlabcentral/answers/171265-warning-could-not-launch-smpd-process-manager-using-fallback-parallel-mechanism. – mining Jan 24 '15 at 04:17
  • @A.Donda, thank you! I'll try it! and I've made a post in https://cn.mathworks.com/matlabcentral/answers/171265-warning-could-not-launch-smpd-process-manager-using-fallback-parallel-mechanism. If convenient, please check it. – mining Jan 24 '15 at 04:17
  • @Edric, thank you! I'll close this question when nkjt and A.Donda checked my responses. – mining Jan 24 '15 at 04:18

0 Answers0