


PARALLEL CONTEXT In a parallel context, this is a specialized function able to ... INPUTS o PRCDir [] ... o Parallel [] ... o PRCDirSnapshot [] ... OUTPUTS o PRCDirSnapshot [] ... Copyright (C) 2009-2011 Dynare Team This file is part of Dynare. Dynare is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Dynare is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dynare. If not, see <http://www.gnu.org/licenses/>.


0001 function dynareParallelDeleteNewFiles(PRCDir,Parallel,PRCDirSnapshot) 0002 % PARALLEL CONTEXT 0003 % In a parallel context, this is a specialized function able to ... 0004 % 0005 % 0006 % INPUTS 0007 % 0008 % o PRCDir [] ... 0009 % o Parallel [] ... 0010 % o PRCDirSnapshot [] ... 0011 % 0012 % 0013 % OUTPUTS 0014 % o PRCDirSnapshot [] ... 0015 % 0016 % 0017 % 0018 % Copyright (C) 2009-2011 Dynare Team 0019 % 0020 % This file is part of Dynare. 0021 % 0022 % Dynare is free software: you can redistribute it and/or modify 0023 % it under the terms of the GNU General Public License as published by 0024 % the Free Software Foundation, either version 3 of the License, or 0025 % (at your option) any later version. 0026 % 0027 % Dynare is distributed in the hope that it will be useful, 0028 % but WITHOUT ANY WARRANTY; without even the implied warranty of 0029 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0030 % GNU General Public License for more details. 0031 % 0032 % You should have received a copy of the GNU General Public License 0033 % along with Dynare. If not, see <http://www.gnu.org/licenses/>. 0034 0035 NewFilesFromSlaves={}; 0036 0037 % try 0038 for indPC=1:length(Parallel), 0039 0040 if Parallel(indPC).Local==0; 0041 [NewFilesFromSlaves, PRCDirSnapshot{indPC}]=dynareParallelFindNewFiles(PRCDirSnapshot{indPC},Parallel(indPC), PRCDir); 0042 if ~ispc || strcmpi('unix',Parallel(indPC).OperatingSystem), 0043 fS='/'; 0044 else 0045 fS='\'; 0046 end 0047 0048 if ~isempty(NewFilesFromSlaves) 0049 0050 for i=1:length(NewFilesFromSlaves) 0051 SlashNumberAndPosition=[]; 0052 PRCDirPosition=findstr(NewFilesFromSlaves{i}, ([PRCDir])); 0053 sT=NewFilesFromSlaves{i}; 0054 sT(1:(PRCDirPosition+length([PRCDir]))-2)=[]; 0055 sT(1)='.'; 0056 SlashNumberAndPosition=findstr(sT,fS); 0057 fileaddress={sT(1:SlashNumberAndPosition(end)),sT(SlashNumberAndPosition(end)+1:end)}; 0058 dynareParallelDelete(fileaddress{2},[PRCDir,fS,fileaddress{1}],Parallel(indPC)); 0059 0060 disp('New file deleted in remote -->'); 0061 disp(fileaddress{2}); 0062 disp('<--'); 0063 0064 end 0065 else 0066 continue 0067 end 0068 0069 0070 end 0071 end 0072 0073 0074