ojwoodford / batch_job

Parallelize MATLAB for loops across workers, without the Parallel Computing Toolbox
MIT License
18 stars 6 forks source link

weired running condition in quiet_delete #12

Open spotlightgit opened 4 years ago

spotlightgit commented 4 years ago

Sometimes I get this command line output in MATLAB:

Warning: File 'I:\...\Test\parallel\tpfdf378df_8cd6_4c9f_9c19_62abac37695c.mat' not found. 
> In quiet_delete (line 4)
  In batch_job_collect (line 94)
  In batch_job_distrib (line 201)
  ...
  In start (line 12) 

Maybe it's helpful to add a try catch block around the delete command in quiet_delete.m

if exist(fname{1}, 'file')
   try
      delete(fname{1});
   catch
   end
end
ojwoodford commented 4 years ago

try catch will not hide the warning, as it is not an error. I could turn off the warning.