Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compare local and weekly benchmarks using Hatchet #1317

Open
wants to merge 59 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
b875eb6
starter script
chapman39 Dec 11, 2024
504f355
get working with some of our cali files
chapman39 Dec 11, 2024
74e41cf
Merge remote-tracking branch 'origin/develop' into feature/chapman39/…
chapman39 Dec 18, 2024
4a3cb2a
small comment
chapman39 Dec 18, 2024
25e480c
update uberenv
chapman39 Dec 20, 2024
4ba6df0
update radiuss-spack-configs
chapman39 Dec 21, 2024
90fa3c6
undo
chapman39 Dec 21, 2024
48aa032
Merge remote-tracking branch 'origin/develop' into feature/chapman39/…
chapman39 Jan 2, 2025
b8cf7eb
experimenting
chapman39 Jan 17, 2025
f1986d5
add main tracking
chapman39 Jan 17, 2025
594b317
Merge remote-tracking branch 'origin/develop' into feature/chapman39/…
chapman39 Jan 22, 2025
d1acac7
setting up graph frames
chapman39 Jan 23, 2025
57d9038
starting to generate diff graph frames (not working)
chapman39 Jan 23, 2025
85850aa
print benchmark comparison results nicely
chapman39 Jan 23, 2025
cb4f2fa
a
chapman39 Jan 23, 2025
ffe4672
comment
chapman39 Jan 23, 2025
e48b41a
filter by compiler as well for ruby case
chapman39 Jan 24, 2025
4dfae88
seconds
chapman39 Jan 24, 2025
ad7e181
Improve handling of cmake build type
chapman39 Jan 28, 2025
36fd003
manual ci pipeline to compare benchmarks
chapman39 Jan 28, 2025
d0c709c
revert uberenv
chapman39 Jan 28, 2025
c79f38d
fix name
chapman39 Jan 29, 2025
8b9bf8d
fix path
chapman39 Jan 29, 2025
51cc89d
test
chapman39 Jan 29, 2025
a3346df
revert
chapman39 Jan 29, 2025
e16d256
comparison docs
chapman39 Jan 29, 2025
dc887f6
add main to benchmark
chapman39 Jan 29, 2025
a6ef640
Merge branch 'develop' into feature/chapman39/hatchet
chapman39 Jan 29, 2025
326bfa7
show baseline and current times, add depth and metric column option, …
chapman39 Jan 29, 2025
6c7019c
Merge branch 'feature/chapman39/hatchet' of github.com:LLNL/serac int…
chapman39 Jan 29, 2025
295066d
fix ci?
chapman39 Jan 29, 2025
e6dbb67
verbose ci, better table, more docs
chapman39 Jan 29, 2025
6cde9e1
cleanup
chapman39 Jan 29, 2025
fa6f21b
wording
chapman39 Jan 29, 2025
ac49930
update arg name
chapman39 Jan 29, 2025
ea0e462
stop lassen comparison builds
chapman39 Jan 30, 2025
6c2a264
attempt at new comparison workflow
chapman39 Feb 3, 2025
879ace0
take 2
chapman39 Feb 3, 2025
78a14fe
add needs section
chapman39 Feb 3, 2025
cdd5e67
try to use stages again
chapman39 Feb 3, 2025
a7c64e6
try a different needs
chapman39 Feb 3, 2025
875685d
okay for real this time
chapman39 Feb 3, 2025
c5ef0ef
fix dependencies formatting
chapman39 Feb 3, 2025
cf02f2a
spell out full benchmark names for dependencies
chapman39 Feb 3, 2025
6b6ac0e
try again
chapman39 Feb 3, 2025
6a01ade
remove needs
chapman39 Feb 3, 2025
9ca4bb5
more generic name
chapman39 Feb 3, 2025
30aac41
debug comparison benchmark pipeline
chapman39 Feb 3, 2025
2edfebf
make spot dir
chapman39 Feb 3, 2025
ed16614
small things
chapman39 Feb 4, 2025
23baa76
Merge remote-tracking branch 'origin/develop' into feature/chapman39/…
chapman39 Feb 4, 2025
fdf14b0
dumb mistake
chapman39 Feb 4, 2025
137a2f9
for real this time 2
chapman39 Feb 4, 2025
141b8bc
fix mkdir error
chapman39 Feb 4, 2025
c8e8fe9
proper mkdir force arg -p
chapman39 Feb 4, 2025
946e353
filter baseline gf's by configurations available in current
chapman39 Feb 5, 2025
207caba
no need for `find`
chapman39 Feb 5, 2025
903bbc9
Update src/docs/sphinx/dev_guide/profiling.rst
chapman39 Feb 6, 2025
06ee278
Update src/docs/sphinx/dev_guide/profiling.rst
chapman39 Feb 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 41 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,52 @@ variables:
BUILD_ROOT: ${CI_PROJECT_DIR}
FULL_BUILD_ROOT: ${CI_BUILDS_DIR}/serac/${CI_JOB_NAME}
ALLOC_BANK: eng
SPOT_DIR: ${BUILD_ROOT}/califiles

# Whether and how to update uberenv
.run_update_uberenv: &run_update_uberenv |
[[ -n "${UPDATE_UBERENV}" ]] && ./scripts/gitlab/update-uberenv.sh "${UPDATE_UBERENV}"

stages:
- src
- full
- benchmarks
- comparison

# Run src build each push
.src_workflow:
stage: src
rules:
- if: $SERAC_CI_WORKFLOW_TYPE != "full" && $SERAC_CI_WORKFLOW_TYPE != "benchmarks"
- if: $SERAC_CI_WORKFLOW_TYPE != "full" &&
$SERAC_CI_WORKFLOW_TYPE != "benchmarks" &&
$SERAC_CI_WORKFLOW_TYPE != "comparison"

# Run full build as a nightly scheduled pipeline
.full_workflow:
stage: full
rules:
- if: $SERAC_CI_WORKFLOW_TYPE == "full"

# Run benchmarks build as a weekly scheduled pipeline
# or, run benchmarks and save them in tmp location for comparison
.benchmarks_workflow:
stage: benchmarks
rules:
- if: $SERAC_CI_WORKFLOW_TYPE == "benchmarks"
variables:
# Note: make sure this matches what's in common_build_functions.py!
SPOT_DIR: /usr/workspace/smithdev/califiles/serac
- if: $SERAC_CI_WORKFLOW_TYPE == "comparison"

# Compare caliper files (generated from .benchmarks_workflow) against develop
.comparison_workflow:
stage: comparison
rules:
- if: $SERAC_CI_WORKFLOW_TYPE == "comparison"
dependencies:
- blueos-clang_10_0_1-benchmarks
- toss4-gcc_10_3_1-benchmarks
- toss4-clang_14_0_6-benchmarks

####
# Templates
Expand Down Expand Up @@ -73,21 +100,31 @@ variables:
reports:
junit: ${FULL_BUILD_ROOT}/${SYS_TYPE}/*/_serac_build_and_test_*/build-*/junit.xml


.benchmarks_build_script:
script:
# Builds src, runs benchmarks, and stores Caliper files in shared location
- echo -e "section_start:$(date +%s):benchmarks_build\r\e[0K
Benchmarks Build ${CI_PROJECT_NAME}"
- ${ALLOC_COMMAND} python3 scripts/llnl/run_benchmarks.py
- mkdir ${SPOT_DIR}
- ${ALLOC_COMMAND} python3 scripts/llnl/run_benchmarks.py --spot-dir ${SPOT_DIR}
- echo -e "section_end:$(date +%s):benchmarks_build\r\e[0K"
artifacts:
expire_in: 2 weeks
when: always
paths:
- _serac_build_and_test_*/output.log*.txt
- _serac_build_and_test_*/build-*/output.log*.txt
- _serac_build_and_test_*/build-*/*.cali
- ${SPOT_DIR}/*.cali

.comparison_build_script:
script:
# Takes Caliper files from previous jobs and performs benchmark analysis
- echo -e "section_start:$(date +%s):comparison\r\e[0K
Comparison Build ${CI_PROJECT_NAME}"
- ls ${SPOT_DIR}
- ls ${SPOT_DIR} | wc -l
- ${ALLOC_COMMAND} python3 scripts/llnl/compare_benchmarks.py --current-cali-dir ${SPOT_DIR} --verbose
- echo -e "section_end:$(date +%s):comparison\r\e[0K"

# This is where jobs are included for each system
include:
Expand Down
3 changes: 0 additions & 3 deletions .gitlab/build_blueos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,12 @@
# Template
.src_build_on_blueos:
extends: [.src_build_script, .on_blueos, .src_workflow]
needs: []

.full_build_on_blueos:
extends: [.full_build_script, .on_blueos, .full_workflow]
needs: []

.benchmarks_build_on_blueos:
extends: [.benchmarks_build_script, .on_blueos, .benchmarks_workflow]
needs: []

####
# Build jobs
Expand Down
13 changes: 10 additions & 3 deletions .gitlab/build_toss4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,18 @@
# Templates
.src_build_on_toss4:
extends: [.src_build_script, .on_toss4, .src_workflow]
needs: []

.full_build_on_toss4:
extends: [.full_build_script, .on_toss4, .full_workflow]
needs: []
before_script:
# LC version of pip is ancient
- if [[ $(python3 -c 'import pip; print(pip.__version__ < "19.3")') == "True" ]]; then python3 -m pip install --user --upgrade pip; fi

.benchmarks_build_on_toss4:
extends: [.benchmarks_build_script, .on_toss4, .benchmarks_workflow]
needs: []

.comparison_build_on_toss4:
extends: [.comparison_build_script, .on_toss4, .comparison_workflow]

####
# Build jobs
Expand Down Expand Up @@ -113,3 +112,11 @@ toss4-gcc_10_3_1-benchmarks:
ALLOC_TIME: "120"
ALLOC_DEADLINE: "180"
extends: .benchmarks_build_on_toss4

# This comparison job simply runs Hatchet and compares against benchmarks generated across all configurations
toss4-comparison:
variables:
ALLOC_NODES: "1"
ALLOC_TIME: "30"
ALLOC_DEADLINE: "45"
extends: .comparison_build_on_toss4
4 changes: 0 additions & 4 deletions .gitlab/build_toss4_cray.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,15 @@
# Templates
.src_build_on_toss4_cray:
extends: [.src_build_script, .on_toss4_cray, .src_workflow]
needs: []

.full_build_on_toss4_cray:
extends: [.full_build_script, .on_toss4_cray, .full_workflow]
needs: []
before_script:
# LC version of pip is ancient
- if [[ $(python3 -c 'import pip; print(pip.__version__ < "19.3")') == "True" ]]; then python3 -m pip install --user --upgrade pip; fi

.benchmarks_build_on_toss4_cray:
extends: [.benchmarks_build_script, .on_toss4_cray, .benchmarks_workflow]
needs: []


####
# Build jobs
Expand Down
17 changes: 12 additions & 5 deletions config-build.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ def parse_arguments():
"--buildtype",
type=str,
choices=["Release", "Debug", "RelWithDebInfo", "MinSizeRel"],
default="Debug",
help="build type.")
help="build type. defaults to Debug")

parser.add_argument("-e",
"--eclipse",
Expand Down Expand Up @@ -105,8 +104,6 @@ def parse_arguments():
action='store_true',
help="use ninja generator to build serac instead of make")



args, unknown_args = parser.parse_known_args()
if unknown_args:
print("[config-build]: Passing the following arguments directly to cmake... %s" % unknown_args)
Expand Down Expand Up @@ -230,6 +227,7 @@ def create_cmake_command_line(args, unknown_args, buildpath, installpath, hostco

# Add build type (opt or debug)
cmakeline += " -DCMAKE_BUILD_TYPE=" + args.buildtype

# Set install dir
cmakeline += " -DCMAKE_INSTALL_PREFIX=%s" % installpath

Expand Down Expand Up @@ -277,7 +275,7 @@ def run_cmake(buildpath, cmakeline):
# Main
############################
def main():
repodir = os.path.abspath(os.path.dirname(__file__))
repodir = os.path.abspath(os.path.dirname(__file__))
assert os.path.abspath(os.getcwd())==repodir, "config-build must be run from %s" % repodir

args, unknown_args = parse_arguments()
Expand All @@ -295,6 +293,15 @@ def main():
else:
return False

# CMake build type is Debug by default, but if CMAKE_BUILD_TYPE is an unknown argument (i.e. a CMake argument), then
# use that option instead.
if args.buildtype == None:
args.buildtype = "Debug"
for unknown_arg in unknown_args:
if "-DCMAKE_BUILD_TYPE" in unknown_arg:
args.buildtype = unknown_arg.split("=")[1]
break

basehostconfigpath = find_host_config(args, repodir)
platform_info = get_platform_info(basehostconfigpath)
buildpath = setup_build_dir(args, platform_info)
Expand Down
Loading