Skip to content

Commit

Permalink
add scripts for stream
Browse files Browse the repository at this point in the history
---
Signed-off-by: Andy Stone <[email protected]>
  • Loading branch information
stonea committed Apr 8, 2024
1 parent 152a278 commit f525a57
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/release/examples/benchmarks/hpcc/stream.plot.drive.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

set -x -e
"$CHPL_HOME/util/test/chplExperiment" \
--skip-if-config-error --paint-with ./stream.plot.paint.py \
\
`#name features options command` \
`#-------------------------------------------------------------------------` \
chpl gasnet ./stream.plot.gather.bash
37 changes: 37 additions & 0 deletions test/release/examples/benchmarks/hpcc/stream.plot.gather.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env bash

# sets 'datFile', 'logDir', 'experimentName', and 'runLog'
source $CHPL_HOME/util/test/chplExperimentGatherUtils/prelude.bash $@

CHPLEXP_MAX_LOCALES=32
locales=( 2 4 8 16 32 64 128 256 512 1024)
if [ ! -z "$CHPLEXP_MAX_LOCALES" ]; then
filtered_locales=()
for value in "${locales[@]}"; do
((value <= $CHPLEXP_MAX_LOCALES)) && filtered_locales+=("$value")
done
locales=("${filtered_locales[@]}")
fi
echo "LOCALES TO CHECK: ${locales[@]}"

# -----------------------------------------------------------------------------
# Build Chapel code
# -----------------------------------------------------------------------------
chpl --fast stream.chpl

# -----------------------------------------------------------------------------
# Run Chapel trials
# -----------------------------------------------------------------------------
for x in "${locales[@]}"; do
runAndLog ./stream -nl $x --m 5723827200
done

# -----------------------------------------------------------------------------
# Collect data; store in results.dat
# -----------------------------------------------------------------------------
data=$(cat $runLog | sed -r -n 's/Performance \(GB\/s\) = //p')
set +x
echo -e "\t$experimentName" > $datFile
paste \
<(printf "%s\n" "${locales[@]}") \
<(printf "%s\n" "${data[@]}") >> "$datFile"
12 changes: 12 additions & 0 deletions test/release/examples/benchmarks/hpcc/stream.plot.paint.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env python3

import sys, os
sys.path.append(os.path.join(os.environ['CHPL_HOME'], 'util', 'test'))
from chpl_plot import *

tbls = load_tables()

tbls.plot(
title="STREAM Performance (GB/s)",
xlabel="Locales",
ylabel="GB/s")

0 comments on commit f525a57

Please sign in to comment.