fig: use the $out path in the subtitle

The input dataset is not enough to determine which script produced a
given plot.
This commit is contained in:
Rodrigo Arias 2021-04-21 13:40:25 +02:00
parent 5a49611bf6
commit 92cd88e365
28 changed files with 88 additions and 61 deletions

View File

@ -9,6 +9,7 @@ args = commandArgs(trailingOnly=TRUE)
# Set the input dataset if given in argv[1], or use "input" as default
if (length(args)>0) { input_file = args[1] } else { input_file = "input" }
if (length(args)>1) { output = args[2] } else { output = "?" }
df = jsonlite::stream_in(file(input_file), verbose=FALSE) %>%
@ -62,7 +63,7 @@ p = ggplot(df, aes(x=granul, y=normalized.time)) +
facet_wrap(branch ~ .) +
labs(x="granul", y="Normalized time",
title="Creams granularity: normalized time",
subtitle=input_file) +
subtitle=output) +
theme(plot.subtitle=element_text(size=8))
ggsave("normalized.time.png", plot=p, width=w, height=h, dpi=dpi)
@ -75,7 +76,7 @@ p = ggplot(df, aes(x=granul, y=time, color=branch)) +
geom_line(aes(y=median.time, group=branch)) +
theme_bw() +
labs(x="granul", y="Time (s)", title="Creams granularity: time",
subtitle=input_file) +
subtitle=output) +
theme(plot.subtitle=element_text(size=8))
ggsave("time.png", plot=p, width=w, height=h, dpi=dpi)

View File

@ -9,6 +9,7 @@ args = commandArgs(trailingOnly=TRUE)
# Set the input dataset if given in argv[1], or use "input" as default
if (length(args)>0) { input_file = args[1] } else { input_file = "input" }
if (length(args)>1) { output = args[2] } else { output = "?" }
df = jsonlite::stream_in(file(input_file), verbose=FALSE) %>%
@ -64,7 +65,7 @@ p = ggplot(df, aes(x=nodes, y=normalized.time, fill=granul, color=iterations)) +
facet_wrap(branch ~ .) +
labs(x="nodes", y="Normalized time",
title="Creams strong scaling: normalized time",
subtitle=input_file) +
subtitle=output) +
theme(plot.subtitle=element_text(size=8))
ggsave("normalized.time.png", plot=p, width=w, height=h, dpi=dpi)
@ -78,7 +79,7 @@ p = ggplot(df, aes(x=nodes, y=time, color=gitBranch)) +
theme_bw() +
# facet_wrap(branch ~ .) +
labs(x="nodes", y="Time (s)", title="Creams strong scaling: time",
subtitle=input_file) +
subtitle=output) +
theme(plot.subtitle=element_text(size=8))
ggsave("time.png", plot=p, width=w, height=h, dpi=dpi)
@ -92,7 +93,7 @@ p = ggplot(df, aes(x=nodes, y=median.time.nodes, color=branch)) +
theme_bw() +
#facet_wrap(branch ~ .) +
labs(x="nodes", y="Median time * nodes (s)", title="Creams strong scaling: median time * nodes",
subtitle=input_file) +
subtitle=output) +
theme(plot.subtitle=element_text(size=8))
ggsave("median.time.nodes.png", plot=p, width=w, height=h, dpi=dpi)
@ -105,7 +106,7 @@ p = ggplot(df, aes(x=nodes, y=time.nodes, color=branch)) +
theme_bw() +
facet_wrap(branch ~ .) +
labs(x="nodes", y="Time * nodes (s)", title="Creams strong scaling: time * nodes",
subtitle=input_file) +
subtitle=output) +
theme(plot.subtitle=element_text(size=8))
ggsave("time.nodes.boxplot.png", plot=p, width=w, height=h, dpi=dpi)
@ -120,7 +121,7 @@ ggsave("time.nodes.boxplot.pdf", plot=p, width=w, height=h, dpi=dpi)
# #facet_wrap(branch ~ .) +
# labs(x="nodes", y="Time * nodes / iterations (s)",
# title="Creams strong scaling: time * nodes / iterations",
# subtitle=input_file) +
# subtitle=output) +
# theme(plot.subtitle=element_text(size=8))
#
#ggsave("time.nodes.iter.png", plot=p, width=w, height=h, dpi=dpi)

View File

@ -28,6 +28,7 @@ args = commandArgs(trailingOnly=TRUE)
# Set the input dataset if given in argv[1], or use "input" as default
if (length(args)>0) { input_file = args[1] } else { input_file = "input" }
if (length(args)>1) { output = args[2] } else { output = "?" }
# Here we build of dataframe from the input dataset by chaining operations using
# the magritte operator `%>%`, which is similar to a UNIX pipe.
@ -94,7 +95,7 @@ p = ggplot(df, aes(x=cbs, y=median.time, color=rbs)) +
# Here we add the title and the labels of the axes
labs(x="cbs", y="Median time (s)", title="Heat granularity: median time",
subtitle=input_file) +
subtitle=output) +
# And set the subtitle font size a bit smaller, so it fits nicely
theme(plot.subtitle=element_text(size=8))
@ -126,7 +127,7 @@ p = ggplot(df, aes(x=cbs, y=normalized.time)) +
# Here we add the title and the labels of the axes
labs(x="cbs", y="Normalized time", title="Heat granularity: normalized time",
subtitle=input_file) +
subtitle=output) +
# And set the subtitle font size a bit smaller, so it fits nicely
theme(plot.subtitle=element_text(size=8))
@ -151,7 +152,7 @@ p = ggplot(df, aes(x=cbs, y=time, color=rbs)) +
# Here we add the title and the labels of the axes
labs(x="cbs", y="Time (s)", title="Heat granularity: time",
subtitle=input_file) +
subtitle=output) +
# And set the subtitle font size a bit smaller, so it fits nicely
theme(plot.subtitle=element_text(size=8))
@ -184,7 +185,7 @@ p = ggplot(df, aes(x=cbs, y=rbs, fill=median.time)) +
# Here we add the title and the labels of the axes
labs(x="cbs", y="rbs", title="Heat granularity: time",
subtitle=input_file) +
subtitle=output) +
# And set the subtitle font size a bit smaller, so it fits nicely
theme(plot.subtitle=element_text(size=8))

View File

@ -9,6 +9,7 @@ args = commandArgs(trailingOnly=TRUE)
# Set the input dataset if given in argv[1], or use "input" as default
if (length(args)>0) { input_file = args[1] } else { input_file = "input" }
if (length(args)>1) { output = args[2] } else { output = "?" }
df = jsonlite::stream_in(file(input_file), verbose=FALSE) %>%
@ -51,7 +52,7 @@ p = ggplot(df, aes(x=blocksize, y=normalized.time)) +
facet_wrap(branch ~ .) +
labs(y="Normalized time",
title=sprintf("%s: normalized time", main_title),
subtitle=input_file) +
subtitle=output) +
theme(plot.subtitle=element_text(size=8))
ggsave("normalized.time.png", plot=p, width=w, height=h, dpi=dpi)
@ -65,7 +66,7 @@ p = ggplot(df, aes(x=blocksize, y=time, color=branch)) +
theme_bw() +
labs(y="Time (s)",
title=sprintf("%s: time", main_title),
subtitle=input_file) +
subtitle=output) +
theme(legend.position="bottom") +
theme(plot.subtitle=element_text(size=8))

View File

@ -9,6 +9,7 @@ args=commandArgs(trailingOnly=TRUE)
# Read the timetable from args[1]
input_file = "input.json"
if (length(args)>0) { input_file = args[1] }
if (length(args)>1) { output = args[2] } else { output = "?" }
# Load the dataset in NDJSON format
dataset = jsonlite::stream_in(file(input_file)) %>%
@ -48,7 +49,7 @@ p = ggplot(df, aes(x=nodes, y=time, group=enableIO, color=enableIO)) +
geom_line() +
theme_bw() +
labs(x="Nodes", y="Time (s)", title="FWI strong scaling for mpi+send+oss+task",
subtitle=input_file) +
subtitle=output) +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position = c(0.5, 0.88))
@ -68,7 +69,7 @@ p = ggplot(df, aes(x=nodes, y=nxtime, group=enableIO, color=enableIO)) +
geom_line() +
theme_bw() +
labs(x="Nodes", y="Time * Nodes (s)", title="FWI strong scaling for mpi+send+oss+task",
subtitle=input_file) +
subtitle=output) +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position = c(0.5, 0.88))
@ -88,7 +89,7 @@ dev.off()
# geom_line() +
# theme_bw() +
# labs(x="Nodes", y="Median Time (s)", title="FWI strong scaling",
# subtitle=input_file) +
# subtitle=output) +
# theme(plot.subtitle=element_text(size=8)) +
# theme(legend.position = c(0.5, 0.88))
#
@ -108,7 +109,7 @@ dev.off()
# geom_line() +
# theme_bw() +
# labs(x="Nodes", y="Median Time * Nodes (s)", title="FWI strong scaling",
# subtitle=input_file) +
# subtitle=output) +
# theme(plot.subtitle=element_text(size=8)) +
# theme(legend.position = c(0.5, 0.88))
#

View File

@ -9,6 +9,7 @@ args = commandArgs(trailingOnly=TRUE)
# Set the input dataset if given in argv[1], or use "input" as default
if (length(args)>0) { input_file = args[1] } else { input_file = "input" }
if (length(args)>1) { output = args[2] } else { output = "?" }
df = jsonlite::stream_in(file(input_file), verbose=FALSE) %>%
@ -57,7 +58,7 @@ p = ggplot(df, aes(x=nodes, y=normalized.time)) +
facet_wrap(branch ~ .) +
labs(x="nodes", y="Normalized time",
title=sprintf("%s: normalized time", main_title),
subtitle=input_file) +
subtitle=output) +
theme(plot.subtitle=element_text(size=8))
ggsave("normalized.time.png", plot=p, width=w, height=h, dpi=dpi)
@ -72,7 +73,7 @@ p = ggplot(df, aes(x=nodes, y=time, color=gitBranch)) +
# facet_wrap(branch ~ .) +
labs(y="Time (s)",
title=sprintf("%s: time", main_title),
subtitle=input_file) +
subtitle=output) +
theme(plot.subtitle=element_text(size=8))
ggsave("time.png", plot=p, width=w, height=h, dpi=dpi)
@ -87,7 +88,7 @@ p = ggplot(df, aes(x=nodes, y=time.nodes, color=branch)) +
#facet_wrap(branch ~ .) +
labs(x="nodes", y="Time * nodes (s)",
title=sprintf("%s: time * nodes", main_title),
subtitle=input_file) +
subtitle=output) +
theme(plot.subtitle=element_text(size=8))
ggsave("time.nodes.png", plot=p, width=w, height=h, dpi=dpi)

View File

@ -9,6 +9,7 @@ args=commandArgs(trailingOnly=TRUE)
# Read the timetable from args[1]
input_file = "input.json"
if (length(args)>0) { input_file = args[1] }
if (length(args)>1) { output = args[2] } else { output = "?" }
# Load the dataset in NDJSON format
dataset = jsonlite::stream_in(file(input_file)) %>%
@ -49,7 +50,7 @@ heatmap_plot = function(df, colname, title) {
guides(fill = guide_colorbar(barwidth=12, title.vjust=0.8)) +
labs(x="cbs", y="rbs",
title=sprintf("Heat granularity: %s", title),
subtitle=input_file) +
subtitle=output) +
theme(legend.position="bottom")
k=1

View File

@ -9,6 +9,7 @@ args = commandArgs(trailingOnly=TRUE)
# Set the input dataset if given in argv[1], or use "input" as default
if (length(args)>0) { input_file = args[1] } else { input_file = "input" }
if (length(args)>1) { output = args[2] } else { output = "?" }
df = jsonlite::stream_in(file(input_file), verbose=FALSE) %>%
@ -47,7 +48,7 @@ p = ggplot(df, aes(x=cbs, y=normalized.time)) +
theme_bw() +
labs(y="Normalized time",
title="Heat granularity: normalized time",
subtitle=input_file) +
subtitle=output) +
theme(plot.subtitle=element_text(size=8))
ggsave("normalized.time.png", plot=p, width=w, height=h, dpi=dpi)
@ -60,7 +61,7 @@ p = ggplot(df, aes(x=cbs, y=time)) +
geom_line(aes(y=median.time, group=0)) +
theme_bw() +
labs(y="Time (s)", title="Heat granularity: time",
subtitle=input_file) +
subtitle=output) +
theme(plot.subtitle=element_text(size=8))
ggsave("time.png", plot=p, width=w, height=h, dpi=dpi)

View File

@ -10,6 +10,7 @@ args=commandArgs(trailingOnly=TRUE)
# Read the timetable from args[1]
input_file = "input.json"
if (length(args)>0) { input_file = args[1] }
if (length(args)>1) { output = args[2] } else { output = "?" }
# Load the dataset in NDJSON format
dataset = jsonlite::stream_in(file(input_file)) %>%
@ -62,7 +63,7 @@ heatmap_plot = function(df, colname, title) {
guides(fill = guide_colorbar(barwidth=12, title.vjust=0.8)) +
labs(x="cbs", y="rbs",
title=sprintf("Heat granularity: %s", title),
subtitle=input_file) +
subtitle=output) +
theme(legend.position="bottom")
k=1
@ -103,7 +104,7 @@ p = ggplot(df_square, aes(x=cbs, y=acc.time)) +
labels = c("Total time"), guide = "legend") +
labs(x="Blocksize (side)", y="Time (s)",
fill="Estimated", color="Direct measurement",
title="Heat granularity: time distribution", subtitle=input_file)
title="Heat granularity: time distribution", subtitle=output)
ggsave("area.time.png", plot=p, width=6, height=6, dpi=300)
ggsave("area.time.pdf", plot=p, width=6, height=6, dpi=300)
@ -115,7 +116,7 @@ p = ggplot(df_square, aes(x=cbs, y=acc.time)) +
theme(legend.position=c(0.5, 0.7)) +
labs(x="Blocksize (side)", y="Time (s)",
fill="Estimated", color="Direct measurement",
title="Heat granularity: time distribution", subtitle=input_file)
title="Heat granularity: time distribution", subtitle=output)
ggsave("col.time.png", plot=p, width=6, height=6, dpi=300)
ggsave("col.time.pdf", plot=p, width=6, height=6, dpi=300)

View File

@ -7,6 +7,7 @@ library(viridis, warn.conflicts = FALSE)
args = commandArgs(trailingOnly=TRUE)
if (length(args)>0) { input_file = args[1] } else { input_file = "input" }
if (length(args)>1) { output = args[2] } else { output = "?" }
df = jsonlite::stream_in(file(input_file), verbose=FALSE) %>%
@ -44,7 +45,7 @@ p = ggplot(df, aes(x=blocksPerCpu, y=normalized.time)) +
geom_hline(yintercept=c(-0.01, 0.01), linetype="dashed", color="red") +
theme_bw() +
labs(x="Blocks per CPU", y="Normalized time", title="HPCG granularity: normalized time",
subtitle=input_file) +
subtitle=output) +
theme(plot.subtitle=element_text(size=8))
ggsave("normalized.time.png", plot=p, width=w, height=h, dpi=dpi)
@ -54,7 +55,7 @@ p = ggplot(df, aes(x=blocksPerCpu, y=time)) +
geom_point(shape=21, size=3) +
theme_bw() +
labs(x="Blocks per CPU", y="Time (s)", title="HPCG granularity: time",
subtitle=input_file) +
subtitle=output) +
theme(plot.subtitle=element_text(size=8))
ggsave("time.png", plot=p, width=w, height=h, dpi=dpi)

View File

@ -7,6 +7,7 @@ library(viridis, warn.conflicts = FALSE)
args = commandArgs(trailingOnly=TRUE)
if (length(args)>0) { input_file = args[1] } else { input_file = "input" }
if (length(args)>1) { output = args[2] } else { output = "?" }
df = jsonlite::stream_in(file(input_file), verbose=FALSE) %>%
@ -62,7 +63,7 @@ p = ggplot(df, aes(x=sizePerCpu.z, y=time.nodes.elem)) +
theme_bw() +
labs(x="Size per CPU in Z", y="Time * nodes / spcz (s)",
title="HPCG size: time * nodes / spcz",
subtitle=input_file) +
subtitle=output) +
theme(plot.subtitle=element_text(size=8),
legend.position="bottom")

View File

@ -7,6 +7,7 @@ library(viridis, warn.conflicts = FALSE)
args = commandArgs(trailingOnly=TRUE)
if (length(args)>0) { input_file = args[1] } else { input_file = "input" }
if (length(args)>1) { output = args[2] } else { output = "?" }
df = jsonlite::stream_in(file(input_file), verbose=FALSE) %>%
@ -61,7 +62,7 @@ p = ggplot(df, aes(x=nodes, y=time.nodes)) +
theme_bw() +
labs(x="Nodes", y="Time * nodes (s)",
title="HPCG strong scalability in Z",
subtitle=input_file) +
subtitle=output) +
theme(plot.subtitle=element_text(size=8),
legend.position="bottom")
@ -73,7 +74,7 @@ p = ggplot(df, aes(x=nodes, y=time.sizeZ, fill=sizePerCpu.z)) +
theme_bw() +
labs(x="Nodes", y="Time / npcz (s)", title="HPCG strong scalability in Z",
color="Size per CPU in Z",
subtitle=input_file) +
subtitle=output) +
theme(plot.subtitle=element_text(size=8),
legend.position="bottom")

View File

@ -7,6 +7,7 @@ library(viridis, warn.conflicts = FALSE)
args = commandArgs(trailingOnly=TRUE)
if (length(args)>0) { input_file = args[1] } else { input_file = "input" }
if (length(args)>1) { output = args[2] } else { output = "?" }
df = jsonlite::stream_in(file(input_file), verbose=FALSE) %>%
@ -62,7 +63,7 @@ p = ggplot(df, aes(x=nodes, y=time, fill=sizePerCpu.z)) +
theme_bw() +
labs(x="Nodes", y="Time (s)", title="HPCG weak scaling in Z",
color="Size per CPU in Z",
subtitle=input_file) +
subtitle=output) +
theme(plot.subtitle=element_text(size=8),
legend.position="bottom")

View File

@ -7,6 +7,7 @@ library(viridis, warn.conflicts = FALSE)
# Load the arguments (argv)
args = commandArgs(trailingOnly=TRUE)
if (length(args)>0) { input_file = args[1] } else { input_file = "input" }
if (length(args)>1) { output = args[2] } else { output = "?" }
df = jsonlite::stream_in(file(input_file), verbose=FALSE) %>%
jsonlite::flatten() %>%
@ -38,7 +39,7 @@ p = ggplot(df, aes(x=blocksize, y=normalized.time, color=branch)) +
facet_wrap(~ branch) +
theme_bw() +
labs(x="Blocksize", y="Normalized Time", title="NBody Granularity: Normalized Time",
subtitle=input_file) +
subtitle=output) +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position="bottom") +
theme(legend.text = element_text(size=7))
@ -52,7 +53,7 @@ p = ggplot(df, aes(x=blocksize, y=time)) +
geom_boxplot() +
theme_bw() +
labs(x="Blocksize", y="Time (s)", title="NBody Granularity: Time",
subtitle=input_file) +
subtitle=output) +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position="bottom") +
theme(legend.text = element_text(size=7))

View File

@ -8,6 +8,7 @@ library(stringr)
# Load the arguments (argv)
args = commandArgs(trailingOnly=TRUE)
if (length(args)>0) { input_file = args[1] } else { input_file = "input" }
if (length(args)>1) { output = args[2] } else { output = "?" }
df = jsonlite::stream_in(file(input_file), verbose=FALSE) %>%
jsonlite::flatten() %>%
@ -60,7 +61,7 @@ p = ggplot(df, aes(x=blocksize, y=normalized.time, color=interleaveMem)) +
labs(x="Blocksize", y="Normalized time",
title=sprintf("NBody NUMA (%s | %d Nodes): Normalized time",
branch, nodes),
subtitle=input_file) +
subtitle=output) +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position="bottom")
@ -77,7 +78,7 @@ p = ggplot(df, aes(x=blocksize, y=time, color=interleaveMem)) +
labs(x="Blocksize", y="Time (s)",
title=sprintf("NBody NUMA (%s | %d Nodes): Time",
branch, nodes),
subtitle=input_file) +
subtitle=output) +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position="bottom")

View File

@ -9,6 +9,7 @@ args=commandArgs(trailingOnly=TRUE)
# Read the timetable from args[1]
input_file = "input.json"
if (length(args)>0) { input_file = args[1] }
if (length(args)>1) { output = args[2] } else { output = "?" }
# Load the dataset in NDJSON format
dataset = jsonlite::stream_in(file(input_file)) %>%
@ -79,7 +80,7 @@ p = ggplot(data=D, aes(x=blocksPerCpuFactor, y=tnorm, color=bad)) +
# Labels
labs(x="Blocks/CPU", y="Normalized time",
title=sprintf("Nbody normalized time. Particles=%d", particles),
subtitle=input_file) +
subtitle=output) +
# Center the title
@ -117,7 +118,7 @@ p1 = ggplot(D, aes(x=blocksizeFactor, y=time)) +
labs(x="Blocksize", y="Time (s)",
title=sprintf("Nbody granularity. Particles=%d", particles),
subtitle=input_file) +
subtitle=output) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
#theme(legend.position = c(0.5, 0.8)) +
@ -138,7 +139,7 @@ p2 = ggplot(D, aes(x=blocksPerCpuFactor, y=time)) +
labs(x="Blocks/CPU", y="Time (s)",
title=sprintf("Nbody granularity. Particles=%d", particles),
subtitle=input_file) +
subtitle=output) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +

View File

@ -8,6 +8,7 @@ args=commandArgs(trailingOnly=TRUE)
# Read the timetable from args[1]
input_file = "input.json"
if (length(args)>0) { input_file = args[1] }
if (length(args)>1) { output = args[2] } else { output = "?" }
# Load the dataset in NDJSON format
dataset = jsonlite::stream_in(file(input_file)) %>%
@ -50,7 +51,7 @@ p = ggplot(data=D, aes(x=blocksPerCpuFactor, y=tnorm)) +
# Labels
labs(x="Blocks/CPU", y="Normalized time",
title=sprintf("Nbody normalized time. Particles=%d", particles),
subtitle=input_file) +
subtitle=output) +
# Center the title
#theme(plot.title = element_text(hjust = 0.5)) +
@ -95,7 +96,7 @@ p = ggplot(D, aes(x=blocksPerCpuFactor, y=time, color=freeCpu)) +
labs(x="Blocks/CPU", y="Time (s)",
title=sprintf("Nbody granularity. Particles=%d", particles),
subtitle=input_file) +
subtitle=output) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position = c(0.5, 0.88)) +

View File

@ -8,6 +8,7 @@ args=commandArgs(trailingOnly=TRUE)
# Read the timetable from args[1]
input_file = "input.json"
if (length(args)>0) { input_file = args[1] }
if (length(args)>1) { output = args[2] } else { output = "?" }
# Load the dataset in NDJSON format
dataset = jsonlite::stream_in(file(input_file)) %>%
@ -52,7 +53,7 @@ p = ggplot(data=D, aes(x=nblocks, y=tnorm)) +
# Labels
labs(x="Num blocks", y="Normalized time",
title=sprintf("Nbody normalized time. Particles=%d", particles),
subtitle=input_file) +
subtitle=output) +
# Center the title
#theme(plot.title = element_text(hjust = 0.5)) +
@ -96,7 +97,7 @@ p = ggplot(D, aes(x=blocksPerCpu, y=time, color=jemalloc)) +
labs(x="Blocks/CPU", y="Time (s)",
title=sprintf("Nbody granularity. Particles=%d", particles),
subtitle=input_file) +
subtitle=output) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position = c(0.5, 0.88)) +

View File

@ -8,6 +8,7 @@ args=commandArgs(trailingOnly=TRUE)
# Read the timetable from args[1]
input_file = "input.json"
if (length(args)>0) { input_file = args[1] }
if (length(args)>1) { output = args[2] } else { output = "?" }
# Load the dataset in NDJSON format
dataset = jsonlite::stream_in(file(input_file)) %>%
@ -53,7 +54,7 @@ p = ggplot(data=D, aes(x=blocksPerCpuFactor, y=tnorm, color=bad)) +
# Labels
labs(x="Blocks/CPU", y="Normalized time",
title=sprintf("Nbody normalized time. Particles=%d", particles),
subtitle=input_file) +
subtitle=output) +
# Center the title
@ -94,7 +95,7 @@ p = ggplot(D, aes(x=blocksPerCpuFactor, y=time)) +
labs(x="Blocks/CPU", y="Time (s)",
title=sprintf("Nbody granularity. Particles=%d", particles),
subtitle=input_file) +
subtitle=output) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position = c(0.5, 0.88)) +

View File

@ -7,6 +7,7 @@ library(viridis, warn.conflicts = FALSE)
# Load the arguments (argv)
args = commandArgs(trailingOnly=TRUE)
if (length(args)>0) { input_file = args[1] } else { input_file = "input" }
if (length(args)>1) { output = args[2] } else { output = "?" }
df = jsonlite::stream_in(file(input_file), verbose=FALSE) %>%
jsonlite::flatten() %>%
@ -41,7 +42,7 @@ p = ggplot(df, aes(x=nodes, y=normalized.time, color=branch)) +
facet_wrap(~ branch) +
theme_bw() +
labs(x="Nodes", y="Normalized time (s)", title="NBody Scaling: Normalized Time",
subtitle=input_file) +
subtitle=output) +
theme(plot.subtitle=element_text(size=5)) +
theme(legend.position="bottom") +
theme(legend.text = element_text(size=7))
@ -56,7 +57,7 @@ p = ggplot(df, aes(x=nodes, y=time.nodes, color=branch)) +
geom_line(aes(y=median.time.nodes, group=branch)) +
theme_bw() +
labs(x="Nodes", y="Time * nodes (s)", title="NBody Scaling: Time * nodes",
subtitle=input_file) +
subtitle=output) +
theme(plot.subtitle=element_text(size=5)) +
theme(legend.position="bottom") +
theme(legend.text = element_text(size=7))

View File

@ -11,6 +11,7 @@ args=commandArgs(trailingOnly=TRUE)
# Read the timetable from args[1]
input_file = "input.json"
if (length(args)>0) { input_file = args[1] }
if (length(args)>1) { output = args[2] } else { output = "?" }
# Load the dataset in NDJSON format
dataset = jsonlite::stream_in(file(input_file), verbose=FALSE) %>%
@ -39,7 +40,7 @@ w=6
p = ggplot(data=df, aes(x=size, y=median.bw)) +
labs(x="Message size", y="Bandwidth (GB/s)",
#title=sprintf("OSU benchmark: osu_bw", nodes, tasksPerNode, cpusPerTask),
subtitle=gsub("-", "\uad", input_file)) +
subtitle=gsub("-", "\uad", output)) +
geom_line(aes(linetype=unitName)) +
geom_point(aes(shape=unitName), size=1.5) +
scale_shape_discrete(name = "MPI version") +
@ -73,7 +74,7 @@ ggsave("median-lines.pdf", plot=p, width=w, height=h, dpi=ppi)
p = ggplot(data=df, aes(x=size, y=bw)) +
labs(x="Message size", y="Bandwidth (MB/s)",
#title=sprintf("OSU benchmark: osu_bw", nodes, tasksPerNode, cpusPerTask),
subtitle=input_file) +
subtitle=output) +
geom_line(aes(y=median.bw, linetype=unitName, group=unitName)) +
geom_point(aes(shape=unitName), size=2) +
scale_shape(solid = FALSE) +

View File

@ -8,6 +8,7 @@ args=commandArgs(trailingOnly=TRUE)
# Read the timetable from args[1]
input_file = "input.json"
if (length(args)>0) { input_file = args[1] }
if (length(args)>1) { output = args[2] } else { output = "?" }
# Load the dataset in NDJSON format
dataset = jsonlite::stream_in(file(input_file), verbose=FALSE) %>%
@ -49,7 +50,7 @@ w=8
p = ggplot(data=df, aes(x=sizeKB, y=bw)) +
labs(x="Message size (KB)", y="Bandwidth (MB/s)",
title=sprintf("OSU benchmark: osu_bw --iterations %d", iterations),
subtitle=input_file) +
subtitle=output) +
geom_point(shape=21, size=3) +
geom_vline(aes(xintercept = PSM2_MQ_EAGER_SDMA_SZ/1024), color="blue") +
geom_vline(xintercept = 10, color="red") +

View File

@ -8,6 +8,7 @@ args=commandArgs(trailingOnly=TRUE)
# Read the timetable from args[1]
input_file = "input.json"
if (length(args)>0) { input_file = args[1] }
if (length(args)>1) { output = args[2] } else { output = "?" }
# Load the dataset in NDJSON format
dataset = jsonlite::stream_in(file(input_file), verbose=FALSE) %>%
@ -36,7 +37,7 @@ p = ggplot(data=df, aes(x=size, y=bw)) +
labs(x="Size (bytes)", y="Bandwidth (MB/s)",
title=sprintf("OSU bandwidth benchmark: nodes=%d tasksPerNode=%d cpusPerTask=%d",
nodes, tasksPerNode, cpusPerTask),
subtitle=input_file) +
subtitle=output) +
geom_boxplot(aes(color=threshold, group=interaction(threshold, sizeFactor))) +
scale_x_continuous(trans=log2_trans()) +
#scale_y_log10(breaks = breaks, minor_breaks = minor_breaks) +
@ -53,7 +54,7 @@ p = ggplot(data=df, aes(x=size, y=medianBw)) +
labs(x="Size (bytes)", y="Bandwidth (MB/s)",
title=sprintf("OSU benchmark: osu_bw",
nodes, tasksPerNode, cpusPerTask),
subtitle=input_file) +
subtitle=output) +
geom_line(aes(color=threshold, linetype=threshold)) +
geom_point(aes(color=threshold, shape=threshold)) +
geom_hline(yintercept = 100e3 / 8, color="red") +

View File

@ -9,6 +9,7 @@ args=commandArgs(trailingOnly=TRUE)
# Read the timetable from args[1]
input_file = "input.json"
if (length(args)>0) { input_file = args[1] }
if (length(args)>1) { output = args[2] } else { output = "?" }
# Load the dataset in NDJSON format
dataset = jsonlite::stream_in(file(input_file), verbose=FALSE) %>%
@ -39,7 +40,7 @@ w=6
p = ggplot(data=df, aes(x=size, y=medianLatency)) +
labs(x="Message size", y="Median latency (µs)",
#title=sprintf("OSU benchmark: osu_latency", nodes, tasksPerNode, cpusPerTask),
subtitle=gsub("-", "\uad", input_file)) +
subtitle=gsub("-", "\uad", output)) +
geom_line(aes(linetype=unitName)) +
geom_point(aes(shape=unitName), size=2) +
scale_y_log10(breaks = breaks, minor_breaks = minor_breaks) +
@ -59,7 +60,7 @@ ggsave("median-lines.pdf", plot=p, width=w, height=h, dpi=ppi)
p = ggplot(data=df, aes(x=size, y=latency)) +
labs(x="Size (bytes)", y="Latency (us)",
#title=sprintf("OSU benchmark: osu_latency", nodes, tasksPerNode, cpusPerTask),
subtitle=input_file) +
subtitle=output) +
geom_line(aes(y=medianLatency, linetype=unitName, group=unitName)) +
geom_point(aes(shape=unitName), size=2) +
scale_y_log10(breaks = breaks, minor_breaks = minor_breaks) +

View File

@ -8,6 +8,7 @@ args=commandArgs(trailingOnly=TRUE)
# Read the timetable from args[1]
input_file = "input.json"
if (length(args)>0) { input_file = args[1] }
if (length(args)>1) { output = args[2] } else { output = "?" }
# Load the dataset in NDJSON format
dataset = jsonlite::stream_in(file(input_file), verbose=FALSE) %>%
@ -55,7 +56,7 @@ p = ggplot(data=df, aes(x=sizeKB, y=bw)) +
geom_vline(aes(xintercept = PSM2_MTU.val/1024), color="red") +
labs(x="Message size (KiB)", y="Bandwidth (GB/s)",
#title=sprintf("OSU benchmark: osu_bw --iterations %d", iterations),
subtitle=gsub("-", "\uad", input_file)) +
subtitle=gsub("-", "\uad", output)) +
geom_point(shape=21, size=2) +
#annotate("text", x = 10.2, y = 8.5e3, label = "MTU = 10KB", color="red", hjust=0) +
facet_wrap(vars(PSM2_MTU), nrow=3, labeller = "label_both") +

View File

@ -9,6 +9,7 @@ args = commandArgs(trailingOnly=TRUE)
# Set the input dataset if given in argv[1], or use "input" as default
if (length(args)>0) { input_file = args[1] } else { input_file = "input" }
if (length(args)>1) { output = args[2] } else { output = "?" }
df = jsonlite::stream_in(file(input_file), verbose=FALSE) %>%
@ -72,7 +73,7 @@ p = ggplot(df, aes(x=nbly, y=normalized.time, fill=sizex)) +
facet_wrap(branch ~ .) +
labs(y="Normalized time",
title=sprintf("%s: normalized time", maintitle),
subtitle=input_file) +
subtitle=output) +
theme(plot.subtitle=element_text(size=8))
ggsave("normalized.time.png", plot=p, width=w, height=h, dpi=dpi)
@ -87,7 +88,7 @@ p = ggplot(df, aes(x=blocksPerCpu, y=time, color=sizex)) +
scale_x_continuous(trans=log2_trans()) +
labs(y="Time (s)",
title=sprintf("%s: time", maintitle),
subtitle=input_file) +
subtitle=output) +
theme(plot.subtitle=element_text(size=8))
ggsave("time.png", plot=p, width=w, height=h, dpi=dpi)

View File

@ -9,6 +9,7 @@ args = commandArgs(trailingOnly=TRUE)
# Set the input dataset if given in argv[1], or use "input" as default
if (length(args)>0) { input_file = args[1] } else { input_file = "input" }
if (length(args)>1) { output = args[2] } else { output = "?" }
df = jsonlite::stream_in(file(input_file), verbose=FALSE) %>%
@ -72,7 +73,7 @@ p = ggplot(df, aes(x=nodes, y=normalized.time, fill=sizex)) +
facet_wrap(branch ~ .) +
labs(x="nodes", y="Normalized time",
title=sprintf("%s: normalized time", maintitle),
subtitle=input_file) +
subtitle=output) +
theme(plot.subtitle=element_text(size=8))
ggsave("normalized.time.png", plot=p, width=w, height=h, dpi=dpi)
@ -87,7 +88,7 @@ p = ggplot(df, aes(x=nodes, y=time, color=sizex)) +
# facet_wrap(branch ~ .) +
labs(x="nodes", y="Time (s)",
title=sprintf("%s: time", maintitle),
subtitle=input_file) +
subtitle=output) +
theme(plot.subtitle=element_text(size=8))
ggsave("time.png", plot=p, width=w, height=h, dpi=dpi)
@ -102,7 +103,7 @@ p = ggplot(df, aes(x=nodes, y=time.nodes, color=sizex)) +
#facet_wrap(branch ~ .) +
labs(x="nodes", y="Time * nodes (s)",
title=sprintf("%s: time * nodes", maintitle),
subtitle=input_file) +
subtitle=output) +
theme(plot.subtitle=element_text(size=8))
ggsave("time.nodes.png", plot=p, width=w, height=h, dpi=dpi)

View File

@ -147,7 +147,7 @@ in stdenv.mkDerivation {
dataset="${dataset}"
ln -s $dataset input
Rscript --vanilla ${script} ${dataset}
Rscript --vanilla ${script} ${dataset} "$out"
if [ "''${dataset##*.}" == gz ]; then
gunzip --stdout $dataset