Skip to content

Commit

Permalink
Add SC23 paper artifact description directory
Browse files Browse the repository at this point in the history
  • Loading branch information
huanghua1994 committed Apr 7, 2023
1 parent 1984566 commit 36c09ae
Show file tree
Hide file tree
Showing 11 changed files with 523 additions and 0 deletions.
30 changes: 30 additions & 0 deletions SC23_AD/figures/plot_all_scaling.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
% n = 256
n_node = [8, 18, 32, 50, 72, 98, 128];

%%
amazon_crp = [ 3.64, 2.18, 1.62, 1.10, 0.98, 1.00, 1.02];
amazon_comb_1da = [ , 11.00, 10.74, 9.07, 7.23, 3.80, 3.06];
amazon_comb_2da = [25.41, 15.34, 10.19, 10.48, 6.59, 5.55, 5.39];
amazon_comb_2dc = [13.50, 8.13, 4.46, 3.91, 3.30, 2.60, 2.35];
plot_scaling(n_node, amazon_comb_2dc, amazon_crp, 'Amazon');

%%
orkut_crp = [ 1.77, 1.06, 0.74, 0.56, 0.49, 0.50, 0.49];
orkut_comb_1da = [20.08, 13.17, 11.24, 7.41, 5.12, 4.25, 5.86];
orkut_comb_2da = [16.38, 9.12, 6.30, 6.27, 4.20, 3.71, 5.17];
orkut_comb_2dc = [ 8.36, 5.29, 3.48, 3.09, 2.65, 2.30, 2.45];
plot_scaling(n_node, orkut_comb_2dc, orkut_crp, 'com-Orkut');

%%
nm7_crp = [ 3.39, 1.90, 1.36, 1.02, 0.89, 0.92, 0.95];
nm7_comb_1da = [70.23, 30.65, 18.02, 13.26, 11.78, 9.46, 7.79];
nm7_comb_2da = [41.97, 17.95, 12.60, 9.46, 7.44, 6.66, 6.25];
nm7_comb_2dc = [22.61, 10.86, 9.28, 8.14, 7.25, 6.47, 6.26];
plot_scaling(n_node, nm7_comb_2dc, nm7_crp, 'nm7');

%%
cage15_crp = [ 1.30, 0.79, 0.51, 0.36, 0.37, 0.31, 0.35];
cage15_comb_1da = [13.84, 9.88, 7.32, 5.99, 4.42, 4.08, 3.53];
cage15_comb_2da = [11.26, 7.67, 5.80, 5.07, 4.48, 3.14, 2.96];
cage15_comb_2dc = [ 5.34, 4.04, 3.33, 2.89, 2.61, 2.42, 2.30];
plot_scaling(n_node, cage15_comb_2dc, cage15_crp, 'cage15');
28 changes: 28 additions & 0 deletions SC23_AD/figures/plot_block_sparsity.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
function plot_block_sparsity(A, bs)
if (nargin < 2), bs = 1024; end
[m, n] = size(A);
nblk_m = ceil(m / bs);
nblk_n = ceil(n / bs);
blk_nnz = zeros(nblk_m, nblk_n);
[row, col, ~] = find(A);
for i = 1 : length(row)
ib = ceil(row(i) / bs);
jb = ceil(col(i) / bs);
blk_nnz(ib, jb) = blk_nnz(ib, jb) + 1;
end
fig = figure('Render', 'painter', 'Position', [10 10 800 600]);
log2_nnz = log2(blk_nnz + 2^(-5));
imagesc(log2_nnz);
xlabel_str = sprintf('Column block index (block size = %d)', bs);
ylabel_str = sprintf('Row block index (block size = %d)', bs);
xlabel(xlabel_str);
ylabel(ylabel_str);
font_size = 16;
fig_handle = gca(fig);
fig_handle.XAxis.FontSize = font_size;
fig_handle.YAxis.FontSize = font_size;
cb = colorbar;
%cb.Label.Interpreter = 'latex';
%cb.Label.FontSize = font_size;
%cb.Label.String = '$\log_2(nnz + 2^{-5})$';
end
74 changes: 74 additions & 0 deletions SC23_AD/figures/plot_runtime_breakdown.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
% 128 nodes, 256 procs, n = 256
% Use the "average" column
% CRP-SpMM timings: [copy A, copy B, local SpMM, redist]
% CombBLAS timings: [copy A, copy B, local SpMM, other]

crp_amazon = [0.335, 0.380, 0.086, 0.026 + 0.078 + 0.093];
crp_orkut = [0.166, 0.155, 0.040, 0.012 + 0.056 + 0.044];
crp_nm7 = [0.202, 0.462, 0.062, 0.029 + 0.061 + 0.109];
crp_cage15 = [0.075, 0.161, 0.007, 0.009 + 0.039 + 0.051];

comb_amazon = [0.473, 0.916, 0.919, 0];
comb_orkut = [0.396, 1.611, 0.398, 0];
comb_nm7 = [0.802, 4.560, 0.693, 0];
comb_cage15 = [0.197, 1.832, 0.180, 0];

%%
font_size = 14;
fig1 = figure('Renderer', 'painters', 'Position', [10 10 800 600]);
X = categorical({'CRP', 'CB-2D-C'});
X = reordercats(X, {'CRP', 'CB-2D-C'});

width = 0.17;
height = 0.75;
bottom = 0.12;
lefts = 0.075 : 0.25 : 1;
bars = cell(4, 1);

%%
subplot('Position', [lefts(1) bottom width height]);
orkut_times = [crp_orkut; comb_orkut];
bars{1} = bar(X, orkut_times, 'stacked'); grid on
ylabel('Runtime (seconds)', 'FontSize', font_size);
title('com-Orkut', 'FontSize', font_size);
set(gca, 'FontSize', font_size);

%%
subplot('Position', [lefts(2) bottom width height]);
nm7_times = [crp_nm7; comb_nm7];
bars{2} = bar(X, nm7_times, 'stacked'); grid on
title('nm7', 'FontSize', font_size);
set(gca, 'FontSize', font_size);

%%
subplot('Position', [lefts(3) bottom width height]);
cage15_times = [crp_cage15; comb_cage15];
bars{3} = bar(X, cage15_times, 'stacked'); grid on
title('cage15', 'FontSize', font_size);
set(gca, 'FontSize', font_size);

%%
subplot('Position', [lefts(4) bottom width height]);
amazon_times = [crp_amazon; comb_amazon];
bars{4} = bar(X, amazon_times, 'stacked'); grid on
title('Amazon', 'FontSize', font_size);
set(gca, 'FontSize', font_size);

legend({'Replicate $A$', 'Replicate $B$', 'Local SpMM', 'Redist. $ABC$'}, ...
'interpreter', 'latex', 'FontSize', font_size, ...
'Location', 'north', 'orientation', 'horizon');

%% Make me happy
%{
sh_colors = [
134, 148, 173;
180, 191, 208;
81, 124, 137;
35, 43, 54;
] ./ 255;
for i = 1 : 4
for j = 1 : 4
bars{i}(j).FaceColor = sh_colors(j, :);
end
end
%}
23 changes: 23 additions & 0 deletions SC23_AD/figures/plot_scaling.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
function plot_scaling(n_node, comb_runtime, crp_runtime, title_str)
fig1 = figure('Render', 'painter', 'Position', [10 10 800 600]);
linscale = comb_runtime(1) * n_node(1) ./ n_node;
loglog(n_node, comb_runtime, 'r-*'), hold on
loglog(n_node, crp_runtime, 'b-o'), hold on
loglog(n_node, linscale, 'k--'), hold on
grid on;
max_t = max(max(comb_runtime(:)), max(crp_runtime(:)));
min_t = min(min(comb_runtime(:)), min(crp_runtime(:)));
axis([min(n_node) * 0.9, max(n_node) / 0.9, min_t * 0.9, max_t / 0.9]);
fig_handle = gca(fig1);
font_size = 16;
fig_handle.XAxis.FontSize = font_size;
fig_handle.YAxis.FontSize = font_size;
xticks([8, 18, 32, 50, 72, 98, 128]);
yticks([0.5, 1, 2, 4, 8, 12, 16, 20]);
xticklabels({'8', '18', '32', '50', '72', '98', '128'});
yticklabels({'0.5', '1', '2', '4', '8', '12', '16', '20'});
xlabel('Number of Nodes', 'FontSize', font_size);
ylabel('Runtime (seconds)', 'FontSize', font_size);
legend({'CombBLAS Best', 'CRP-SpMM', 'Linear Scaling'}, 'FontSize', font_size);
%title(title_str);
end
82 changes: 82 additions & 0 deletions SC23_AD/figures/plot_vary_n.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
% 72 nodes, 144 procs
n = [128, 256, 512, 1024];

amazon_crp = [0.68, 0.98, 1.57, 2.29];
amazon_comb_1da = [2.13, 7.23, 9.14, 16.45];
amazon_comb_2da = [3.25, 6.59, 14.70, 31.59];
amazon_comb_2dc = [2.25, 3.30, 6.14, 10.38];

orkut_crp = [0.26, 0.49, 0.60, 1.02];
orkut_comb_1da = [1.97, 5.12, 16.47, 35.75];
orkut_comb_2da = [2.28, 4.20, 7.49, 17.10];
orkut_comb_2dc = [2.18, 2.65, 3.95, 6.83];

nm7_crp = [0.62, 0.95, 1.39, 2.06];
nm7_comb_1da = [3.69, 11.78, 34.38, 65.06];
nm7_comb_2da = [4.85, 7.44, 13.83, 25.69];
nm7_comb_2dc = [6.05, 7.25, 11.23, 18.93];

cage15_crp = [0.24, 0.37, 0.47, 0.85];
cage15_comb_1da = [1.70, 4.22, 9.33, 22.91];
cage15_comb_2da = [2.39, 4.48, 7.51, 12.29];
cage15_comb_2dc = [2.07, 2.61, 4.35, 6.22];

%%
font_size = 14;
fig1 = figure('Renderer', 'painters', 'Position', [10 10 800 600]);
X = categorical({'CRP', 'CB-2D-C'});
X = reordercats(X, {'CRP', 'CB-2D-C'});

width = 0.18;
height = 0.75;
bottom = 0.12;
lefts = 0.06 : 0.25 : 1;
bars = cell(4, 1);

%%
subplot('Position', [lefts(1) bottom width height]);
orkut_times = [orkut_crp; orkut_comb_2dc];
bars{1} = bar(X, orkut_times); grid on
ylabel('Runtime (seconds)', 'FontSize', font_size);
title('com-Orkut', 'FontSize', font_size);
set(gca, 'FontSize', font_size);

%%
subplot('Position', [lefts(2) bottom width height]);
nm7_times = [nm7_crp; nm7_comb_2dc];
bars{2} = bar(X, nm7_times); grid on
title('nm7', 'FontSize', font_size);
set(gca, 'FontSize', font_size);

%%
subplot('Position', [lefts(3) bottom width height]);
cage15_times = [cage15_crp; cage15_comb_2dc];
bars{3} = bar(X, cage15_times); grid on
title('cage15', 'FontSize', font_size);
set(gca, 'FontSize', font_size);

%%
subplot('Position', [lefts(4) bottom width height]);
amazon_times = [amazon_crp; amazon_comb_2dc];
bars{4} = bar(X, amazon_times); grid on
title('Amazon', 'FontSize', font_size);
set(gca, 'FontSize', font_size);

legend({'n = 128', 'n = 256', 'n = 512', 'n = 1024'}, ...
'interpreter', 'latex', 'FontSize', font_size, ...
'Location', 'north', 'orientation', 'horizon');

%% Make me happy
%{
sh_colors = [
134, 148, 173;
180, 191, 208;
81, 124, 137;
35, 43, 54;
] ./ 255;
for i = 1 : 4
for j = 1 : 4
bars{i}(j).FaceColor = sh_colors(j, :);
end
end
%}
36 changes: 36 additions & 0 deletions SC23_AD/figures/plot_vary_n2.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
% 32 node, 64 procs
n = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048];

cage15_pn = [1, 1, 2, 4, 4, 8, 8, 16, 16, 32, 32, 64];
cage15cm_pn = [1, 1, 1, 1, 2, 2, 4, 4, 8, 8, 16, 32];
cage15_time = [0.025, 0.038, 0.043, 0.065, 0.09, 0.15, 0.21, 0.34, 0.51, 0.83, 1.29, 1.82];
cage15cm_time = [0.017, 0.018, 0.030, 0.033, 0.05, 0.07, 0.12, 0.21, 0.33, 0.57, 1.10, 2.06];

font_size = 16;
fig1 = figure('Render', 'painter', 'Position', [10 10 800 600]);


colororder({'#0072BD', '#D95319'})
yyaxis left
linscale = cage15cm_time(1) .* n;
loglog(n, cage15_time, '-o'), hold on
loglog(n, cage15cm_time, '-d'), hold on
loglog(n, linscale, 'k--'), hold on
xticks(n), hold on
yticks([0.01 .* 2.^(0 : 9)]), hold on
axis([1 * 0.8, 2048 / 0.8, 0.01, 2.4]);
xlabel('Number of $B$ matrix columns ($n$)', 'Interpreter', 'latex', 'FontSize', font_size)
ylabel('Runtime (seconds)', 'FontSize', font_size);

yyaxis right
p3 = loglog(n, cage15_pn, '--o'); hold on
p4 = loglog(n, cage15cm_pn, '--d'); hold on
yticks([2.^(0 : 9)]), hold on
xticks(n), hold on
ylabel('Process Grid Size $p_n$ ($p_m = 64 / p_n$)', 'Interpreter', 'latex', 'FontSize', font_size);
grid on
fig1.CurrentAxes.YScale = 'log';
hold off
legend({'cage15 Runtime', 'cage15-cm Runtime', 'Linear Scaling', ...
'cage15 $p_n$', 'cage15-cm $p_n$'}, 'Interpreter', 'latex', ...
'FontSize', font_size, 'Location', 'northwest')
Loading

0 comments on commit 36c09ae

Please sign in to comment.