1function test71_plot (T, Nedges, Nnodes, LLnz, LLmem, LLflops, Ntri, f) 2%TEST71_PLOT plot the results from test71 3 4% SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. 5% SPDX-License-Identifier: Apache-2.0 6 7if (nargin == 0) 8 if (ismac || ispc) 9 load test71_results 10 else 11 load test71_results_big 12 end 13end 14 15% k = max (find (~isnan (Nnodes))) ; 16k = max (find (any (~isnan (T), 2))) ; 17 18subplot (2,4,1) 19loglog ( ... 20 Nedges (1:k), T (1:k,1), 'ro', ... 21 Nedges (1:k), T (1:k,2), 'g+', ... 22 Nedges (1:k), T (1:k,3), 'bs') ; 23legend ('GB:Sandia', 'GB:Sandia2', 'MATLAB:Sandia', 'Location', 'NorthWest') 24xlabel ('# of edges') ; 25ylabel ('run time') ; 26 27e = max (Nedges (1:k), [], 1, 'omitnan') ; 28e = 10^ceil (log10 (e)) ; 29l = max (LLnz (1:k), [], 1, 'omitnan') ; 30l = 10^ceil (log10 (l)) ; 31mx = max (Ntri (1:k), Nedges (1:k)) ; 32x = max (mx, [], 1, 'omitnan') ; 33x = 10^ceil (log10 (x)) ; 34 35subplot (2,4,2) 36loglog (Nedges (1:k), Nedges (1:k)./ T (1:k,1) , 'ro') ; 37axis([1 e 1e4 1e9]) ; 38legend ('GB:Sandia', 'Location', 'NorthWest') 39xlabel ('# of edges') ; 40ylabel ('rate (#edges/time)') ; 41 42subplot (2,4,3) 43loglog (Nedges (1:k), Nedges (1:k)./ T (1:k,2) , 'g+') ; 44axis([1 e 1e4 1e9]) ; 45legend ('GB:Sandia2', 'Location', 'NorthWest') 46xlabel ('# of edges') ; 47ylabel ('rate (#edges/time)') ; 48 49subplot (2,4,4) 50loglog (Nedges (1:k), Nedges (1:k)./ T (1:k,3) , 'bs') ; 51axis([1 e 1e4 1e9]) ; 52legend ('MATLAB:Sandia', 'Location', 'NorthWest') 53xlabel ('# of edges') ; 54ylabel ('rate (#edges/time)') ; 55 56 57subplot (2,4,5) 58loglog (Nedges (1:k), T (1:k,3) ./ T (1:k,1), 'ko', [1 e], [1 1], 'k-') ; 59xlabel ('# of edges') ; 60ylabel ('MATLAB:Sandia time / GB:Sandia time') ; 61 62subplot (2,4,6) 63loglog (Nedges (1:k), T (1:k,2) ./ T (1:k,1), 'ko', [1 e], [1 1], 'k-') ; 64xlabel ('# of edges') ; 65ylabel ('GB:Sandia2 time / GB:Sandia time') ; 66 67subplot (2,4,7) 68loglog (LLnz (1:k), T (1:k,2) ./ T (1:k,1), 'ko', [1 l], [1 1], 'k-') ; 69xlabel ('nnz(L*L)') ; 70ylabel ('GB:Sandia2 time / GB:Sandia time') ; 71 72r = l/e ; 73subplot (2,4,8) 74loglog (LLnz (1:k) ./ Nedges(1:k), ... 75 T (1:k,2) ./ T (1:k,1), 'ko', [1 r], [1 1], 'k-') ; 76xlabel ('nnz(L*L)/nnz(L)') ; 77ylabel ('GB:Sandia2 time / GB:Sandia time') ; 78 79drawnow 80 81