Skip to content
Snippets Groups Projects
Commit ae5e9904 authored by Marco Ratto's avatar Marco Ratto
Browse files

Allow for exceptions in deleting new files created remotely

(cherry picked from commit 2133ae43)
parent 990f3c3b
Branches
Tags
1 merge request!3454.3: cherry-picked Parallel debug and several fixes of GSA toolbox
function dynareParallelDeleteNewFiles(PRCDir,Parallel,PRCDirSnapshot)
function dynareParallelDeleteNewFiles(PRCDir,Parallel,PRCDirSnapshot,varargin)
% PARALLEL CONTEXT
% In a parallel context, this is a specialized function able to ...
%
......@@ -55,11 +55,17 @@ for indPC=1:length(Parallel),
sT(1)='.';
SlashNumberAndPosition=findstr(sT,fS);
fileaddress={sT(1:SlashNumberAndPosition(end)),sT(SlashNumberAndPosition(end)+1:end)};
exception_flag=0;
for indexc=1:length(varargin)
exception_flag=exception_flag+(~isempty(strfind(fileaddress{2},varargin{indexc})));
end
if exception_flag==0,
dynareParallelDelete(fileaddress{2},[PRCDir,fS,fileaddress{1}],Parallel(indPC));
disp('New file deleted in remote -->');
disp(fileaddress{2});
disp('<--');
end
end
else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment