Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

revise benchmarks, add a list of test matrices #58

Merged
merged 1 commit into from
Nov 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions benchmarks/benchmarks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ BenchmarkTools.DEFAULT_PARAMETERS.samples = 10
BenchmarkTools.DEFAULT_PARAMETERS.seconds = 60

# Change this to change the size of the dense RHS of csrtimesfull and csctimesfull
const sizefullrhs = [1,2,20]
const sizefullrhs = [1,2,4]


const suite = BenchmarkGroup()
const ssmc = ssmc_db()

function AxB_allbycol(S, G, nthreads, sizerhs)
printstyled("\nCSC = CSC * Full\n", color=:green)
printstyled("\nMETHOD: CSC = CSC * Full\n", color=:green)
GC.gc()
m = rand(size(S, 2), sizerhs)
m2 = GBMatrix(m)
Expand Down Expand Up @@ -74,7 +74,7 @@ function AxB_allbycol(S, G, nthreads, sizerhs)
end

function AxB_allbyrow(S, G, nthreads, sizerhs)
printstyled("\nCSR = CSR * Full\n", color=:green)
printstyled("\nMETHOD: CSR = CSR * Full\n", color=:green)
GC.gc()
m = rand(size(S, 2), sizerhs)
m2 = GBMatrix(m)
Expand Down Expand Up @@ -104,7 +104,7 @@ function AxB_allbyrow(S, G, nthreads, sizerhs)
end

function AxB_ColxRow(S, G, nthreads, sizerhs)
printstyled("\nByRow = CSC * Full_byrow\n", color=:green)
printstyled("\nMETHOD: ByRow = CSC * Full_byrow\n", color=:green)
GC.gc()
m = rand(size(S, 2), sizerhs)
m2 = GBMatrix(m)
Expand Down Expand Up @@ -136,7 +136,7 @@ function AxB_ColxRow(S, G, nthreads, sizerhs)
end

function CaccumAxB_allbycol(S, G, nthreads, sizerhs)
printstyled("\nFull += CSC * Full\n", color=:green)
printstyled("\nMETHOD: Full += CSC * Full\n", color=:green)
GC.gc()
m = rand(size(S, 2), sizerhs)
m2 = GBMatrix(m)
Expand Down Expand Up @@ -172,7 +172,7 @@ function CaccumAxB_allbycol(S, G, nthreads, sizerhs)
end

function CaccumAxB_allbyrow(S, G, nthreads, sizerhs)
printstyled("\nFull_byrow += CSR * Full_byrow\n", color=:green)
printstyled("\nMETHOD: Full_byrow += CSR * Full_byrow\n", color=:green)
GC.gc()
m = rand(size(S, 2), sizerhs)
m2 = GBMatrix(m)
Expand Down Expand Up @@ -207,7 +207,7 @@ function CaccumAxB_allbyrow(S, G, nthreads, sizerhs)
end

function CaccumAxB_CRC(S, G, nthreads, sizerhs)
printstyled("\nFull_bycol += CSR * Full_bycol\n", color=:green)
printstyled("\nMETHOD: Full_bycol += CSR * Full_bycol\n", color=:green)
GC.gc()
m = rand(size(S, 2), sizerhs)
m2 = GBMatrix(m)
Expand Down Expand Up @@ -272,9 +272,11 @@ function singlebench(pathornum)
G = GBMatrix(S)
gbset(G, :format, :byrow)
diag(G)
printstyled("\n#################################################################################\n"; bold=true, color=:green)
printstyled("Benchmarking $name:\n"; bold=true, color=:green)
printstyled("#################################################################################\n"; bold=true, color=:green)
for i ∈ sizefullrhs
printstyled("\nUsing a size $i B matrix"; bold=true, color=:red)
printstyled("\n================================================================================= $name : Using a size $i B matrix"; bold=true, color=:green)
for f ∈ functorun
f(S, G, threadlist, i)
end
Expand Down
15 changes: 15 additions & 0 deletions benchmarks/do10
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh

# FIXME: the paths would need to point somewhere else.
# better yet, the sparse matrix IDs should be used so
# they can be directly downloaded from sparse.tamu.edu.
julia benchmarks.jl /home/faculty/d/davis/Freescale2.mtx
julia benchmarks.jl /home/faculty/d/davis/indochina-2004.mtx
julia benchmarks.jl /home/faculty/d/davis/nd24k.mtx
julia benchmarks.jl /home/faculty/d/davis/nd6k.mtx
julia benchmarks.jl /home/faculty/d/davis/roadNet-CA.mtx
julia benchmarks.jl /raid/GAP/GAP-twitter/GAP-twitter.mtx
julia benchmarks.jl /raid/GAP/GAP-road/GAP-road.mtx
julia benchmarks.jl /raid/GAP/GAP-web/GAP-web.mtx
julia benchmarks.jl /raid/GAP/GAP-urand/GAP-urand.mtx
julia benchmarks.jl /raid/GAP/GAP-kron/GAP-kron.mtx