Skip to content

Commit

Permalink
Compiled parallel batch bug - disabled
Browse files Browse the repository at this point in the history
Discovered that parallel batch processing in the GUI or command line executables was throwing errors.  While working on the fix parallel batch processing has been disabled when using a compiled executable version of BRAVEHEART.  Serial processing works without errors.
  • Loading branch information
BIVectors committed Sep 29, 2023
1 parent caaf009 commit b5e0d3f
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions braveheart_batch.m
Original file line number Diff line number Diff line change
Expand Up @@ -134,18 +134,6 @@ function braveheart_batch(varargin)
return;
end

% To deal with progress bar issues with parallel computing will set the
% parallel computing flag 'parallel_proc' = 0 if the user does not have the
% parallel computing toolbox. This isn't technically necessary for calculations
% due to the fact that parfor will run as a regular for loop if the toolbox is
% not installed, but disabling the flag makes dealing with the progress bars
% sigificantly easier as its require calling commands that do not exist
% without the toolbox. This really is the only way to allow both parallel
% and serial waitbars to work

if isempty( ver('parallel'))
parallel_proc = 0;
end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% EDIT BELOW HERE AT YOUR OWN RISK!!! %
Expand All @@ -165,6 +153,19 @@ function braveheart_batch(varargin)
vcg_calc_flag, lead_morph_flag, vcg_morph_flag] = read_batch_settings(fullfile(getcurrentdir(),'batch_settings.csv'));
end

% To deal with progress bar issues with parallel computing will set the
% parallel computing flag 'parallel_proc' = 0 if the user does not have the
% parallel computing toolbox. This isn't technically necessary for calculations
% due to the fact that parfor will run as a regular for loop if the toolbox is
% not installed, but disabling the flag makes dealing with the progress bars
% sigificantly easier as its require calling commands that do not exist
% without the toolbox. This really is the only way to allow both parallel
% and serial waitbars to work

if isempty( ver('parallel')) || isdeployed % Disable bug with parallel if deployed - on list to fix!
parallel_proc = 0;
end

tic % Start timer

% Extension of annotation files
Expand Down

0 comments on commit b5e0d3f

Please sign in to comment.