Skip to content

Commit 77da949

Browse files
revise benchmarks, add a list of test matrices (#58)
1 parent d14824b commit 77da949

File tree

2 files changed

+25
-8
lines changed

2 files changed

+25
-8
lines changed

benchmarks/benchmarks.jl

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ BenchmarkTools.DEFAULT_PARAMETERS.samples = 10
3333
BenchmarkTools.DEFAULT_PARAMETERS.seconds = 60
3434

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

3838

3939
const suite = BenchmarkGroup()
4040
const ssmc = ssmc_db()
4141

4242
function AxB_allbycol(S, G, nthreads, sizerhs)
43-
printstyled("\nCSC = CSC * Full\n", color=:green)
43+
printstyled("\nMETHOD: CSC = CSC * Full\n", color=:green)
4444
GC.gc()
4545
m = rand(size(S, 2), sizerhs)
4646
m2 = GBMatrix(m)
@@ -74,7 +74,7 @@ function AxB_allbycol(S, G, nthreads, sizerhs)
7474
end
7575

7676
function AxB_allbyrow(S, G, nthreads, sizerhs)
77-
printstyled("\nCSR = CSR * Full\n", color=:green)
77+
printstyled("\nMETHOD: CSR = CSR * Full\n", color=:green)
7878
GC.gc()
7979
m = rand(size(S, 2), sizerhs)
8080
m2 = GBMatrix(m)
@@ -104,7 +104,7 @@ function AxB_allbyrow(S, G, nthreads, sizerhs)
104104
end
105105

106106
function AxB_ColxRow(S, G, nthreads, sizerhs)
107-
printstyled("\nByRow = CSC * Full_byrow\n", color=:green)
107+
printstyled("\nMETHOD: ByRow = CSC * Full_byrow\n", color=:green)
108108
GC.gc()
109109
m = rand(size(S, 2), sizerhs)
110110
m2 = GBMatrix(m)
@@ -136,7 +136,7 @@ function AxB_ColxRow(S, G, nthreads, sizerhs)
136136
end
137137

138138
function CaccumAxB_allbycol(S, G, nthreads, sizerhs)
139-
printstyled("\nFull += CSC * Full\n", color=:green)
139+
printstyled("\nMETHOD: Full += CSC * Full\n", color=:green)
140140
GC.gc()
141141
m = rand(size(S, 2), sizerhs)
142142
m2 = GBMatrix(m)
@@ -172,7 +172,7 @@ function CaccumAxB_allbycol(S, G, nthreads, sizerhs)
172172
end
173173

174174
function CaccumAxB_allbyrow(S, G, nthreads, sizerhs)
175-
printstyled("\nFull_byrow += CSR * Full_byrow\n", color=:green)
175+
printstyled("\nMETHOD: Full_byrow += CSR * Full_byrow\n", color=:green)
176176
GC.gc()
177177
m = rand(size(S, 2), sizerhs)
178178
m2 = GBMatrix(m)
@@ -207,7 +207,7 @@ function CaccumAxB_allbyrow(S, G, nthreads, sizerhs)
207207
end
208208

209209
function CaccumAxB_CRC(S, G, nthreads, sizerhs)
210-
printstyled("\nFull_bycol += CSR * Full_bycol\n", color=:green)
210+
printstyled("\nMETHOD: Full_bycol += CSR * Full_bycol\n", color=:green)
211211
GC.gc()
212212
m = rand(size(S, 2), sizerhs)
213213
m2 = GBMatrix(m)
@@ -272,9 +272,11 @@ function singlebench(pathornum)
272272
G = GBMatrix(S)
273273
gbset(G, :format, :byrow)
274274
diag(G)
275+
printstyled("\n#################################################################################\n"; bold=true, color=:green)
275276
printstyled("Benchmarking $name:\n"; bold=true, color=:green)
277+
printstyled("#################################################################################\n"; bold=true, color=:green)
276278
for i sizefullrhs
277-
printstyled("\nUsing a size $i B matrix"; bold=true, color=:red)
279+
printstyled("\n================================================================================= $name : Using a size $i B matrix"; bold=true, color=:green)
278280
for f functorun
279281
f(S, G, threadlist, i)
280282
end

benchmarks/do10

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/sh
2+
3+
# FIXME: the paths would need to point somewhere else.
4+
# better yet, the sparse matrix IDs should be used so
5+
# they can be directly downloaded from sparse.tamu.edu.
6+
julia benchmarks.jl /home/faculty/d/davis/Freescale2.mtx
7+
julia benchmarks.jl /home/faculty/d/davis/indochina-2004.mtx
8+
julia benchmarks.jl /home/faculty/d/davis/nd24k.mtx
9+
julia benchmarks.jl /home/faculty/d/davis/nd6k.mtx
10+
julia benchmarks.jl /home/faculty/d/davis/roadNet-CA.mtx
11+
julia benchmarks.jl /raid/GAP/GAP-twitter/GAP-twitter.mtx
12+
julia benchmarks.jl /raid/GAP/GAP-road/GAP-road.mtx
13+
julia benchmarks.jl /raid/GAP/GAP-web/GAP-web.mtx
14+
julia benchmarks.jl /raid/GAP/GAP-urand/GAP-urand.mtx
15+
julia benchmarks.jl /raid/GAP/GAP-kron/GAP-kron.mtx

0 commit comments

Comments
 (0)