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:
@@ -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)
|
||||
|
||||
@@ -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")
|
||||
|
||||
|
||||
@@ -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")
|
||||
|
||||
|
||||
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user