Archived
1
0
forked from rarias/bscpkgs

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:
2021-04-21 13:40:25 +02:00
parent 5a49611bf6
commit 92cd88e365
28 changed files with 88 additions and 61 deletions

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") +