Commit afe966d0 authored by Marco Ratto's avatar Marco Ratto
Browse files

use Save_files to save different names under parallel execution

parent 59a1c1c8
......@@ -144,11 +144,11 @@ while i<n
end
% penalty=f0;
if Save_files
save('gstep.mat','x','h1','f0')
save(['gstep' int2str(Save_files) '.mat'],'x','h1','f0')
end
end
if Save_files
save('gstep.mat','x','h1','f0')
save(['gstep' int2str(Save_files) '.mat'],'x','h1','f0')
end
return
......
......@@ -294,7 +294,7 @@ if outer_product_gradient
end
hh1=hess_info.h1;
if Save_files
save('hess.mat','hessian_mat')
save(['hess' int2str(Save_files) '.mat'],'hessian_mat')
end
else
hessian_mat=[];
......
......@@ -134,7 +134,7 @@ if Verbose
end
end
if Save_files
save('m1.mat','x','hh','g','hhg','igg','fval0')
save(['m' int2str(Save_files) '.mat'],'x','hh','g','hhg','igg','fval0')
end
igrad=1;
......@@ -267,11 +267,11 @@ while norm(gg)>gtol && check==0 && jit<nit
if norm(x(:,icount)-xparam1)>1.e-12 && analytic_derivation==0
try
if Save_files
save('m1.mat','x','fval0','nig','-append')
save(['m' int2str(Save_files) '.mat'],'x','fval0','nig','-append')
end
catch
if Save_files
save('m1.mat','x','fval0','nig')
save(['m' int2str(Save_files) '.mat'],'x','fval0','nig')
end
end
[dum, gg, htol0, igg, hhg, h1, hess_info]=mr_hessian(xparam1,func0,penalty,flagit,htol,hess_info,bounds,prior_std,Save_files,varargin{:});
......@@ -316,12 +316,12 @@ while norm(gg)>gtol && check==0 && jit<nit
disp_verbose(['Elapsed time for iteration ',num2str(t),' s.'],Verbose)
g(:,icount+1)=gg;
if Save_files
save('m1.mat','x','hh','g','hhg','igg','fval0','nig','H')
save(['m' int2str(Save_files) '.mat'],'x','hh','g','hhg','igg','fval0','nig','H')
end
end
end
if Save_files
save('m1.mat','x','hh','g','hhg','igg','fval0','nig')
save(['m' int2str(Save_files) '.mat'],'x','hh','g','hhg','igg','fval0','nig')
end
if ftol>ftol0
skipline()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment