function check_parfor()
    % check_parfor()
    %
    % This checks for the following bug in Matlab
    %
    % http://www.mathworks.com/matlabcentral/answers/62496  
    %
    % Fix is available at
    %
    % http://www.mathworks.com/support/bugreports/919688
    try
        % run dummy parfor loop (this should trigger error)
        parfor x = 1:3
            x;
        end    
    catch
        warning('ebFRET:MatlabParforFail', ...
                ebfret.join(char(10), ...
                             {'This installation appears to suffer from a bug in Matlab,', ...
                              'as a result of which execution using multiple CPUs may fail.', ...
                              '', ...
                              '    http://www.mathworks.com/matlabcentral/answers/62496', ...
                              '', ...
                              'To install a patch that fixes this bug, follow instructions at', ...
                              '', ...
                              '    http://www.mathworks.com/support/bugreports/919688', ...
                              '', ...
                              'Alternatively, you may work around this issue by opening up the', ... 
                              'menu item "Parallel -> "Manage Cluster Profiles ...", immediately', ...
                              'after starting Matlab, and then closing it. This action should', ...
                              'suffice to allow execution as normal.', ...
                              '', ...
                              'Execution using a single CPU should run without problems.'}));
    end
end