nbody: plot nblocks in test
This commit is contained in:
parent
7b26b59988
commit
43991e9173
@ -22,7 +22,6 @@ df = select(dataset, config.nblocks, config.hw.cpusPerSocket, time) %>%
|
||||
|
||||
df = df %>% mutate(blocksPerCpu = nblocks / cpusPerSocket)
|
||||
df$nblocks = as.factor(df$nblocks)
|
||||
df$blocksPerCpuFactor = as.factor(df$blocksPerCpu)
|
||||
|
||||
# Normalize the time by the median
|
||||
D=group_by(df, nblocks) %>%
|
||||
@ -42,10 +41,10 @@ png("box.png", width=w*ppi, height=h*ppi, res=ppi)
|
||||
#
|
||||
#
|
||||
# Create the plot with the normalized time vs nblocks
|
||||
p = ggplot(data=D, aes(x=blocksPerCpuFactor, y=tnorm)) +
|
||||
p = ggplot(data=D, aes(x=nblocks, y=tnorm)) +
|
||||
|
||||
# Labels
|
||||
labs(x="Blocks/CPU", y="Normalized time",
|
||||
labs(x="Blocks", y="Normalized time",
|
||||
title=sprintf("Nbody normalized time. Particles=%d", particles),
|
||||
subtitle=input_file) +
|
||||
|
||||
@ -56,13 +55,13 @@ p = ggplot(data=D, aes(x=blocksPerCpuFactor, y=tnorm)) +
|
||||
#theme_bw() +
|
||||
|
||||
# Add the maximum allowed error lines
|
||||
geom_hline(yintercept=c(-0.01, 0.01),
|
||||
linetype="dashed", color="red") +
|
||||
#geom_hline(yintercept=c(-0.01, 0.01),
|
||||
# linetype="dashed", color="red") +
|
||||
|
||||
# Draw boxplots
|
||||
geom_boxplot() +
|
||||
|
||||
scale_y_continuous(breaks = scales::pretty_breaks(n = 10)) +
|
||||
#scale_y_continuous(breaks = scales::pretty_breaks(n = 10)) +
|
||||
|
||||
theme_bw() +
|
||||
|
||||
@ -84,17 +83,17 @@ dev.off()
|
||||
png("scatter.png", width=w*ppi, height=h*ppi, res=ppi)
|
||||
#
|
||||
## Create the plot with the normalized time vs nblocks
|
||||
p = ggplot(D, aes(x=blocksPerCpuFactor, y=time)) +
|
||||
p = ggplot(D, aes(x=nblocks, y=time)) +
|
||||
|
||||
labs(x="Blocks/CPU", y="Time (s)",
|
||||
labs(x="Blocks", y="Time (s)",
|
||||
title=sprintf("Nbody granularity. Particles=%d", particles),
|
||||
subtitle=input_file) +
|
||||
theme_bw() +
|
||||
theme(plot.subtitle=element_text(size=8)) +
|
||||
theme(legend.position = c(0.5, 0.88)) +
|
||||
|
||||
geom_point(shape=21, size=3) +
|
||||
scale_y_continuous(trans=log2_trans())
|
||||
geom_point(shape=21, size=3) # +
|
||||
#scale_y_continuous(trans=log2_trans())
|
||||
|
||||
# Render the plot
|
||||
print(p)
|
||||
|
Loading…
Reference in New Issue
Block a user