Skip to content

Commit

Permalink
Merge pull request RobotLocomotion#1080 from RussTedrake/distcomp_ver…
Browse files Browse the repository at this point in the history
…sions

resolves RobotLocomotion#1064
  • Loading branch information
RussTedrake committed May 4, 2015
2 parents 665ef45 + 6e915e0 commit 6d720ff
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 13 deletions.
3 changes: 1 addition & 2 deletions examples/LinearGaussianExample.m
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@
function prob=monteCarlo(obj,S,tspan,x0)
N=200;

% for old versions of parallel computing toolbox, startup a matlabpool if necessary:
if (exist('matlabpool','file') && matlabpool('size')==0) matlabpool; end
ok=checkDependency('distcomp'); % initialize toolbox if it exists

parfor i=1:N
xtraj = simulate(obj,tspan,x0);
Expand Down
2 changes: 1 addition & 1 deletion systems/@DynamicalSystem/simulate.m
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
pstruct.LimitDataPoints = 'on';
pstruct.MaxDataPoints = num2str(options.MaxDataPoints);
else
pstruct.LimitDataPoints = 'off'
pstruct.LimitDataPoints = 'off';
end

%pstruct.SaveOnModelUpdate = 'false';
Expand Down
4 changes: 1 addition & 3 deletions systems/@PolynomialSystem/sampledFiniteTimeVerification.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@
% Implements the algorithm described in http://arxiv.org/pdf/1010.3013v1

checkDependency('sedumi');

% for old versions of parallel computing toolbox, startup a matlabpool if necessary:
if (exist('matlabpool','file') && matlabpool('size')==0) matlabpool; end
ok=checkDependency('distcomp'); % initialize toolbox if it exists

t=msspoly('t',1);
ts=ts(:);
Expand Down
3 changes: 1 addition & 2 deletions systems/@PolynomialSystem/sampledTransverseVerification.m
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@
if (~isCT(sys)) error('not implemented yet'); end

checkDependency('sedumi');
% for old versions of parallel computing toolbox, startup a matlabpool if necessary:
if (exist('matlabpool','file') && matlabpool('size')==0) matlabpool; end
ok=checkDependency('distcomp'); % initialize toolbox if it exists

num_x = sys.getNumStates();
num_xd = sys.getNumDiscStates();
Expand Down
9 changes: 4 additions & 5 deletions util/checkDependency.m
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,10 @@
conf.distcomp_enabled = ~isempty(v);
if ~conf.distcomp_enabled
disp(' MATLAB Parallel Computing Toolbox was not found');
else
% go ahead and start up a pool if necessary
if (exist('matlabpool','file') && matlabpool('size')==0)
matlabpool;
end
elseif verLessThan('distcomp','6.3') && matlabpool('size')==0
% start a matlab pool (if none exists). this approximates the
% now default behavior in newer versions of distcomp.
matlabpool;
end

case 'spotless'
Expand Down

0 comments on commit 6d720ff

Please sign in to comment.