From ca908168cc987f2d134d7a439cbbc71b21d0c02d Mon Sep 17 00:00:00 2001 From: anastasia21112 Date: Wed, 26 Jun 2024 11:09:02 -0400 Subject: [PATCH 01/24] revised to get rid of parse error --- benchmarks/LinearSolve/MatrixDepot.jmd | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/benchmarks/LinearSolve/MatrixDepot.jmd b/benchmarks/LinearSolve/MatrixDepot.jmd index 33bc194f5..399abdf1f 100644 --- a/benchmarks/LinearSolve/MatrixDepot.jmd +++ b/benchmarks/LinearSolve/MatrixDepot.jmd @@ -26,20 +26,19 @@ algnames_transpose = reshape(algnames, 1, length(algnames)) cols = [:red, :blue, :green, :magenta, :turqoise] # one color per alg -matrices = ["HB/1138_bus", "HB/494_bus", "HB/662_bus", "HB/685_bus", "HB/bcsstk01", "HB/bcsstk02", "HB/bcsstk03", "HB/bcsstk04", - "HB/bcsstk05", "HB/bcsstk06", "HB/bcsstk07", "HB/bcsstk08", "HB/bcsstk09", "HB/bcsstk10", "HB/bcsstk11", "HB/bcsstk12", - "HB/bcsstk13", "HB/bcsstk14", "HB/bcsstk15", "HB/bcsstk16"] +# matrices = ["HB/1138_bus", "HB/494_bus", "HB/662_bus", "HB/685_bus", "HB/bcsstk01", "HB/bcsstk02", "HB/bcsstk03", "HB/bcsstk04", "HB/bcsstk05", "HB/bcsstk06", "HB/bcsstk07", "HB/bcsstk08", "HB/bcsstk09", "HB/bcsstk10", "HB/bcsstk11", "HB/bcsstk12", "HB/bcsstk13", "HB/bcsstk14", "HB/bcsstk15", "HB/bcsstk16"] +allmatrices = listnames("*/*") -times = fill(NaN, length(matrices), length(algs)) -percentage_sparsity = fill(NaN, length(matrices)) -matrix_size = fill(NaN, length(matrices)) +times = fill(NaN, length(allmatrices), length(algs)) +percentage_sparsity = fill(NaN, length(allmatrices)) +matrix_size = fill(NaN, length(allmatrices)) ``` ```julia -for z in 1:length(matrices) +for z in 1:length(allmatrices) try rng = MersenneTwister(123) - A = mdopen(matrices[z]).A + A = mdopen(allmatrices[z]).A A = convert(SparseMatrixCSC, A) n = size(A, 1) matrix_size[z] = n @@ -59,11 +58,11 @@ for z in 1:length(matrices) p = bar(algnames, times[z, :]; ylabel = "Time/s", yscale = :log10, - title = "Time on $(matrices[z])", + title = "Time on $(allmatrices[z])", legend = :outertopright) display(p) catch e - println("$(matrices[z]) failed to factorize.") + println("$(allmatrices[z]) failed to factorize.") println(e) end end From 4d83958fe88ed26b7cde9fa3154622df20ef6524 Mon Sep 17 00:00:00 2001 From: anastasia21112 Date: Wed, 26 Jun 2024 11:17:16 -0400 Subject: [PATCH 02/24] adding debug print statements --- benchmarks/LinearSolve/MatrixDepot.jmd | 2 ++ 1 file changed, 2 insertions(+) diff --git a/benchmarks/LinearSolve/MatrixDepot.jmd b/benchmarks/LinearSolve/MatrixDepot.jmd index 399abdf1f..b58d8d43e 100644 --- a/benchmarks/LinearSolve/MatrixDepot.jmd +++ b/benchmarks/LinearSolve/MatrixDepot.jmd @@ -36,6 +36,7 @@ matrix_size = fill(NaN, length(allmatrices)) ```julia for z in 1:length(allmatrices) + println(allmatrices[z]) try rng = MersenneTwister(123) A = mdopen(allmatrices[z]).A @@ -61,6 +62,7 @@ for z in 1:length(allmatrices) title = "Time on $(allmatrices[z])", legend = :outertopright) display(p) + println("successfully factorized $(allmatrices[z])") catch e println("$(allmatrices[z]) failed to factorize.") println(e) From 882e8d026d9c650ea5434c8b3121c2d35d3afab0 Mon Sep 17 00:00:00 2001 From: anastasia21112 Date: Wed, 26 Jun 2024 11:34:04 -0400 Subject: [PATCH 03/24] printing all matrices --- benchmarks/LinearSolve/MatrixDepot.jmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/LinearSolve/MatrixDepot.jmd b/benchmarks/LinearSolve/MatrixDepot.jmd index b58d8d43e..dcb6a7844 100644 --- a/benchmarks/LinearSolve/MatrixDepot.jmd +++ b/benchmarks/LinearSolve/MatrixDepot.jmd @@ -28,7 +28,7 @@ cols = [:red, :blue, :green, :magenta, :turqoise] # one color per alg # matrices = ["HB/1138_bus", "HB/494_bus", "HB/662_bus", "HB/685_bus", "HB/bcsstk01", "HB/bcsstk02", "HB/bcsstk03", "HB/bcsstk04", "HB/bcsstk05", "HB/bcsstk06", "HB/bcsstk07", "HB/bcsstk08", "HB/bcsstk09", "HB/bcsstk10", "HB/bcsstk11", "HB/bcsstk12", "HB/bcsstk13", "HB/bcsstk14", "HB/bcsstk15", "HB/bcsstk16"] allmatrices = listnames("*/*") - +println(allmatrices) times = fill(NaN, length(allmatrices), length(algs)) percentage_sparsity = fill(NaN, length(allmatrices)) matrix_size = fill(NaN, length(allmatrices)) From bc24544803c5c126492c069ccd42e56f1fdb6663 Mon Sep 17 00:00:00 2001 From: anastasia21112 Date: Wed, 26 Jun 2024 11:50:23 -0400 Subject: [PATCH 04/24] convert all matrices md table to list --- benchmarks/LinearSolve/MatrixDepot.jmd | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/benchmarks/LinearSolve/MatrixDepot.jmd b/benchmarks/LinearSolve/MatrixDepot.jmd index dcb6a7844..01809b4a3 100644 --- a/benchmarks/LinearSolve/MatrixDepot.jmd +++ b/benchmarks/LinearSolve/MatrixDepot.jmd @@ -27,8 +27,17 @@ algnames_transpose = reshape(algnames, 1, length(algnames)) cols = [:red, :blue, :green, :magenta, :turqoise] # one color per alg # matrices = ["HB/1138_bus", "HB/494_bus", "HB/662_bus", "HB/685_bus", "HB/bcsstk01", "HB/bcsstk02", "HB/bcsstk03", "HB/bcsstk04", "HB/bcsstk05", "HB/bcsstk06", "HB/bcsstk07", "HB/bcsstk08", "HB/bcsstk09", "HB/bcsstk10", "HB/bcsstk11", "HB/bcsstk12", "HB/bcsstk13", "HB/bcsstk14", "HB/bcsstk15", "HB/bcsstk16"] -allmatrices = listnames("*/*") +allmatrices_md = listnames("*/*") +println(allmatrices_md) + +lines = split(allmatrices_md, '\n') +allmatrices = [] +for line in lines[3:end] + item = strip(line, ['|', ' ']) + push!(allmatrices, item) +end println(allmatrices) + times = fill(NaN, length(allmatrices), length(algs)) percentage_sparsity = fill(NaN, length(allmatrices)) matrix_size = fill(NaN, length(allmatrices)) From fc958555310621891c2d2e26bdefbe5ee85a0989 Mon Sep 17 00:00:00 2001 From: anastasia21112 Date: Wed, 26 Jun 2024 12:03:35 -0400 Subject: [PATCH 05/24] string parsing attempt 2 --- benchmarks/LinearSolve/MatrixDepot.jmd | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/benchmarks/LinearSolve/MatrixDepot.jmd b/benchmarks/LinearSolve/MatrixDepot.jmd index 01809b4a3..281552861 100644 --- a/benchmarks/LinearSolve/MatrixDepot.jmd +++ b/benchmarks/LinearSolve/MatrixDepot.jmd @@ -28,13 +28,18 @@ cols = [:red, :blue, :green, :magenta, :turqoise] # one color per alg # matrices = ["HB/1138_bus", "HB/494_bus", "HB/662_bus", "HB/685_bus", "HB/bcsstk01", "HB/bcsstk02", "HB/bcsstk03", "HB/bcsstk04", "HB/bcsstk05", "HB/bcsstk06", "HB/bcsstk07", "HB/bcsstk08", "HB/bcsstk09", "HB/bcsstk10", "HB/bcsstk11", "HB/bcsstk12", "HB/bcsstk13", "HB/bcsstk14", "HB/bcsstk15", "HB/bcsstk16"] allmatrices_md = listnames("*/*") -println(allmatrices_md) - -lines = split(allmatrices_md, '\n') +using Regex +row_regex = r"^\|\s*(.*?)\s*\|?$" allmatrices = [] -for line in lines[3:end] - item = strip(line, ['|', ' ']) - push!(allmatrices, item) +for line in eachline(IOBuffer(allmatrices_md)) + match_row = match(row_regex, line) + if match_row !== nothing + item = match_row.captures[1] + item = strip(item) + if !isempty(item) + push!(allmatrices, item) + end + end end println(allmatrices) From e388279a37d6db2ab6f61af49c1eee7c017212e7 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Thu, 27 Jun 2024 10:33:41 +0800 Subject: [PATCH 06/24] Update benchmarks/LinearSolve/MatrixDepot.jmd --- benchmarks/LinearSolve/MatrixDepot.jmd | 1 - 1 file changed, 1 deletion(-) diff --git a/benchmarks/LinearSolve/MatrixDepot.jmd b/benchmarks/LinearSolve/MatrixDepot.jmd index 281552861..03ef35931 100644 --- a/benchmarks/LinearSolve/MatrixDepot.jmd +++ b/benchmarks/LinearSolve/MatrixDepot.jmd @@ -28,7 +28,6 @@ cols = [:red, :blue, :green, :magenta, :turqoise] # one color per alg # matrices = ["HB/1138_bus", "HB/494_bus", "HB/662_bus", "HB/685_bus", "HB/bcsstk01", "HB/bcsstk02", "HB/bcsstk03", "HB/bcsstk04", "HB/bcsstk05", "HB/bcsstk06", "HB/bcsstk07", "HB/bcsstk08", "HB/bcsstk09", "HB/bcsstk10", "HB/bcsstk11", "HB/bcsstk12", "HB/bcsstk13", "HB/bcsstk14", "HB/bcsstk15", "HB/bcsstk16"] allmatrices_md = listnames("*/*") -using Regex row_regex = r"^\|\s*(.*?)\s*\|?$" allmatrices = [] for line in eachline(IOBuffer(allmatrices_md)) From b300e5438343954d4f8076eedde07dc52dffbd56 Mon Sep 17 00:00:00 2001 From: anastasia21112 Date: Thu, 27 Jun 2024 12:20:13 -0400 Subject: [PATCH 07/24] testing str functions --- benchmarks/LinearSolve/MatrixDepot.jmd | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/benchmarks/LinearSolve/MatrixDepot.jmd b/benchmarks/LinearSolve/MatrixDepot.jmd index 03ef35931..9282c991a 100644 --- a/benchmarks/LinearSolve/MatrixDepot.jmd +++ b/benchmarks/LinearSolve/MatrixDepot.jmd @@ -28,18 +28,19 @@ cols = [:red, :blue, :green, :magenta, :turqoise] # one color per alg # matrices = ["HB/1138_bus", "HB/494_bus", "HB/662_bus", "HB/685_bus", "HB/bcsstk01", "HB/bcsstk02", "HB/bcsstk03", "HB/bcsstk04", "HB/bcsstk05", "HB/bcsstk06", "HB/bcsstk07", "HB/bcsstk08", "HB/bcsstk09", "HB/bcsstk10", "HB/bcsstk11", "HB/bcsstk12", "HB/bcsstk13", "HB/bcsstk14", "HB/bcsstk15", "HB/bcsstk16"] allmatrices_md = listnames("*/*") -row_regex = r"^\|\s*(.*?)\s*\|?$" -allmatrices = [] -for line in eachline(IOBuffer(allmatrices_md)) - match_row = match(row_regex, line) - if match_row !== nothing - item = match_row.captures[1] - item = strip(item) - if !isempty(item) - push!(allmatrices, item) - end - end -end +allmatrices = split(allmatrices_md, "\n") +# row_regex = r"^\|\s*(.*?)\s*\|?$" +# allmatrices = [] +# for line in eachline(IOBuffer(allmatrices_md)) +# match_row = match(row_regex, line) +# if match_row !== nothing + # item = match_row.captures[1] +# item = strip(item) +# if !isempty(item) +# push!(allmatrices, item) +# end +# end +# end println(allmatrices) times = fill(NaN, length(allmatrices), length(algs)) From 3d950fa9d2b4dd30b1d7bd4ac8b82cce177b6bd6 Mon Sep 17 00:00:00 2001 From: anastasia21112 Date: Sun, 30 Jun 2024 00:04:09 -0400 Subject: [PATCH 08/24] type conversion --- benchmarks/LinearSolve/MatrixDepot.jmd | 1 + 1 file changed, 1 insertion(+) diff --git a/benchmarks/LinearSolve/MatrixDepot.jmd b/benchmarks/LinearSolve/MatrixDepot.jmd index 9282c991a..ad4c800c5 100644 --- a/benchmarks/LinearSolve/MatrixDepot.jmd +++ b/benchmarks/LinearSolve/MatrixDepot.jmd @@ -28,6 +28,7 @@ cols = [:red, :blue, :green, :magenta, :turqoise] # one color per alg # matrices = ["HB/1138_bus", "HB/494_bus", "HB/662_bus", "HB/685_bus", "HB/bcsstk01", "HB/bcsstk02", "HB/bcsstk03", "HB/bcsstk04", "HB/bcsstk05", "HB/bcsstk06", "HB/bcsstk07", "HB/bcsstk08", "HB/bcsstk09", "HB/bcsstk10", "HB/bcsstk11", "HB/bcsstk12", "HB/bcsstk13", "HB/bcsstk14", "HB/bcsstk15", "HB/bcsstk16"] allmatrices_md = listnames("*/*") +allmatrices_md = convert(str, allmatrices_md) allmatrices = split(allmatrices_md, "\n") # row_regex = r"^\|\s*(.*?)\s*\|?$" # allmatrices = [] From f7439e32e5b542a5d9f0c676d0f5df416c0d6663 Mon Sep 17 00:00:00 2001 From: anastasia21112 Date: Wed, 3 Jul 2024 12:25:37 -0400 Subject: [PATCH 09/24] implementing discourse suggestions --- benchmarks/LinearSolve/MatrixDepot.jmd | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/benchmarks/LinearSolve/MatrixDepot.jmd b/benchmarks/LinearSolve/MatrixDepot.jmd index ad4c800c5..bbaf9dbc8 100644 --- a/benchmarks/LinearSolve/MatrixDepot.jmd +++ b/benchmarks/LinearSolve/MatrixDepot.jmd @@ -28,8 +28,8 @@ cols = [:red, :blue, :green, :magenta, :turqoise] # one color per alg # matrices = ["HB/1138_bus", "HB/494_bus", "HB/662_bus", "HB/685_bus", "HB/bcsstk01", "HB/bcsstk02", "HB/bcsstk03", "HB/bcsstk04", "HB/bcsstk05", "HB/bcsstk06", "HB/bcsstk07", "HB/bcsstk08", "HB/bcsstk09", "HB/bcsstk10", "HB/bcsstk11", "HB/bcsstk12", "HB/bcsstk13", "HB/bcsstk14", "HB/bcsstk15", "HB/bcsstk16"] allmatrices_md = listnames("*/*") -allmatrices_md = convert(str, allmatrices_md) -allmatrices = split(allmatrices_md, "\n") +print(string(allmatrices_md)) +print(allmatrices_md.content[1].rows) # row_regex = r"^\|\s*(.*?)\s*\|?$" # allmatrices = [] # for line in eachline(IOBuffer(allmatrices_md)) @@ -42,7 +42,6 @@ allmatrices = split(allmatrices_md, "\n") # end # end # end -println(allmatrices) times = fill(NaN, length(allmatrices), length(algs)) percentage_sparsity = fill(NaN, length(allmatrices)) From 3a5c387d3e2919bc651155b20f28a521fe79999e Mon Sep 17 00:00:00 2001 From: anastasia21112 Date: Wed, 3 Jul 2024 14:53:05 -0400 Subject: [PATCH 10/24] just testing parsing --- benchmarks/LinearSolve/MatrixDepot.jmd | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/benchmarks/LinearSolve/MatrixDepot.jmd b/benchmarks/LinearSolve/MatrixDepot.jmd index bbaf9dbc8..79be1b27f 100644 --- a/benchmarks/LinearSolve/MatrixDepot.jmd +++ b/benchmarks/LinearSolve/MatrixDepot.jmd @@ -28,7 +28,7 @@ cols = [:red, :blue, :green, :magenta, :turqoise] # one color per alg # matrices = ["HB/1138_bus", "HB/494_bus", "HB/662_bus", "HB/685_bus", "HB/bcsstk01", "HB/bcsstk02", "HB/bcsstk03", "HB/bcsstk04", "HB/bcsstk05", "HB/bcsstk06", "HB/bcsstk07", "HB/bcsstk08", "HB/bcsstk09", "HB/bcsstk10", "HB/bcsstk11", "HB/bcsstk12", "HB/bcsstk13", "HB/bcsstk14", "HB/bcsstk15", "HB/bcsstk16"] allmatrices_md = listnames("*/*") -print(string(allmatrices_md)) +# print(string(allmatrices_md)) print(allmatrices_md.content[1].rows) # row_regex = r"^\|\s*(.*?)\s*\|?$" # allmatrices = [] @@ -43,12 +43,14 @@ print(allmatrices_md.content[1].rows) # end # end +#= times = fill(NaN, length(allmatrices), length(algs)) percentage_sparsity = fill(NaN, length(allmatrices)) matrix_size = fill(NaN, length(allmatrices)) -``` +```=# ```julia +#= for z in 1:length(allmatrices) println(allmatrices[z]) try @@ -82,18 +84,22 @@ for z in 1:length(allmatrices) println(e) end end +=# ``` ```julia +#= meantimes = vec(mean(times, dims=1)) p = bar(algnames, meantimes; ylabel = "Time/s", yscale = :log10, title = "Mean factorization time", legend = :outertopright) +=# ``` ```julia +#= p = scatter(percentage_sparsity, times; ylabel = "Time/s", yscale = :log10, @@ -102,9 +108,11 @@ p = scatter(percentage_sparsity, times; label = algnames_transpose, title = "Factorization Time vs Percentage Sparsity", legend = :outertopright) +=# ``` ```julia +#= p = scatter(matrix_size, times; ylabel = "Time/s", yscale = :log10, @@ -118,6 +126,7 @@ p = scatter(matrix_size, times; ## Appendix ```julia, echo = false +#= using SciMLBenchmarks SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) -``` +``` \ No newline at end of file From 78bc31260f71fa633025f4ecb9e738c33e5fd74a Mon Sep 17 00:00:00 2001 From: anastasia21112 Date: Wed, 3 Jul 2024 15:22:02 -0400 Subject: [PATCH 11/24] looping through all matrices --- benchmarks/LinearSolve/MatrixDepot.jmd | 37 +++++++++++++++----------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/benchmarks/LinearSolve/MatrixDepot.jmd b/benchmarks/LinearSolve/MatrixDepot.jmd index 79be1b27f..43ed4675b 100644 --- a/benchmarks/LinearSolve/MatrixDepot.jmd +++ b/benchmarks/LinearSolve/MatrixDepot.jmd @@ -29,7 +29,7 @@ cols = [:red, :blue, :green, :magenta, :turqoise] # one color per alg # matrices = ["HB/1138_bus", "HB/494_bus", "HB/662_bus", "HB/685_bus", "HB/bcsstk01", "HB/bcsstk02", "HB/bcsstk03", "HB/bcsstk04", "HB/bcsstk05", "HB/bcsstk06", "HB/bcsstk07", "HB/bcsstk08", "HB/bcsstk09", "HB/bcsstk10", "HB/bcsstk11", "HB/bcsstk12", "HB/bcsstk13", "HB/bcsstk14", "HB/bcsstk15", "HB/bcsstk16"] allmatrices_md = listnames("*/*") # print(string(allmatrices_md)) -print(allmatrices_md.content[1].rows) +# print(allmatrices_md.content[1].rows) # row_regex = r"^\|\s*(.*?)\s*\|?$" # allmatrices = [] # for line in eachline(IOBuffer(allmatrices_md)) @@ -42,20 +42,29 @@ print(allmatrices_md.content[1].rows) # end # end # end +# function loopmatrices() +# for z in 1:length(allmatrices.content[1].rows) +# matrix = allmatrices.content[1].rows[z] +# println(string(matrix[1])) +# end +# end + -#= times = fill(NaN, length(allmatrices), length(algs)) percentage_sparsity = fill(NaN, length(allmatrices)) matrix_size = fill(NaN, length(allmatrices)) ```=# ```julia -#= -for z in 1:length(allmatrices) - println(allmatrices[z]) +for z in 1:length(allmatrices_md.content[1].rows) try + matrix = allmatrices.content[1].rows[z] + matrix = string(matrix[1]) + + currMTX = matrix + rng = MersenneTwister(123) - A = mdopen(allmatrices[z]).A + A = mdopen(currMTX).A A = convert(SparseMatrixCSC, A) n = size(A, 1) matrix_size[z] = n @@ -75,31 +84,30 @@ for z in 1:length(allmatrices) p = bar(algnames, times[z, :]; ylabel = "Time/s", yscale = :log10, - title = "Time on $(allmatrices[z])", + title = "Time on $(currMTX)", legend = :outertopright) display(p) - println("successfully factorized $(allmatrices[z])") + println("successfully factorized $(currMTX)") catch e - println("$(allmatrices[z]) failed to factorize.") + println("$(currMTX) failed to factorize.") println(e) end end -=# + ``` ```julia -#= + meantimes = vec(mean(times, dims=1)) p = bar(algnames, meantimes; ylabel = "Time/s", yscale = :log10, title = "Mean factorization time", legend = :outertopright) -=# ``` ```julia -#= + p = scatter(percentage_sparsity, times; ylabel = "Time/s", yscale = :log10, @@ -108,11 +116,9 @@ p = scatter(percentage_sparsity, times; label = algnames_transpose, title = "Factorization Time vs Percentage Sparsity", legend = :outertopright) -=# ``` ```julia -#= p = scatter(matrix_size, times; ylabel = "Time/s", yscale = :log10, @@ -126,7 +132,6 @@ p = scatter(matrix_size, times; ## Appendix ```julia, echo = false -#= using SciMLBenchmarks SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) ``` \ No newline at end of file From 1bcc29227411737f30205117d10c2ef2574b0eab Mon Sep 17 00:00:00 2001 From: anastasia21112 Date: Wed, 3 Jul 2024 15:24:34 -0400 Subject: [PATCH 12/24] accidentally commented out something --- benchmarks/LinearSolve/MatrixDepot.jmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/LinearSolve/MatrixDepot.jmd b/benchmarks/LinearSolve/MatrixDepot.jmd index 43ed4675b..a599a2e4e 100644 --- a/benchmarks/LinearSolve/MatrixDepot.jmd +++ b/benchmarks/LinearSolve/MatrixDepot.jmd @@ -53,7 +53,7 @@ allmatrices_md = listnames("*/*") times = fill(NaN, length(allmatrices), length(algs)) percentage_sparsity = fill(NaN, length(allmatrices)) matrix_size = fill(NaN, length(allmatrices)) -```=# +``` ```julia for z in 1:length(allmatrices_md.content[1].rows) From 3cd9199ae77a89e5a7932bbbc86c0cebb1cd9e44 Mon Sep 17 00:00:00 2001 From: anastasia21112 Date: Wed, 3 Jul 2024 15:29:38 -0400 Subject: [PATCH 13/24] updating variable names --- benchmarks/LinearSolve/MatrixDepot.jmd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/benchmarks/LinearSolve/MatrixDepot.jmd b/benchmarks/LinearSolve/MatrixDepot.jmd index a599a2e4e..ba06ba75d 100644 --- a/benchmarks/LinearSolve/MatrixDepot.jmd +++ b/benchmarks/LinearSolve/MatrixDepot.jmd @@ -50,9 +50,9 @@ allmatrices_md = listnames("*/*") # end -times = fill(NaN, length(allmatrices), length(algs)) -percentage_sparsity = fill(NaN, length(allmatrices)) -matrix_size = fill(NaN, length(allmatrices)) +times = fill(NaN, length(allmatrices_md.content[1].rows), length(algs)) +percentage_sparsity = fill(NaN, length(allmatrices_md.content[1].rows)) +matrix_size = fill(NaN, length(allmatrices_md.content[1].rows)) ``` ```julia From fcca1c87faa0dd17dbb75a3a87f67a50feb282e1 Mon Sep 17 00:00:00 2001 From: anastasia21112 Date: Wed, 3 Jul 2024 15:38:07 -0400 Subject: [PATCH 14/24] fixing error --- benchmarks/LinearSolve/MatrixDepot.jmd | 28 ++++++-------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/benchmarks/LinearSolve/MatrixDepot.jmd b/benchmarks/LinearSolve/MatrixDepot.jmd index ba06ba75d..9642c5815 100644 --- a/benchmarks/LinearSolve/MatrixDepot.jmd +++ b/benchmarks/LinearSolve/MatrixDepot.jmd @@ -28,27 +28,6 @@ cols = [:red, :blue, :green, :magenta, :turqoise] # one color per alg # matrices = ["HB/1138_bus", "HB/494_bus", "HB/662_bus", "HB/685_bus", "HB/bcsstk01", "HB/bcsstk02", "HB/bcsstk03", "HB/bcsstk04", "HB/bcsstk05", "HB/bcsstk06", "HB/bcsstk07", "HB/bcsstk08", "HB/bcsstk09", "HB/bcsstk10", "HB/bcsstk11", "HB/bcsstk12", "HB/bcsstk13", "HB/bcsstk14", "HB/bcsstk15", "HB/bcsstk16"] allmatrices_md = listnames("*/*") -# print(string(allmatrices_md)) -# print(allmatrices_md.content[1].rows) -# row_regex = r"^\|\s*(.*?)\s*\|?$" -# allmatrices = [] -# for line in eachline(IOBuffer(allmatrices_md)) -# match_row = match(row_regex, line) -# if match_row !== nothing - # item = match_row.captures[1] -# item = strip(item) -# if !isempty(item) -# push!(allmatrices, item) -# end -# end -# end -# function loopmatrices() -# for z in 1:length(allmatrices.content[1].rows) -# matrix = allmatrices.content[1].rows[z] -# println(string(matrix[1])) -# end -# end - times = fill(NaN, length(allmatrices_md.content[1].rows), length(algs)) percentage_sparsity = fill(NaN, length(allmatrices_md.content[1].rows)) @@ -58,7 +37,7 @@ matrix_size = fill(NaN, length(allmatrices_md.content[1].rows)) ```julia for z in 1:length(allmatrices_md.content[1].rows) try - matrix = allmatrices.content[1].rows[z] + matrix = allmatrices_md.content[1].rows[z] matrix = string(matrix[1]) currMTX = matrix @@ -89,6 +68,11 @@ for z in 1:length(allmatrices_md.content[1].rows) display(p) println("successfully factorized $(currMTX)") catch e + matrix = allmatrices_md.content[1].rows[z] + matrix = string(matrix[1]) + + currMTX = matrix + println("$(currMTX) failed to factorize.") println(e) end From 50bb8f55423bdb171bd35ae03e39c31127e4595a Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Sun, 7 Jul 2024 22:58:01 -0400 Subject: [PATCH 15/24] Update MatrixDepot.jmd --- benchmarks/LinearSolve/MatrixDepot.jmd | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/benchmarks/LinearSolve/MatrixDepot.jmd b/benchmarks/LinearSolve/MatrixDepot.jmd index 9642c5815..9ef3d536e 100644 --- a/benchmarks/LinearSolve/MatrixDepot.jmd +++ b/benchmarks/LinearSolve/MatrixDepot.jmd @@ -49,6 +49,9 @@ for z in 1:length(allmatrices_md.content[1].rows) matrix_size[z] = n percentage_sparsity[z] = length(nonzeros(A)) / n^2 @info "$n × $n" + + n > 100_000 && error("Skipping too large matrices") + b = rand(rng, n) u0 = rand(rng, n) @@ -118,4 +121,4 @@ p = scatter(matrix_size, times; ```julia, echo = false using SciMLBenchmarks SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) -``` \ No newline at end of file +``` From 297c60cd973aca9ee1b3fb176778dca687ed5f05 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Fri, 12 Jul 2024 04:03:48 +0200 Subject: [PATCH 16/24] Update benchmarks/LinearSolve/MatrixDepot.jmd --- benchmarks/LinearSolve/MatrixDepot.jmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/LinearSolve/MatrixDepot.jmd b/benchmarks/LinearSolve/MatrixDepot.jmd index 9ef3d536e..ce771e052 100644 --- a/benchmarks/LinearSolve/MatrixDepot.jmd +++ b/benchmarks/LinearSolve/MatrixDepot.jmd @@ -50,7 +50,7 @@ for z in 1:length(allmatrices_md.content[1].rows) percentage_sparsity[z] = length(nonzeros(A)) / n^2 @info "$n × $n" - n > 100_000 && error("Skipping too large matrices") + n > 10_000 && error("Skipping too large matrices") b = rand(rng, n) u0 = rand(rng, n) From 0490cabc2ba311ce2780909bade68260dd7f253d Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Mon, 15 Jul 2024 18:37:18 -0400 Subject: [PATCH 17/24] Update benchmarks/LinearSolve/MatrixDepot.jmd --- benchmarks/LinearSolve/MatrixDepot.jmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/LinearSolve/MatrixDepot.jmd b/benchmarks/LinearSolve/MatrixDepot.jmd index ce771e052..bc5052feb 100644 --- a/benchmarks/LinearSolve/MatrixDepot.jmd +++ b/benchmarks/LinearSolve/MatrixDepot.jmd @@ -50,7 +50,7 @@ for z in 1:length(allmatrices_md.content[1].rows) percentage_sparsity[z] = length(nonzeros(A)) / n^2 @info "$n × $n" - n > 10_000 && error("Skipping too large matrices") + n > 5_000 && error("Skipping too large matrices") b = rand(rng, n) u0 = rand(rng, n) From f9e5f257b7c40f0e1bd384af6a87ffe8d409e5f1 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Thu, 18 Jul 2024 07:06:39 -0400 Subject: [PATCH 18/24] Update benchmarks/LinearSolve/MatrixDepot.jmd --- benchmarks/LinearSolve/MatrixDepot.jmd | 1 + 1 file changed, 1 insertion(+) diff --git a/benchmarks/LinearSolve/MatrixDepot.jmd b/benchmarks/LinearSolve/MatrixDepot.jmd index bc5052feb..8c5733d3d 100644 --- a/benchmarks/LinearSolve/MatrixDepot.jmd +++ b/benchmarks/LinearSolve/MatrixDepot.jmd @@ -29,6 +29,7 @@ cols = [:red, :blue, :green, :magenta, :turqoise] # one color per alg # matrices = ["HB/1138_bus", "HB/494_bus", "HB/662_bus", "HB/685_bus", "HB/bcsstk01", "HB/bcsstk02", "HB/bcsstk03", "HB/bcsstk04", "HB/bcsstk05", "HB/bcsstk06", "HB/bcsstk07", "HB/bcsstk08", "HB/bcsstk09", "HB/bcsstk10", "HB/bcsstk11", "HB/bcsstk12", "HB/bcsstk13", "HB/bcsstk14", "HB/bcsstk15", "HB/bcsstk16"] allmatrices_md = listnames("*/*") +@info "Total number of matrices: $(allmatrices_md.content[1].rows)" times = fill(NaN, length(allmatrices_md.content[1].rows), length(algs)) percentage_sparsity = fill(NaN, length(allmatrices_md.content[1].rows)) matrix_size = fill(NaN, length(allmatrices_md.content[1].rows)) From 930219431bd0b9df7f72e07ebd3da46548bbf9e2 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Thu, 18 Jul 2024 07:11:37 -0400 Subject: [PATCH 19/24] Update MatrixDepot.jmd --- benchmarks/LinearSolve/MatrixDepot.jmd | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/benchmarks/LinearSolve/MatrixDepot.jmd b/benchmarks/LinearSolve/MatrixDepot.jmd index 8c5733d3d..8a68b2dd5 100644 --- a/benchmarks/LinearSolve/MatrixDepot.jmd +++ b/benchmarks/LinearSolve/MatrixDepot.jmd @@ -63,7 +63,7 @@ for z in 1:length(allmatrices_md.content[1].rows) alias_A = true, alias_b = true)) times[z,j] = bt - end + end p = bar(algnames, times[z, :]; ylabel = "Time/s", yscale = :log10, @@ -81,11 +81,9 @@ for z in 1:length(allmatrices_md.content[1].rows) println(e) end end - ``` ```julia - meantimes = vec(mean(times, dims=1)) p = bar(algnames, meantimes; ylabel = "Time/s", @@ -95,7 +93,6 @@ p = bar(algnames, meantimes; ``` ```julia - p = scatter(percentage_sparsity, times; ylabel = "Time/s", yscale = :log10, @@ -117,6 +114,14 @@ p = scatter(matrix_size, times; legend = :outertopright) ``` +```julia +algnames +``` + +```julia +times +``` + ## Appendix ```julia, echo = false From 1353f4f92325d66c01ba61b7dd29321f41a9086c Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Thu, 18 Jul 2024 07:12:03 -0400 Subject: [PATCH 20/24] Update MatrixDepot.jmd --- benchmarks/LinearSolve/MatrixDepot.jmd | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/benchmarks/LinearSolve/MatrixDepot.jmd b/benchmarks/LinearSolve/MatrixDepot.jmd index 8a68b2dd5..bd8997641 100644 --- a/benchmarks/LinearSolve/MatrixDepot.jmd +++ b/benchmarks/LinearSolve/MatrixDepot.jmd @@ -63,13 +63,17 @@ for z in 1:length(allmatrices_md.content[1].rows) alias_A = true, alias_b = true)) times[z,j] = bt - end + end + + #= p = bar(algnames, times[z, :]; ylabel = "Time/s", yscale = :log10, title = "Time on $(currMTX)", legend = :outertopright) display(p) + =# + println("successfully factorized $(currMTX)") catch e matrix = allmatrices_md.content[1].rows[z] From 3bb30602c01fc21e02a1fe086ba6937f2a58eac0 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Fri, 19 Jul 2024 19:27:20 -0400 Subject: [PATCH 21/24] Update benchmarks/LinearSolve/MatrixDepot.jmd --- benchmarks/LinearSolve/MatrixDepot.jmd | 7 ------- 1 file changed, 7 deletions(-) diff --git a/benchmarks/LinearSolve/MatrixDepot.jmd b/benchmarks/LinearSolve/MatrixDepot.jmd index bd8997641..6fef04504 100644 --- a/benchmarks/LinearSolve/MatrixDepot.jmd +++ b/benchmarks/LinearSolve/MatrixDepot.jmd @@ -118,13 +118,6 @@ p = scatter(matrix_size, times; legend = :outertopright) ``` -```julia -algnames -``` - -```julia -times -``` ## Appendix From 5dc78bf28521f828f0186e9fa59a931e52c3ff37 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Sun, 21 Jul 2024 07:52:33 -0400 Subject: [PATCH 22/24] Update MatrixDepot.jmd --- benchmarks/LinearSolve/MatrixDepot.jmd | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/benchmarks/LinearSolve/MatrixDepot.jmd b/benchmarks/LinearSolve/MatrixDepot.jmd index 6fef04504..848c85224 100644 --- a/benchmarks/LinearSolve/MatrixDepot.jmd +++ b/benchmarks/LinearSolve/MatrixDepot.jmd @@ -70,6 +70,7 @@ for z in 1:length(allmatrices_md.content[1].rows) ylabel = "Time/s", yscale = :log10, title = "Time on $(currMTX)", + fmt = :png, legend = :outertopright) display(p) =# @@ -93,6 +94,7 @@ p = bar(algnames, meantimes; ylabel = "Time/s", yscale = :log10, title = "Mean factorization time", + fmt = :png, legend = :outertopright) ``` @@ -104,6 +106,7 @@ p = scatter(percentage_sparsity, times; xscale = :log10, label = algnames_transpose, title = "Factorization Time vs Percentage Sparsity", + fmt = :png, legend = :outertopright) ``` @@ -115,6 +118,7 @@ p = scatter(matrix_size, times; xscale = :log10, label = algnames_transpose, title = "Factorization Time vs Matrix Size", + fmt = :png, legend = :outertopright) ``` From 2164085f3adaf7cd97417c02ff7fccbe705cf3fe Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Mon, 22 Jul 2024 11:52:40 -0400 Subject: [PATCH 23/24] Update benchmarks/LinearSolve/MatrixDepot.jmd --- benchmarks/LinearSolve/MatrixDepot.jmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/LinearSolve/MatrixDepot.jmd b/benchmarks/LinearSolve/MatrixDepot.jmd index 848c85224..16cbfbcfc 100644 --- a/benchmarks/LinearSolve/MatrixDepot.jmd +++ b/benchmarks/LinearSolve/MatrixDepot.jmd @@ -51,7 +51,7 @@ for z in 1:length(allmatrices_md.content[1].rows) percentage_sparsity[z] = length(nonzeros(A)) / n^2 @info "$n × $n" - n > 5_000 && error("Skipping too large matrices") + n > 1_000 && error("Skipping too large matrices") b = rand(rng, n) u0 = rand(rng, n) From 8e8b48f9ae0c97e4a018fcb86a6207a43ee17561 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Wed, 31 Jul 2024 11:34:36 -0400 Subject: [PATCH 24/24] Update benchmarks/LinearSolve/MatrixDepot.jmd --- benchmarks/LinearSolve/MatrixDepot.jmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/LinearSolve/MatrixDepot.jmd b/benchmarks/LinearSolve/MatrixDepot.jmd index 16cbfbcfc..c8fbd167e 100644 --- a/benchmarks/LinearSolve/MatrixDepot.jmd +++ b/benchmarks/LinearSolve/MatrixDepot.jmd @@ -51,7 +51,7 @@ for z in 1:length(allmatrices_md.content[1].rows) percentage_sparsity[z] = length(nonzeros(A)) / n^2 @info "$n × $n" - n > 1_000 && error("Skipping too large matrices") + n > 100 && error("Skipping too large matrices") b = rand(rng, n) u0 = rand(rng, n)