interplane.Get Omega
Read in your language

aienux

Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.

Brought by drakestapleton

branch main Branches Tags History

aienux / native / argus / tests / run_argus1_bench.sh

42 lines · 1370 bytes Raw Blame History
1#!/usr/bin/env bash
2# SPDX-License-Identifier: Apache-2.0
3# Copyright 2026 Drake Stapleton (AIEN / aien-dev)
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
17set -euo pipefail
18
19bench_bin=$1
20mode=$2
21integration_bin=$3
22lane_out=$4
23quiet_file="${HOME}/workspace/.spark-quiet"
24lock_file="${HOME}/workspace/.argus-bench.lock"
25
26if [[ -e "$quiet_file" ]]; then
27 echo "ARGUS-1 benchmark blocked: .spark-quiet is present" >&2
28 exit 2
29fi
30if ! command -v taskset >/dev/null || ! command -v flock >/dev/null; then
31 echo "ARGUS-1 benchmark needs taskset and flock on the Spark host" >&2
32 exit 2
33fi
34
35flock -n "$lock_file" bash -c '
36 set -euo pipefail
37 taskset -c 7 "$1"
38 if [[ "$2" == full ]]; then
39 taskset -c 7 make -f lane_b.mk LANE_B_OUT="$4" bench-ring
40 taskset -c 7 "$3" --bench
41 fi
42' bash "$bench_bin" "$mode" "$integration_bin" "$lane_out"