-
Notifications
You must be signed in to change notification settings - Fork 3
/
JuliaAnalysisPlotter.jl
127 lines (106 loc) · 4.66 KB
/
JuliaAnalysisPlotter.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
function JuliaAnalysisPlotter(plotID)
# Setting Enviorment Parameters
generateImages = 1
saveImages = 1
# Loading Data
tRunTimeMatlab = readdlm(joinpath("RunTimeData", "RunTimeMatlabTable.csv"),',',)
mRunTimeMatlab = tRunTimeMatlab[2:end, 2:end]
vMatrixSizeMatlab = tRunTimeMatlab[1, 2:end]
sFunNameMatlab = tRunTimeMatlab[2:end, 1]
tRunTimeJulia = readdlm(joinpath("RunTimeData", "RunTimeJuliaopenblas64Table.csv"),',',)
mRunTimeJulia = tRunTimeJulia[2:end, 2:end]
vMatrixSizeJulia = tRunTimeJulia[1, 2:end]
sFunNameJulia = tRunTimeJulia[2:end, 1]
tRunTimeJuliaSIMD = readdlm(joinpath("RunTimeData", "RunTimeJuliaopenblas64SIMDTable.csv"),',',)
mRunTimeJuliaSIMD = tRunTimeJuliaSIMD[2:end, 2:end]
vMatrixSizeJuliaSIMD = tRunTimeJuliaSIMD[1, 2:end]
sFunNameJuliaSIMD = tRunTimeJuliaSIMD[2:end, 1]
tRunTimeJuliaThreads4 = readdlm(joinpath("RunTimeData", "RunTimeJuliaopenblas64Table_4Thread.csv"),',',)
mRunTimeJuliaThreads4 = tRunTimeJuliaThreads4[2:end, 2:end]
vMatrixSizeJuliaThreads4 = tRunTimeJuliaThreads4[1, 2:end]
sFunNameJuliaThreads4 = tRunTimeJuliaThreads4[2:end, 1]
tRunTimeJuliaSIMDThreads4 = readdlm(joinpath("RunTimeData", "RunTimeJuliaopenblas64SIMDTable_4Thread.csv"),',',)
mRunTimeJuliaSIMDThreads4 = tRunTimeJuliaSIMDThreads4[2:end, 2:end]
vMatrixSizeJuliaSIMDThreads4 = tRunTimeJuliaSIMDThreads4[1, 2:end]
sFunNameJuliaSIMDThreads4 = tRunTimeJuliaSIMDThreads4[2:end, 1]
tRunTimeJuliamkl = readdlm(joinpath("RunTimeData", "RunTimeJuliamklTable.csv"),',',)
mRunTimeJuliamkl = tRunTimeJuliamkl[2:end, 2:end]
vMatrixSizeJuliamkl = tRunTimeJuliamkl[1, 2:end]
sFunNameJuliamkl = tRunTimeJuliamkl[2:end, 1]
tRunTimeJuliamklSIMD = readdlm(joinpath("RunTimeData", "RunTimeJuliamklSIMDTable.csv"),',',)
mRunTimeJuliamklSIMD = tRunTimeJuliamklSIMD[2:end, 2:end]
vMatrixSizeJuliamklSIMD = tRunTimeJuliamklSIMD[1, 2:end]
sFunNameJuliamklSIMD = tRunTimeJuliamklSIMD[2:end, 1]
folderName=join(plotID,"_")
if ~isdir(joinpath("Figures", "JuliaGenerated",folderName))
mkdir(joinpath("Figures", "JuliaGenerated",folderName))
end
# Displaying Results
ii = 1
for fun in sFunNameMatlab
plotVect=Any[]
plotVectSIMD=Any[]
plotLabels=Any[]
plotLabelsSIMD=Any[]
if any(occursin.("Matlab", plotID))
push!(plotVect,mRunTimeMatlab[ii, :])
push!(plotLabels,"MATLAB")
end
if any(occursin.("Julia-1-BLAS-Thread", plotID))
push!(plotVect,mRunTimeJulia[ii, :])
push!(plotLabels,"Julia-1-BLAS-Thread")
end
if any(occursin.("Julia-4-BLAS-Threads", plotID))
push!(plotVect,mRunTimeJuliaThreads4[ii, :])
push!(plotLabels,"Julia-4-BLAS-Threads")
end
if any(occursin.("Julia-MKL", plotID))
push!(plotVect,mRunTimeJuliamkl[ii, :])
push!(plotLabels,"Julia-MKL")
end
plt = plot(
vMatrixSizeMatlab,
plotVect,
labels = plotLabels,
legend = :bottomright,
markershape = :auto,
markersize = 2,
xlabel = "Matrix Size",
ylabel = "Run Time [micro Seconds]",
guidefontsize = 10,
title = "$fun",
titlefontsize = 10,
xscale = :log10,
yscale = :log10,
dpi = 300
)
plotJuliaSIMD = occursin.(fun, sFunNameJuliamklSIMD) # if 1 will plot Julia-SIMD
if any(plotJuliaSIMD)
if any(occursin.("Julia-SIMD-1-BLAS-Thread", plotID))
push!(plotVectSIMD,dropdims(mRunTimeJuliaSIMD[plotJuliaSIMD, :], dims = 1))
push!(plotLabelsSIMD,"Julia-SIMD-1-BLAS-Thread")
end
if any(occursin.("Julia-SIMD-4-BLAS-Threads", plotID))
push!(plotVectSIMD,dropdims(mRunTimeJuliaSIMDThreads4[plotJuliaSIMD, :], dims = 1))
push!(plotLabelsSIMD,"Julia-SIMD-4-BLAS-Threads")
end
if any(occursin.("Julia-MKL-SIMD", plotID))
push!(plotVectSIMD,dropdims(mRunTimeJuliamklSIMD[plotJuliaSIMD, :], dims = 1))
push!(plotLabelsSIMD,"Julia-MKL-SIMD")
end
if ~isempty(plotLabelsSIMD)
plt=plot!(
vMatrixSizeJuliamklSIMD,
plotVectSIMD,
labels = [plotLabels;plotLabelsSIMD],
)
end
end
display(plt) # display in plot pane
if (saveImages == 1)
savefig(joinpath("Figures", "JuliaGenerated", folderName, "Figure$(ii).png"))
end
ii = ii + 1
end
nothing
end