forked from rarias/bscpkgs
fwi: add strong scalability tests
This commit is contained in:
70
garlic/fig/fwi/granularity.R
Normal file
70
garlic/fig/fwi/granularity.R
Normal file
@@ -0,0 +1,70 @@
|
||||
library(ggplot2)
|
||||
library(dplyr)
|
||||
library(scales)
|
||||
library(jsonlite)
|
||||
|
||||
args=commandArgs(trailingOnly=TRUE)
|
||||
|
||||
# Read the timetable from args[1]
|
||||
input_file = "input.json"
|
||||
if (length(args)>0) { input_file = args[1] }
|
||||
|
||||
# Load the dataset in NDJSON format
|
||||
dataset = jsonlite::stream_in(file(input_file)) %>%
|
||||
jsonlite::flatten()
|
||||
|
||||
# We only need the nblocks and time
|
||||
df = select(dataset, config.blocksize, config.gitBranch, time) %>%
|
||||
rename(blocksize=config.blocksize, gitBranch=config.gitBranch) %>%
|
||||
group_by(blocksize, gitBranch) %>%
|
||||
mutate(mtime = median(time)) %>%
|
||||
ungroup()
|
||||
|
||||
df$gitBranch = as.factor(df$gitBranch)
|
||||
df$blocksize = as.factor(df$blocksize)
|
||||
|
||||
ppi=300
|
||||
h=5
|
||||
w=5
|
||||
|
||||
####################################################################
|
||||
### Line Graph
|
||||
####################################################################
|
||||
png("time.png", width=w*ppi, height=h*ppi, res=ppi)
|
||||
|
||||
## Create the plot with the normalized time vs nblocks
|
||||
p = ggplot(df, aes(x = blocksize, y=mtime, group=gitBranch, color=gitBranch)) +
|
||||
geom_point() +
|
||||
geom_line() +
|
||||
theme_bw() +
|
||||
labs(x="Blocksize", y="Median Time (s)", title="FWI granularity",
|
||||
subtitle=input_file) +
|
||||
theme(plot.subtitle=element_text(size=8)) +
|
||||
theme(legend.position = c(0.5, 0.88))
|
||||
|
||||
# Render the plot
|
||||
print(p)
|
||||
|
||||
# Save the png image
|
||||
dev.off()
|
||||
|
||||
####################################################################
|
||||
### Boxplot
|
||||
####################################################################
|
||||
png("box.png", width=w*ppi, height=h*ppi, res=ppi)
|
||||
# Create the plot with the normalized time vs nblocks
|
||||
p = ggplot(df, aes(x=blocksize, y=time, group=gitBranch, colour=gitBranch)) +
|
||||
# Labels
|
||||
labs(x="Blocksize", y="Normalized time",
|
||||
title=sprintf("FWI Time"),
|
||||
subtitle=input_file) +
|
||||
# Draw boxplots
|
||||
geom_boxplot() +
|
||||
theme_bw() +
|
||||
theme(plot.subtitle=element_text(size=8)) +
|
||||
theme(legend.position = c(0.5, 0.88))
|
||||
# Render the plot
|
||||
print(p)
|
||||
## Save the png image
|
||||
dev.off()
|
||||
|
||||
120
garlic/fig/fwi/strong_scaling.R
Normal file
120
garlic/fig/fwi/strong_scaling.R
Normal file
@@ -0,0 +1,120 @@
|
||||
library(ggplot2)
|
||||
library(dplyr)
|
||||
library(scales)
|
||||
library(jsonlite)
|
||||
|
||||
args=commandArgs(trailingOnly=TRUE)
|
||||
|
||||
# Read the timetable from args[1]
|
||||
input_file = "input.json"
|
||||
if (length(args)>0) { input_file = args[1] }
|
||||
|
||||
# Load the dataset in NDJSON format
|
||||
dataset = jsonlite::stream_in(file(input_file)) %>%
|
||||
jsonlite::flatten()
|
||||
|
||||
# Select block size to display
|
||||
useBlocksize = 1
|
||||
|
||||
# We only need the nblocks and time
|
||||
df = select(dataset, config.blocksize, config.gitBranch, config.nodes, time) %>%
|
||||
rename(
|
||||
blocksize=config.blocksize,
|
||||
gitBranch=config.gitBranch,
|
||||
nodes=config.nodes
|
||||
) %>%
|
||||
filter(blocksize == useBlocksize | blocksize == 0) %>%
|
||||
group_by(nodes, gitBranch) %>%
|
||||
mutate(mtime = median(time)) %>%
|
||||
mutate(nxmtime = mtime * nodes) %>%
|
||||
mutate(nxtime = time * nodes) %>%
|
||||
ungroup()
|
||||
|
||||
df$gitBranch = as.factor(df$gitBranch)
|
||||
df$blocksize = as.factor(df$blocksize)
|
||||
df$nodes = as.factor(df$nodes)
|
||||
|
||||
ppi=300
|
||||
h=5
|
||||
w=5
|
||||
|
||||
####################################################################
|
||||
### Line plot (time)
|
||||
####################################################################
|
||||
png("time.png", width=w*ppi, height=h*ppi, res=ppi)
|
||||
|
||||
p = ggplot(df, aes(x=nodes, y=time, group=gitBranch, color=gitBranch)) +
|
||||
geom_point() +
|
||||
geom_line() +
|
||||
theme_bw() +
|
||||
labs(x="Nodes", y="Time (s)", title="FWI strong scaling",
|
||||
subtitle=input_file) +
|
||||
theme(plot.subtitle=element_text(size=8)) +
|
||||
theme(legend.position = c(0.6, 0.75))
|
||||
|
||||
# Render the plot
|
||||
print(p)
|
||||
|
||||
# Save the png image
|
||||
dev.off()
|
||||
|
||||
####################################################################
|
||||
### Line plot (timei x nodes)
|
||||
####################################################################
|
||||
png("nxtime.png", width=w*ppi, height=h*ppi, res=ppi)
|
||||
|
||||
p = ggplot(df, aes(x=nodes, y=nxtime, group=gitBranch, color=gitBranch)) +
|
||||
geom_point() +
|
||||
geom_line() +
|
||||
theme_bw() +
|
||||
labs(x="Nodes", y="Time * Nodes (s)", title="FWI strong scaling",
|
||||
subtitle=input_file) +
|
||||
theme(plot.subtitle=element_text(size=8)) +
|
||||
theme(legend.position = c(0.15, 0.80)) +
|
||||
theme(legend.text = element_text(size = 7))
|
||||
|
||||
# Render the plot
|
||||
print(p)
|
||||
|
||||
# Save the png image
|
||||
dev.off()
|
||||
|
||||
####################################################################
|
||||
### Line plot (median time)
|
||||
####################################################################
|
||||
png("mediantime.png", width=w*ppi, height=h*ppi, res=ppi)
|
||||
|
||||
p = ggplot(df, aes(x=nodes, y=mtime, group=gitBranch, color=gitBranch)) +
|
||||
geom_point() +
|
||||
geom_line() +
|
||||
theme_bw() +
|
||||
labs(x="Nodes", y="Median Time (s)", title="FWI strong scaling",
|
||||
subtitle=input_file) +
|
||||
theme(plot.subtitle=element_text(size=8)) +
|
||||
theme(legend.position = c(0.5, 0.88))
|
||||
|
||||
# Render the plot
|
||||
print(p)
|
||||
|
||||
# Save the png image
|
||||
dev.off()
|
||||
|
||||
####################################################################
|
||||
### Line plot (nodes x median time)
|
||||
####################################################################
|
||||
png("nxmtime.png", width=w*ppi, height=h*ppi, res=ppi)
|
||||
|
||||
p = ggplot(df, aes(x=nodes, y=nxmtime, group=gitBranch, color=gitBranch)) +
|
||||
geom_point() +
|
||||
geom_line() +
|
||||
theme_bw() +
|
||||
labs(x="Nodes", y="Median Time * Nodes (s)", title="FWI strong scaling",
|
||||
subtitle=input_file) +
|
||||
theme(plot.subtitle=element_text(size=8)) +
|
||||
theme(legend.position = c(0.5, 0.88))
|
||||
|
||||
# Render the plot
|
||||
print(p)
|
||||
|
||||
# Save the png image
|
||||
dev.off()
|
||||
122
garlic/fig/fwi/strong_scaling_io.R
Normal file
122
garlic/fig/fwi/strong_scaling_io.R
Normal file
@@ -0,0 +1,122 @@
|
||||
library(ggplot2)
|
||||
library(dplyr)
|
||||
library(scales)
|
||||
library(jsonlite)
|
||||
library(forcats)
|
||||
|
||||
args=commandArgs(trailingOnly=TRUE)
|
||||
|
||||
# Read the timetable from args[1]
|
||||
input_file = "input.json"
|
||||
if (length(args)>0) { input_file = args[1] }
|
||||
|
||||
# Load the dataset in NDJSON format
|
||||
dataset = jsonlite::stream_in(file(input_file)) %>%
|
||||
jsonlite::flatten()
|
||||
|
||||
# We only need the nblocks and time
|
||||
df = select(dataset, config.blocksize, config.ioFreq, config.gitBranch, config.nodes, time) %>%
|
||||
rename(
|
||||
blocksize=config.blocksize,
|
||||
io=config.ioFreq,
|
||||
gitBranch=config.gitBranch,
|
||||
nodes=config.nodes
|
||||
) %>%
|
||||
filter(blocksize == 1) %>%
|
||||
group_by(nodes, gitBranch, io) %>%
|
||||
mutate(mtime = median(time)) %>%
|
||||
mutate(nxmtime = mtime * nodes) %>%
|
||||
mutate(nxtime = time * nodes) %>%
|
||||
ungroup()
|
||||
|
||||
df$gitBranch = as.factor(df$gitBranch)
|
||||
df$io = as.factor(df$io)
|
||||
df$blocksize = as.factor(df$blocksize)
|
||||
df$nodes = as.factor(df$nodes)
|
||||
|
||||
df$io = fct_recode(df$io, enabled = "-1", disabled = "9999")
|
||||
|
||||
|
||||
ppi=300
|
||||
h=5
|
||||
w=5
|
||||
|
||||
####################################################################
|
||||
### Line plot (time)
|
||||
####################################################################
|
||||
png("time.png", width=w*ppi, height=h*ppi, res=ppi)
|
||||
|
||||
p = ggplot(df, aes(x=nodes, y=time, group=io, color=io)) +
|
||||
geom_point() +
|
||||
geom_line() +
|
||||
theme_bw() +
|
||||
labs(x="Nodes", y="Time (s)", title="FWI strong scaling for mpi+send+oss+task",
|
||||
subtitle=input_file) +
|
||||
theme(plot.subtitle=element_text(size=8)) +
|
||||
theme(legend.position = c(0.5, 0.88))
|
||||
|
||||
# Render the plot
|
||||
print(p)
|
||||
|
||||
# Save the png image
|
||||
dev.off()
|
||||
|
||||
####################################################################
|
||||
### Line plot (time x nodes)
|
||||
####################################################################
|
||||
png("nxtime.png", width=w*ppi, height=h*ppi, res=ppi)
|
||||
|
||||
p = ggplot(df, aes(x=nodes, y=nxtime, group=io, color=io)) +
|
||||
geom_point() +
|
||||
geom_line() +
|
||||
theme_bw() +
|
||||
labs(x="Nodes", y="Time * Nodes (s)", title="FWI strong scaling for mpi+send+oss+task",
|
||||
subtitle=input_file) +
|
||||
theme(plot.subtitle=element_text(size=8)) +
|
||||
theme(legend.position = c(0.5, 0.88))
|
||||
|
||||
# Render the plot
|
||||
print(p)
|
||||
|
||||
# Save the png image
|
||||
dev.off()
|
||||
|
||||
#####################################################################
|
||||
#### Line plot (median time)
|
||||
#####################################################################
|
||||
#png("mediantime.png", width=w*ppi, height=h*ppi, res=ppi)
|
||||
#
|
||||
#p = ggplot(df, aes(x=nodes, y=mtime, group=gitBranch, color=gitBranch)) +
|
||||
# geom_point() +
|
||||
# geom_line() +
|
||||
# theme_bw() +
|
||||
# labs(x="Nodes", y="Median Time (s)", title="FWI strong scaling",
|
||||
# subtitle=input_file) +
|
||||
# theme(plot.subtitle=element_text(size=8)) +
|
||||
# theme(legend.position = c(0.5, 0.88))
|
||||
#
|
||||
## Render the plot
|
||||
#print(p)
|
||||
#
|
||||
## Save the png image
|
||||
#dev.off()
|
||||
#
|
||||
#####################################################################
|
||||
#### Line plot (nodes x median time)
|
||||
#####################################################################
|
||||
#png("nxmtime.png", width=w*ppi, height=h*ppi, res=ppi)
|
||||
#
|
||||
#p = ggplot(df, aes(x=nodes, y=nxmtime, group=gitBranch, color=gitBranch)) +
|
||||
# geom_point() +
|
||||
# geom_line() +
|
||||
# theme_bw() +
|
||||
# labs(x="Nodes", y="Median Time * Nodes (s)", title="FWI strong scaling",
|
||||
# subtitle=input_file) +
|
||||
# theme(plot.subtitle=element_text(size=8)) +
|
||||
# theme(legend.position = c(0.5, 0.88))
|
||||
#
|
||||
## Render the plot
|
||||
#print(p)
|
||||
#
|
||||
## Save the png image
|
||||
#dev.off()
|
||||
@@ -62,7 +62,10 @@ in
|
||||
};
|
||||
|
||||
fwi = with exp.fwi; {
|
||||
test = stdPlot ./fwi/test.R [ test ];
|
||||
test = stdPlot ./fwi/test.R [ test ];
|
||||
strong_scaling = stdPlot ./fwi/strong_scaling.R [ strong_scaling_task strong_scaling_forkjoin strong_scaling_mpionly ];
|
||||
strong_scaling_io = stdPlot ./fwi/strong_scaling_io.R [ strong_scaling_io ];
|
||||
granularity = stdPlot ./fwi/granularity.R [ granularity ];
|
||||
};
|
||||
|
||||
osu = with exp.osu; {
|
||||
|
||||
Reference in New Issue
Block a user