diff --git a/matlab/parallel/closeSlave.m b/matlab/parallel/closeSlave.m index 5d3f443fd..4b1c4fadf 100644 --- a/matlab/parallel/closeSlave.m +++ b/matlab/parallel/closeSlave.m @@ -61,7 +61,7 @@ for indPC=1:length(Parallel) end while(1) - if isempty(dynareParallelDir(['P_slave_',int2str(j),'End.txt'],TmpFolder,Parallel)) + if isempty(dynareParallelDir(['P_slave_*End.txt'],TmpFolder,Parallel)) for indPC=1:length(Parallel) if (Parallel(indPC).Local==0) dynareParallelRmDir(TmpFolder,Parallel(indPC))