-
Notifications
You must be signed in to change notification settings - Fork 33
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
Run benchmarks weekly in CI #1245
Open
chapman39
wants to merge
21
commits into
develop
Choose a base branch
from
feature/chapman39/run-benchmarks-ci
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+230
−41
Open
Changes from 2 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
5110a63
Create run benchmarks script and setup in CI
chapman39 f1e6916
Use environment variables for host configs and cmake args
chapman39 a6702b1
find host config path
chapman39 7c95a15
Mention path to shared caliper files
chapman39 1a1097b
increase ci benchmark alloc time
chapman39 0e93214
Check if petsc is enabled before running petsc multigrid
chapman39 8849962
return result of benchmarks
chapman39 77706dd
increase deadline time to allow for longer jobs to stay on the queue …
chapman39 e5af250
Merge remote-tracking branch 'origin/develop' into feature/chapman39/…
chapman39 5d266ef
Ensure all cray jobs are disabled until all developers have access
chapman39 d0fd0c3
increase alloc time on benchmarks now that they take longer
chapman39 cbcc38f
add alloc_deadline variable to all toss4 jobs
chapman39 9d95042
Merge branch 'develop' into feature/chapman39/run-benchmarks-ci
chapman39 f337dde
build benchmarks as release
chapman39 dd05693
Merge branch 'feature/chapman39/run-benchmarks-ci' of github.com:LLNL…
chapman39 faf3ff9
increase benchmark ctests to be 1.5 hours per job
chapman39 cfd2d33
Merge branch 'develop' into feature/chapman39/run-benchmarks-ci
chapman39 2ba2921
comment
chapman39 1853080
Merge branch 'feature/chapman39/run-benchmarks-ci' of github.com:LLNL…
chapman39 935cfbb
Merge branch 'develop' into feature/chapman39/run-benchmarks-ci
chapman39 9c1b3e4
set property to actual test not exec
chapman39 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -37,6 +37,10 @@ | |
extends: [.full_build_script, .on_blueos, .full_workflow] | ||
needs: [] | ||
|
||
.benchmarks_build_on_blueos: | ||
extends: [.benchmarks_build_script, .on_blueos, .benchmarks_workflow] | ||
needs: [] | ||
|
||
#### | ||
# Build jobs | ||
blueos-clang_10_0_1-src: | ||
|
@@ -58,3 +62,11 @@ blueos-clang_10_0_1-full: | |
ALLOC_NODES: "1" | ||
ALLOC_TIME: "55" | ||
extends: [.full_build_on_blueos, .with_cuda] | ||
|
||
blueos-clang_10_0_1-benchmarks: | ||
variables: | ||
COMPILER: "[email protected]" | ||
HOST_CONFIG: "lassen-blueos_3_ppc64le_ib_p9-${COMPILER}_cuda.cmake" | ||
ALLOC_NODES: "1" | ||
ALLOC_TIME: "30" | ||
extends: [.benchmarks_build_on_blueos, .with_cuda] |
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 |
---|---|---|
|
@@ -28,6 +28,10 @@ | |
# 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: [] | ||
|
||
|
||
#### | ||
# Build jobs | ||
|
@@ -76,7 +80,6 @@ toss4-clang_14_0_6-full: | |
SPEC: "--spec=%${COMPILER}" | ||
ALLOC_NODES: "1" | ||
ALLOC_TIME: "45" | ||
EXTRA_CMAKE_OPTIONS: "-DENABLE_BENCHMARKS=ON" | ||
extends: .full_build_on_toss4 | ||
|
||
toss4-gcc_10_3_1-full: | ||
|
@@ -85,5 +88,20 @@ toss4-gcc_10_3_1-full: | |
SPEC: "--spec=%${COMPILER}" | ||
ALLOC_NODES: "1" | ||
ALLOC_TIME: "45" | ||
EXTRA_CMAKE_OPTIONS: "-DENABLE_BENCHMARKS=ON" | ||
extends: .full_build_on_toss4 | ||
|
||
toss4-clang_14_0_6-benchmarks: | ||
variables: | ||
COMPILER: "[email protected]" | ||
HOST_CONFIG: "ruby-toss_4_x86_64_ib-${COMPILER}.cmake" | ||
ALLOC_NODES: "1" | ||
ALLOC_TIME: "30" | ||
extends: .benchmarks_build_on_toss4 | ||
|
||
toss4-gcc_10_3_1-benchmarks: | ||
variables: | ||
COMPILER: "[email protected]" | ||
HOST_CONFIG: "ruby-toss_4_x86_64_ib-${COMPILER}.cmake" | ||
ALLOC_NODES: "1" | ||
ALLOC_TIME: "30" | ||
extends: .benchmarks_build_on_toss4 |
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 |
---|---|---|
|
@@ -25,6 +25,10 @@ | |
# 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 | ||
|
@@ -41,9 +45,14 @@ toss4_cray-clang_17_0_0-src: | |
|
||
toss4_cray-clang_17_0_0-full: | ||
variables: | ||
COMPILER: "[email protected]" | ||
SPEC: "--spec=%${COMPILER}" | ||
ALLOC_NODES: "1" | ||
ALLOC_TIME: "45" | ||
EXTRA_CMAKE_OPTIONS: "-DENABLE_BENCHMARKS=ON" | ||
extends: .full_build_on_toss4_cray | ||
|
||
toss4_cray-clang_17_0_0-benchmarks: | ||
variables: | ||
COMPILER: "[email protected]" | ||
HOST_CONFIG: "tioga-toss_4_x86_64_ib_cray-${COMPILER}_hip.cmake" | ||
ALLOC_NODES: "1" | ||
ALLOC_TIME: "30" | ||
extends: .benchmarks_build_on_toss4_cray |
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,109 @@ | ||
#!/bin/sh | ||
"exec" "python3" "-u" "-B" "$0" "$@" | ||
|
||
# Copyright (c) 2019-2024, Lawrence Livermore National Security, LLC and | ||
# other Serac Project Developers. See the top-level LICENSE file for details. | ||
# | ||
# SPDX-License-Identifier: (BSD-3-Clause) | ||
|
||
""" | ||
file: run_benchmarks.py | ||
|
||
description: | ||
Run benchmarks and update shared (or any desired) location with new Caliper files | ||
|
||
""" | ||
|
||
from common_build_functions import * | ||
|
||
from argparse import ArgumentParser | ||
|
||
import os | ||
|
||
|
||
def parse_args(): | ||
"Parses args from command line" | ||
parser = ArgumentParser() | ||
parser.add_argument("-e", "--extra-cmake-options", | ||
dest="extra_cmake_options", | ||
default=os.environ.get("EXTRA_CMAKE_OPTIONS", ""), | ||
help="Extra cmake options to add to the cmake configure line. Note '-DENABLE_BENCHMARKS=ON -DENABLE_DOCS=OFF' is always appended.") | ||
parser.add_argument("-hc", "--host-config", | ||
dest="host_config", | ||
default=os.environ.get("HOST_CONFIG", None), | ||
help="Specific host-config file to build (defaults to HOST_CONFIG environment variable)") | ||
parser.add_argument("-sd", "--spot-directory", | ||
dest="spot_dir", | ||
default=get_shared_spot_dir(), | ||
help="Where to put all resulting caliper files to use for SPOT analysis (defaults to a shared location)") | ||
parser.add_argument("-t", "--timestamp", | ||
dest="timestamp", | ||
default=get_timestamp(), | ||
help="Set timestamp manually for debugging") | ||
|
||
# Parse args | ||
args, extra_args = parser.parse_known_args() | ||
args = vars(args) | ||
|
||
# Verify args | ||
if args["host_config"] is None: | ||
print("[ERROR: Both host_config argument and HOST_CONFIG environment variable unset!]") | ||
sys.exit(1) | ||
|
||
if not os.path.exists(args["host_config"]): | ||
print("[ERROR: Host config path does not exist: %s]" % args["host_config"]) | ||
sys.exit(1) | ||
|
||
return args | ||
|
||
|
||
def main(): | ||
# Args | ||
args = parse_args() | ||
cmake_options = args["extra_cmake_options"] + " -DENABLE_BENCHMARKS=ON -DENABLE_DOCS=OFF" | ||
host_config = args["host_config"] | ||
spot_dir = args["spot_dir"] | ||
timestamp = args["timestamp"] | ||
|
||
# Vars | ||
repo_dir = get_repo_dir() | ||
test_root = get_build_and_test_root(repo_dir, timestamp) | ||
host_config_root = get_host_config_root(host_config) | ||
benchmarks_output_file = os.path.join(test_root, "output.log.%s.benchmarks.txt" % host_config_root) | ||
|
||
# Build Serac | ||
os.chdir(repo_dir) | ||
os.makedirs(test_root, exist_ok=True) | ||
build_and_test_host_config(test_root=test_root, host_config=host_config, | ||
report_to_stdout=True, extra_cmake_options=cmake_options, | ||
skip_install=True, skip_tests=True) | ||
|
||
# Go to build location | ||
build_dir="" | ||
dirs = glob.glob(pjoin(test_root, "*")) | ||
for dir in dirs: | ||
if os.path.exists(dir) and "build-" in dir: | ||
build_dir=dir | ||
os.chdir(build_dir) | ||
|
||
# Run benchmarks | ||
shell_exec("make run_benchmarks", echo=True, print_output=True, output_file=benchmarks_output_file) | ||
|
||
# Move resulting .cali files to specified directory | ||
os.makedirs(spot_dir, exist_ok=True) | ||
cali_files = glob.glob(pjoin(build_dir, "*.cali")) | ||
for cali_file in cali_files: | ||
if os.path.exists(cali_file): | ||
shutil.copy2(cali_file, spot_dir) | ||
|
||
# Print SPOT url | ||
if on_rz(): | ||
print("[View SPOT directory here: https://rzlc.llnl.gov/spot2/?sf={0}]".format(spot_dir)) | ||
else: | ||
print("[View SPOT directory here: https://lc.llnl.gov/spot2/?sf={0}]".format(spot_dir)) | ||
|
||
return 0 | ||
|
||
|
||
if __name__ == "__main__": | ||
sys.exit(main()) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could alternatively use some sort of
CI_WORKFLOW_TYPE
var which could be src, full, or benchmarks. That way we don't have to handle the two variables. I just don't have access to nightly build settings.