|
| 1 | +env: |
| 2 | + JULIA_VERSION: "1.10.9" |
| 3 | + JULIA_MINOR_VERSION: "1.10" |
| 4 | + TARTARUS_HOME: "/storage5/buildkite-agent" |
| 5 | + JULIA_DEPOT_PATH: "$TARTARUS_HOME/.julia-$BUILDKITE_BUILD_NUMBER" |
| 6 | + JULIA_PKG_SERVER_REGISTRY_PREFERENCE: eager |
| 7 | + JULIA_NUM_PRECOMPILE_TASKS: 24 |
| 8 | + JULIA_NUM_THREADS: 8 |
| 9 | + NSYS: "/storage6/nsight/bin/nsys" |
| 10 | + CUDA_VISIBLE_DEVICES: "1" # Tartarus device for GPU Benchmarking |
| 11 | + TMPDIR: "$TARTARUS_HOME/tmp" |
| 12 | + |
| 13 | +steps: |
| 14 | + - label: "🏕️ initialize tartarus environment" |
| 15 | + key: "init" |
| 16 | + env: |
| 17 | + JULIA_DEPOT_PATH: "$TARTARUS_HOME/.julia-$BUILDKITE_BUILD_NUMBER" |
| 18 | + TEST_GROUP: "init" |
| 19 | + JULIA_BINDIR: "$TARTARUS_HOME/julia-$JULIA_VERSION/bin" |
| 20 | + command: | |
| 21 | + # Download julia binaries |
| 22 | + wget -N -P $TARTARUS_HOME https://julialang-s3.julialang.org/bin/linux/x64/$JULIA_MINOR_VERSION/julia-$JULIA_VERSION-linux-x86_64.tar.gz |
| 23 | + tar xf $TARTARUS_HOME/julia-$JULIA_VERSION-linux-x86_64.tar.gz -C $TARTARUS_HOME |
| 24 | + agents: |
| 25 | + queue: "Oceananigans-benchmarks" |
| 26 | + retry: |
| 27 | + automatic: |
| 28 | + - exit_status: 1 |
| 29 | + limit: 1 |
| 30 | + |
| 31 | + - wait |
| 32 | + |
| 33 | + # Saving the latest build ID of the main branch for |
| 34 | + # later comparison of the artifacts in PRs |
| 35 | + - label: "💾 conditional metadata save" |
| 36 | + key: "save-metadata" |
| 37 | + agents: |
| 38 | + queue: Oceananigans-benchmarks |
| 39 | + |
| 40 | + command: | |
| 41 | + if [ "$BUILDKITE_BRANCH" = "main" ]; then |
| 42 | + echo "Saving build ID for main..." |
| 43 | + buildkite-agent meta-data set "latest-main-build" "$BUILDKITE_BUILD_ID" |
| 44 | + else |
| 45 | + echo "Not on main, skipping metadata save." |
| 46 | + fi |
| 47 | + |
| 48 | + - label: "🚀 Oceananigans GPU benchmarks" |
| 49 | + key: "benchmarks" |
| 50 | + agents: |
| 51 | + queue: "Oceananigans-benchmarks" |
| 52 | + |
| 53 | + command: | |
| 54 | + # Instantiate |
| 55 | + $TARTARUS_HOME/julia-$JULIA_VERSION/bin/julia --color=yes --project --check-bounds=no -e 'using Pkg; Pkg.instantiate()' |
| 56 | +
|
| 57 | + # Run Periodic benchmarks |
| 58 | + export BENCHMARK_GROUP="periodic" |
| 59 | + $NSYS profile --output=periodic_output --trace=cuda $TARTARUS_HOME/julia-$JULIA_VERSION/bin/julia --color=yes --project --check-bounds=no test/benchmark_tests.jl |
| 60 | + $NSYS stats periodic_output.nsys-rep > periodic_output.txt |
| 61 | +
|
| 62 | + # Remove generated output files |
| 63 | + rm periodic_output.nsys-rep |
| 64 | + rm periodic_output.sqlite |
| 65 | +
|
| 66 | + # Run Bounded benchmarks |
| 67 | + export BENCHMARK_GROUP="bounded" |
| 68 | + $NSYS profile --output=bounded_output --trace=cuda $TARTARUS_HOME/julia-$JULIA_VERSION/bin/julia --color=yes --project --check-bounds=no test/benchmark_tests.jl |
| 69 | + $NSYS stats bounded_output.nsys-rep > bounded_output.txt |
| 70 | +
|
| 71 | + # Remove generated output files |
| 72 | + rm bounded_output.nsys-rep |
| 73 | + rm bounded_output.sqlite |
| 74 | +
|
| 75 | + # Run Periodic cheap advection benchmarks |
| 76 | + export BENCHMARK_GROUP="periodic_cheap_advection" |
| 77 | + $NSYS profile --output=periodic_cheap_advection_output --trace=cuda $TARTARUS_HOME/julia-$JULIA_VERSION/bin/julia --color=yes --project --check-bounds=no test/benchmark_tests.jl |
| 78 | + $NSYS stats periodic_cheap_advection_output.nsys-rep > periodic_cheap_advection_output.txt |
| 79 | +
|
| 80 | + # Remove generated output files |
| 81 | + rm periodic_cheap_advection_output.nsys-rep |
| 82 | + rm periodic_cheap_advection_output.sqlite |
| 83 | +
|
| 84 | + # Run Bounded cheap advection benchmarks |
| 85 | + export BENCHMARK_GROUP="bounded_cheap_advection" |
| 86 | + $NSYS profile --output=bounded_cheap_advection_output --trace=cuda $TARTARUS_HOME/julia-$JULIA_VERSION/bin/julia --color=yes --project --check-bounds=no test/benchmark_tests.jl |
| 87 | + $NSYS stats bounded_cheap_advection_output.nsys-rep > bounded_cheap_advection_output.txt |
| 88 | +
|
| 89 | + # Remove generated output files |
| 90 | + rm bounded_cheap_advection_output.nsys-rep |
| 91 | + rm bounded_cheap_advection_output.sqlite |
| 92 | +
|
| 93 | + # Run Immersed benchmarks |
| 94 | + export BENCHMARK_GROUP="immersed" |
| 95 | + $NSYS profile --output=immersed_output --trace=cuda $TARTARUS_HOME/julia-$JULIA_VERSION/bin/julia --color=yes --project --check-bounds=no test/benchmark_tests.jl |
| 96 | + $NSYS stats immersed_output.nsys-rep > immersed_output.txt |
| 97 | +
|
| 98 | + # Remove generated output files |
| 99 | + rm immersed_output.nsys-rep |
| 100 | + rm immersed_output.sqlite |
| 101 | +
|
| 102 | + artifact_paths: |
| 103 | + - "periodic_output.txt" |
| 104 | + - "bounded_output.txt" |
| 105 | + - "periodic_cheap_advection_output.txt" |
| 106 | + - "bounded_cheap_advection_output.txt" |
| 107 | + - "immersed_output.txt" |
| 108 | + soft_fail: |
| 109 | + - exit_status: 3 |
| 110 | + |
0 commit comments