diff --git a/makeplots.R b/makeplots.R index 453d0885ec626c967fd133c56a89e079997316cd..c8c2aeb64e5fb620bfd699f3b0130608db820238 100755 --- a/makeplots.R +++ b/makeplots.R @@ -27,6 +27,59 @@ se <- function(x) sqrt(var(x)/length(x)) + + + +# parallel + + +d <- all %>% filter(exp=="parallel", s == 8) %>% group_by(exp, sys, conf) %>% + summarize(meant=mean(timesec), se=se(timesec)) %>% + mutate(threads=ifelse(conf=="none", 1L, as.integer(conf))) %>% mutate(tool=paste(sys,threads)) %>% filter(threads < 32) + +print(d) + + +limits <- aes(ymax = meant + se, ymin=meant - se, width=2) + +pdf("parallel.pdf",width=10,height=7) +p <- ggplot(d,aes(threads,meant,group=sys)) + + geom_point(size=4) + geom_line(size=1.5, aes(group=sys, linetype=sys)) + + geom_pointrange(limits) + + scale_y_continuous(limits=c(0,NA)) + + scale_x_continuous(breaks=unique(d$threads)) + + geom_vline(xintercept = 10) + + xlab("Number of Threads") + ylab("Execution Time (s)") + theme + + annotate("text", x=13.1, y=1.5, label="Problem parallelism", family="serif", size=10) + + + annotate("text", x=2, y=0.4, label="Laptop", family="serif", size=10)+ + annotate("text", x=3, y=1, label="Server", family="serif", size=10) + +print(p) +dev.off() + + +# f <- d %>% group_by(exp, sys, s) %>% summarize(maxmt=max(meant)) + +# d <- d %>% left_join(f) %>% mutate(speedup = maxmt/meant) %>% select(s,threads,speedup) + + +# print(d) + +# pdf("speedup.pdf",width=10,height=7) +# p <- ggplot(d,aes(threads,speedup,group=s)) + +# geom_point(size=4) + geom_line(size=1.5, aes(group=s, linetype=sys)) + +# scale_y_continuous(limits=c(0,NA)) + +# scale_x_continuous(breaks=unique(d$threads)) + +# xlab("Number of Threads") + ylab("Speedup") + theme #+ +# # annotate("text", x=10, y=6, label="Problem parallelism", family="serif", size=10) #+ +# # annotate("text", x=3.5, y=20, label="Renjin ", family="serif", size=10) + +# print(p) +# dev.off() + + +stop() # recycling d <- all %>% filter(exp=="recycling", s > 5) %>% group_by(exp, sys, s, conf) %>% summarize(meant=mean(timesec), se=se(timesec)) %>% @@ -134,57 +187,6 @@ dev.off() -# parallel - - -d <- all %>% filter(exp=="parallel", s == 8) %>% group_by(exp, sys, conf, s) %>% - summarize(meant=mean(timesec), se=se(timesec)) %>% - mutate(datasize=10^as.integer(s), threads=ifelse(conf=="none", 1L, as.integer(conf))) %>% mutate(tool=paste(sys,threads)) - -print(d) - - - - -limits <- aes(ymax = meant + se, ymin=meant - se, width=2) - -pdf("parallel.pdf",width=10,height=7) -p <- ggplot(d,aes(threads,meant,group=s)) + - geom_point(size=4) + geom_line(size=1.5, aes(group=s, linetype=sys)) + - geom_pointrange(limits) + - scale_y_continuous(limits=c(0,NA)) + - scale_x_continuous(breaks=unique(d$threads)) + - geom_vline(xintercept = 10) + - xlab("Number of Threads") + ylab("Execution Time (s)") + theme + - annotate("text", x=17, y=1.5, label="Problem parallelism", family="serif", size=10) #+ - - # annotate("text", x=1.3, y=6, label="GNU R", family="serif", size=10)+ - # annotate("text", x=3.5, y=20, label="Renjin ", family="serif", size=10) - -print(p) -dev.off() - - -f <- d %>% group_by(exp, sys, s) %>% summarize(maxmt=max(meant)) - -d <- d %>% left_join(f) %>% mutate(speedup = maxmt/meant) %>% select(s,threads,speedup) - - -print(d) - -pdf("speedup.pdf",width=10,height=7) -p <- ggplot(d,aes(threads,speedup,group=s)) + - geom_point(size=4) + geom_line(size=1.5, aes(group=s, linetype=sys)) + - scale_y_continuous(limits=c(0,NA)) + - scale_x_continuous(breaks=unique(d$threads)) + - xlab("Number of Threads") + ylab("Speedup") + theme #+ -# annotate("text", x=10, y=6, label="Problem parallelism", family="serif", size=10) #+ - # annotate("text", x=3.5, y=20, label="Renjin ", family="serif", size=10) - -print(p) -dev.off() - - # operators d <- all %>% filter(exp=="operators", s > 5) %>% group_by(exp, sys, s, conf) %>%