clear
global Kop
n1=5;
tn1=n1*(n1+1)/2;
m=2*n1^2;n=2*tn1;
%rhs=randn(m,1)+.01*ones(m,1);
rhs=sprandn(m,1,.3);
Kop=sprandn(m,n,.3);
rhs=full(rhs);
tt=clock;
test=Kop'*sparse(rhs);
multtime=etime(clock,tt);
damp=0.;    % for +damp*norm(x)^2 in lss
atol=1000*eps;
btol=1000*eps;
conlim=1/atol;
itnlim=4*tn1;
msglvl=0;
aprod='my_aprod';
save results45
tt=clock
[Kop,rhs,svdlss,sigmalss,iranklss,worklss,ifail]=f04jgf(Kop,rhs);
dir=dir-ones(n,1);
ett=etime(clock,tt);
enorm=normest((Kop'*Kop*dir-Kop'*rhs));
%svdKop=svd(Kop);
disp(['error and elapsed time is: ',num2str(enorm),'  ',num2str(ett)]);
save results45
