-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathplot.R
105 lines (89 loc) · 2.09 KB
/
plot.R
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
R=read.csv("results.txt", sep=",")
R$Complexity = R$N*R$D
R$NPerf = R$Complexity/R$Time
Ps = unique(R$P)
M = max(R$NPerf)
m = 0
s = log2(unique(R$Complexity))
w = s*0
w[1]=M
w = s*0
w[1]=M
plot(s,w, type='n', main="BLAH",xlab="size", ylab = "GFLOPS")
i = 1
col = c("red", "blue", "black","darkred", "darkblue","gray")
for (p in Ps) {
T = subset(R, P==p)
M = max(log2(T$NPerf))
m = 0
s = unique(T$N)
w = s*0
w[1]=M
w = s*0
w[1]=M
if (FILE) png(paste(p,"processors",".png",sep=""))
plot(s,w, type='n', main=paste(p,"processors" ),xlab="N", ylab = "log2(N*D/time)")
i = 1
print(p)
for (d in unique(T$D)) {
TD = subset(T, D==d)
str(TD)
lines(TD$N,
log2(TD$NPerf), col=col[i], lty=2, lwd=2)
i = i +1
}
legend("bottomright", legend=paste("degree",unique(T$D)),col=col,lty=2,lwd=2)
if (FILE) dev.off()
else X11()
}
#types = unique(R$TYPE)
#algs = unique(R$NAME)
#col = c("red", "blue", "black")
#if (FALSE) {
#for (t in types[1]) {
# print(t);
#
# data = subset(R, TYPE==t)
# M = max(data$HOT)
# m = 0
# s = unique(data$SIZE)
# w = s*0
# w[1]=M
# plot(s,w, type='n', main=t,xlab="size", ylab = "GFLOPS")
# i = 1
# for (a in algs) {
# d = subset(data, NAME==a)
# lines(d$SIZE,d$HOT,type='l',col=col[i],lty=2, lwd=2)
# i = i + 1
#
# }
# legend("bottomleft", legend=algs,col=col,lty=2,lwd=2)
# X11()
#}
#}
#
#
# M = max(R$HOT)
# m = 0
# s = unique(data$SIZE)
# w = s*0
# w[1]=M
# png("Epyc7601.png")
# plot(s,w, type='n', main="EPYC 7601 32-Core Processor 2.2GHz OpenBLAS GEMM",xlab="size", ylab = "GFLOPS")
# i = 1
# label =list()
#
# for (a in algs) {
# for (t in types) {
#
# d = subset(R, NAME==a & TYPE==t)
# print(paste(a,t))
# str(d)
# lines(d$SIZE,d$HOT,type='l',col=col[i],lty=2, lwd=2)
# label[[length(label)+1]] = paste(a,t)
#
# }
# i= i+1
# }
# legend("bottomright", legend=algs,col=col,lty=2,lwd=2)
# dev.off()