clear load Results2 whos % fix RpcgN nmat = length (MatrixList) ; k = length (RpcgN) ; RpcgN = [(RpcgN (1:k))' ; -ones(nmat-k,1)] ; whos k = max (find (Tpcg > 0)) Rbackslash = Rbackslash (1:k) ; Rcholmod = Rcholmod (1:k) ; Rpcg = Rpcg (1:k) ; % pcg with 20 itmax RpcgN = RpcgN (1:k) ; % pcg with 200 itmax Tbackslash = Tbackslash (1:k) ; Tcholmod = Tcholmod (1:k) ; Tpcg = Tpcg (1:k) ; % pcg with 20 itmax TpcgN = TpcgN (1:k) ; % pcg with 200 itmax MatrixList = MatrixList (1:k)' ; figure (1) clf t1 = log10 (Tpcg ./ Tbackslash) ; r1 = log10 (Rpcg ./ Rbackslash) ; tn = log10 (TpcgN ./ Tbackslash) ; rn = log10 (RpcgN ./ Rbackslash) ; plot ( ... [-2.5 2.5], [0 0], 'k-', [0 0], [-3 14], 'k-', ... [t1 tn nan*ones(k,1)]', [r1 rn nan*ones(k,1)]', 'c-', ... t1, r1 , 'o', ... tn, rn, 'ro') ; axis ([-2.5 2.5 -3 14]) title ('pcg vs backslash') ; xlabel('log10 (PCG time / backslash time)') ; ylabel('log10 (PCG resid / backslash resid)') ; t1 = log10 (Tpcg ./ Tcholmod) ; r1 = log10 (Rpcg ./ Rcholmod) ; tn = log10 (TpcgN ./ Tcholmod) ; rn = log10 (RpcgN ./ Rcholmod) ; figure (2) clf plot ( ... [-2.5 2.5], [0 0], 'k-', [0 0], [-3 14], 'k-', ... [t1 tn nan*ones(k,1)]', [r1 rn nan*ones(k,1)]', 'c-', ... t1, r1 , 'o', ... tn, rn, 'ro') ; axis ([-2.5 2.5 -3 14]) title ('pcg vs cholmod+metis') ; xlabel('log10 (PCG time / cholmod+metis time)') ; ylabel('log10 (PCG resid / cholmod+metis resid)') ; figure (3) clf index = UFget ; plot ([1 12], [0 0], 'k-', ... log10 (index.amd_flops (MatrixList)), log10 (Tbackslash ./ Tcholmod), 'o') ; axis ([1 12 -1.5 1]) ; title ('backslash vs cholmod+metis') ; xlabel('log10 (flop count with AMD)') ; ylabel('log10 (backslash time / cholmod+metis time') ;