-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f4e9574
commit 62e3d75
Showing
7 changed files
with
172 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env Rscript | ||
library(plyr, warn.conflict = FALSE) | ||
library(dplyr, warn.conflict = FALSE) | ||
|
||
aggregator <- function(df) data.frame(AvgTime = mean(df$LabelProbTime, na.rm = TRUE)) | ||
load <- function(file) ddply(read.csv(file), "Graph", aggregator) | ||
|
||
mpi <- load("PlainMPI.csv") | ||
kamping <- load("KaMPIngWrapper.csv") | ||
kaminpar <- load("dKaMinParWrapper.csv") | ||
|
||
cat("PlainMPI:\t\t", mean(mpi$AvgTime), "\n") | ||
cat("KaMPIngWrapper:\t\t", mean(kamping$AvgTime), "\n") | ||
cat("dKaMinParWrapper:\t", mean(kaminpar$AvgTime), "\n") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: label_propagation | ||
executable: KaMPIngLabelPropagation | ||
ncores: [1, 2, 4, 8, 16, 48, 192, 768, 3072] | ||
time_limit: 60 | ||
threads_per_rank: [1] | ||
graphs: | ||
- generator: kagen | ||
type: rgg2d | ||
N: 20 | ||
M: 25 | ||
scale_weak: TRUE | ||
config: | ||
- preset: [mpi, kamping, kaminpar] | ||
k: [16] | ||
seed: [1, 2, 3] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env bash | ||
log_dir="${1:-"."}" | ||
|
||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
|
||
configs_for_algo() { | ||
cat $log_dir/config.json | \ | ||
jq ' to_entries | group_by(.value.preset) | map({key: .[0].value.preset, value: [.[] | .key]}) | from_entries' | jq -r " .[\"$1\"] | join (\" \")" | ||
} | ||
|
||
|
||
parse_logs() { | ||
gawk -f "$SCRIPT_DIR/parse_logfile.awk" <( | ||
for x in $(configs_for_algo $1); do | ||
for file in $log_dir/*-c$x-log.txt; do | ||
# echo $file | ||
echo "__BEGIN_FILE__" $(basename "$file") | ||
cat "$file" | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g" | ||
echo "__END_FILE__" | ||
done | ||
done | ||
) | ||
} | ||
|
||
parse_logs "mpi" > PlainMPI.csv | ||
parse_logs "kamping" > KaMPIngWrapper.csv | ||
parse_logs "kaminpar" > dKaMinParWrapper.csv | ||
|
||
exit 0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
# -*-awk-*- | ||
BEGIN { | ||
header() | ||
reset() | ||
} | ||
|
||
/__BEGIN_FILE__/ { | ||
sub(/__BEGIN_FILE__ /, "", $0) | ||
split($0, parts, "___") | ||
data["Graph"] = parts[1] | ||
|
||
split(parts[2], parts, "_") | ||
for (i in parts) { | ||
if (match(parts[i], /k([0-9]+)/, m)) { | ||
data["K"] = m[1] | ||
} else if (match(parts[i], /P([0-9]+)x([0-9]+)x([0-9]+)/, m)) { | ||
data["NumNodes"] = m[1] | ||
data["NumMPIsPerNode"] = m[2] | ||
data["NumThreadsPerMPI"] = m[3] | ||
} else if (match(parts[i], /seed([0-9]+)/, m)) { | ||
data["Seed"] = m[1] | ||
} else if (match(parts[i], /eps([0-9\.\-e]+)/, m)) { | ||
data["Epsilon"] = m[1] | ||
} | ||
} | ||
|
||
level = 0 | ||
} | ||
|
||
/__END_FILE__/ { | ||
yield() | ||
} | ||
|
||
match($0, /Number of global nodes: *([0-9]+)/, m) { | ||
data["N"] = m[1] | ||
} | ||
|
||
match($0, /Number of global edges: *([0-9]+)/, m) { | ||
data["M"] = m[1] | ||
} | ||
|
||
match($0, /Seed: *([0-9]+)/, m) { | ||
data["Seed"] = m[1] | ||
} | ||
|
||
match($0, /Partition summary:/, m) { | ||
Summary = 1 | ||
} | ||
|
||
match($0, /Imbalance: *([0-9\.\-e]+)/, m) { | ||
data["Balance"] = m[1] | ||
} | ||
|
||
match($0, /Edge cut: *([0-9]+)/, m) { | ||
data["Cut"] = m[1] | ||
} | ||
|
||
match($0, /\|- Partitioning: \.* ([0-9\.\-e]+) s/, m) { | ||
data["Time"] = m[1] | ||
} | ||
match($0, /`- Partitioning: \.* ([0-9\.\-e]+) s/, m) { | ||
data["Time"] = m[1] | ||
} | ||
|
||
match($0, /\|- Label propagation clustering: \.* ([0-9\.\-e]+) s/, m) { | ||
data["LPTime"] = m[1] | ||
} | ||
|
||
END { | ||
yield() | ||
} | ||
|
||
function header() { | ||
printf "Graph," | ||
printf "K," | ||
printf "Seed," | ||
printf "Cut," | ||
printf "Epsilon," | ||
printf "Balance," | ||
printf "TotalTime," | ||
printf "LabelProbTime," | ||
printf "NumNodes" | ||
printf "\n" | ||
} | ||
|
||
function yield() { | ||
if (length(data) == 0) { | ||
return | ||
} | ||
|
||
printf "%s,", data["Graph"] | ||
printf "%d,", data["K"] | ||
printf "%d,", data["Seed"] | ||
printf "%d,", data["Cut"] | ||
printf "%f,", data["Epsilon"] | ||
printf "%f,", data["Balance"] | ||
printf "%f,", data["Time"] | ||
printf "%f,", data["LPTime"] | ||
printf "%d", data["NumNodes"] | ||
printf "\n" | ||
|
||
reset() | ||
} | ||
|
||
function reset() { | ||
split("", data) | ||
} |