From 16d76c33c155efc2cad7de89171662827fc1894d Mon Sep 17 00:00:00 2001 From: Yoshifumi Nakamura Date: Thu, 16 Jul 2026 18:27:50 +0900 Subject: [PATCH] Add FOM unit metadata to results Signed-off-by: Yoshifumi Nakamura --- docs/guides/add-app.md | 25 +++++++++++++------ docs/guides/add-estimation-to-app.md | 3 ++- programs/LQCD_dw_solver/run.sh | 4 +-- programs/MHDTurbulence/run.sh | 1 + programs/ffb/run.sh | 1 + programs/genesis-nonbonded-kernels/run.sh | 2 +- programs/genesis/run.sh | 2 +- programs/qws/run.sh | 4 +-- programs/salmon/run.sh | 1 + programs/scale-letkf/run.sh | 6 ++--- result_server/templates/_results_table.html | 3 ++- .../tests/test_portal_list_templates.py | 4 ++- result_server/tests/test_results_loader.py | 5 ++-- result_server/utils/result_table_rows.py | 1 + result_server/utils/results_loader.py | 2 +- scripts/bk_functions.sh | 17 +++++++++++-- scripts/result.sh | 10 +++++++- scripts/tests/test_result_profile_data.sh | 23 ++++++++++++++--- 18 files changed, 86 insertions(+), 28 deletions(-) diff --git a/docs/guides/add-app.md b/docs/guides/add-app.md index 667533c..279e349 100644 --- a/docs/guides/add-app.md +++ b/docs/guides/add-app.md @@ -258,14 +258,14 @@ case "$system" in mpiexec -n $((nodes * numproc_node)) ./main [args] > output # 結果解析 FOM=$(grep "performance" output | awk '{print $2}') - bk_emit_result --fom "$FOM" --fom-version v1.0 --exp test \ + bk_emit_result --fom "$FOM" --fom-unit s --fom-version v1.0 --exp test \ --nodes "$nodes" --numproc-node "$numproc_node" --nthreads "$nthreads" >> ../results/result ;; MiyabiG|MiyabiC) # MPI実行(Miyabi) mpirun -n $((nodes * numproc_node)) ./main [args] > output FOM=$(grep "performance" output | awk '{print $2}') - bk_emit_result --fom "$FOM" --fom-version v1.0 --exp test \ + bk_emit_result --fom "$FOM" --fom-unit s --fom-version v1.0 --exp test \ --nodes "$nodes" --numproc-node "$numproc_node" --nthreads "$nthreads" >> ../results/result ;; *) @@ -283,7 +283,7 @@ sync ### 結果フォーマット `results/result` の各行は以下の形式: ``` -FOM:5.752 FOM_version:DDSolverJacobi Exp:CASE0 node_count:1 numproc_node:4 nthreads:12 +FOM:5.752 FOM_unit:s FOM_version:DDSolverJacobi Exp:CASE0 node_count:1 numproc_node:4 nthreads:12 SECTION:compute_kernel time:0.30 SECTION:communication time:0.20 OVERLAP:compute_kernel,communication time:0.05 @@ -297,7 +297,7 @@ OVERLAP:compute_kernel,communication time:0.05 source "${PWD}/scripts/bk_functions.sh" # FOM出力 -bk_emit_result --fom 5.752 --fom-version DDSolverJacobi --exp CASE0 \ +bk_emit_result --fom 5.752 --fom-unit s --fom-version DDSolverJacobi --exp CASE0 \ --nodes 1 --numproc-node 4 --nthreads 12 >> results/result # FOM内訳(オプション) @@ -308,6 +308,7 @@ bk_emit_overlap compute_kernel,communication 0.05 >> results/result **bk_emit_result の引数:** - `--fom 数値` - 性能指標(必須) +- `--fom-unit 文字列` - FOM の単位(推奨。例: `s`, `GB/s`, `GFLOPS`, `token/s`) - `--fom-version 文字列` - バージョン情報 - `--exp 文字列` - 実験名 - `--nodes 数値` - ノード数 @@ -315,10 +316,20 @@ bk_emit_overlap compute_kernel,communication 0.05 >> results/result - `--nthreads 数値` - プロセスあたりスレッド数 - `--confidential 文字列` - 機密データ(チーム限定表示) -省略された引数は出力に含まれません。`--fom` のみが必須です。 +省略された引数は出力に含まれません。`--fom` のみが必須ですが、FOM の意味を誤読しないよう `--fom-unit` も原則として指定してください。 -### Performance Analysis データ -詳細データは `results/padata[0-9].tgz` として保存: +### 最低限必要な出力 + +新しい app を BenchKit に接続する最低ラインは、`run.sh` が `results/result` に少なくとも `FOM:<数値>` 相当の結果を書けることです。 +ただし FOM には単位が含まれないため、`FOM_unit:s` のように単位も出してください。 +多くのアプリでは経過時間の `s` で十分ですが、システムソフトウェアやライブラリでは `GB/s`、`GFLOPS`、`token/s` などになることがあります。 +`bk_emit_result --fom ... --fom-unit ...` を使うと、FOM、単位、実験名、ノード数、プロセス数、スレッド数を同じ形式で出力できます。 + +`source_info` は必須ではありませんが、Git などから source を取得する app では `bk_fetch_source` を使って `results/source_info.env` を残すことを推奨します。 +section / overlap / profiler archive は、詳細分析や推定を使う場合の任意拡張です。 + +### Performance Analysis データ(任意) +詳細データがある場合は `results/padata[0-9].tgz` として保存: ```bash # PAデータの作成例 mkdir -p pa diff --git a/docs/guides/add-estimation-to-app.md b/docs/guides/add-estimation-to-app.md index e71d43a..83d4a8d 100644 --- a/docs/guides/add-estimation-to-app.md +++ b/docs/guides/add-estimation-to-app.md @@ -160,7 +160,7 @@ myapp_declare_estimation_layout() { ### 最小構成 -最小構成で必要なのは FOM の出力です。 +最小構成で必要なのは FOM の出力です。FOM の数値だけでは単位が分からないため、`--fom-unit` も原則として指定してください。多くの app は経過時間の `s` ですが、ライブラリや system software では `GB/s`、`GFLOPS`、`token/s` などになることがあります。 ```bash source "${PWD}/scripts/bk_functions.sh" @@ -169,6 +169,7 @@ mkdir -p results && > results/result bk_emit_result \ --fom "$FOM" \ + --fom-unit "$FOM_UNIT" \ --fom-version "$FOM_VERSION" \ --exp "$EXP" \ --nodes "$nodes" \ diff --git a/programs/LQCD_dw_solver/run.sh b/programs/LQCD_dw_solver/run.sh index 8ea9e98..b63e648 100644 --- a/programs/LQCD_dw_solver/run.sh +++ b/programs/LQCD_dw_solver/run.sh @@ -54,14 +54,14 @@ get_fom () { FOM2=`get_etime_total $LOG` FOM_O=`echo $FOM2 $FOM1 | awk '{print $1-$2}'` if [ $# -eq 1 ]; then - bk_emit_result --fom "$FOM2" --fom-version LQCD_dw_solver --exp total --nodes "$nodes" --numproc-node "$numproc_node" --nthreads "$nthreads" + bk_emit_result --fom "$FOM2" --fom-unit s --fom-version LQCD_dw_solver --exp total --nodes "$nodes" --numproc-node "$numproc_node" --nthreads "$nthreads" bk_emit_section solver "$FOM1" bk_emit_section other "$FOM_O" else # 第2引数をExp名として使用 # 注意: 暫定的にtarget情報をExpに付け加えます。 TARGET=$(echo "$2" | sed 's/target: //' | sed 's/ $//') - bk_emit_result --fom "$FOM2" --fom-version LQCD_dw_solver --exp "total_${TARGET}" --nodes "$nodes" --numproc-node "$numproc_node" --nthreads "$nthreads" + bk_emit_result --fom "$FOM2" --fom-unit s --fom-version LQCD_dw_solver --exp "total_${TARGET}" --nodes "$nodes" --numproc-node "$numproc_node" --nthreads "$nthreads" bk_emit_section solver "$FOM1" bk_emit_section other "$FOM_O" fi diff --git a/programs/MHDTurbulence/run.sh b/programs/MHDTurbulence/run.sh index 04ea61a..8eda70e 100644 --- a/programs/MHDTurbulence/run.sh +++ b/programs/MHDTurbulence/run.sh @@ -69,6 +69,7 @@ fomtcc=$(awk "BEGIN {printf \"%.6e\", 1.0/$tcc}") { bk_emit_result \ --fom "$fomtcc" \ + --fom-unit cell/s \ --fom-version "cell_updates_per_sec" \ --exp "KH" \ --nodes "$nodes" \ diff --git a/programs/ffb/run.sh b/programs/ffb/run.sh index e58ec07..9af7959 100644 --- a/programs/ffb/run.sh +++ b/programs/ffb/run.sh @@ -86,6 +86,7 @@ fi bk_emit_result \ --fom "$fom" \ + --fom-unit s \ --fom-version "67.01" \ --exp "cavity" \ --nodes "$nodes" \ diff --git a/programs/genesis-nonbonded-kernels/run.sh b/programs/genesis-nonbonded-kernels/run.sh index ddca35f..732b649 100644 --- a/programs/genesis-nonbonded-kernels/run.sh +++ b/programs/genesis-nonbonded-kernels/run.sh @@ -81,7 +81,7 @@ case "$system" in #printf "result%d: %.3f\n" "$index" "$fom_val" >> ${resultsdir}/result #total_fom=$(awk -v a="$total_fom" -v b="$fom_val" 'BEGIN{printf("%.6f", a + b)}') - bk_emit_result --fom "$fom_val" --exp "$name" --nodes "$nodes" --numproc-node "$numproc_node" --nthreads "$nthreads" >> ${resultsdir}/result + bk_emit_result --fom "$fom_val" --fom-unit s --exp "$name" --nodes "$nodes" --numproc-node "$numproc_node" --nthreads "$nthreads" >> ${resultsdir}/result done ;; diff --git a/programs/genesis/run.sh b/programs/genesis/run.sh index 5d317b9..6389d0f 100644 --- a/programs/genesis/run.sh +++ b/programs/genesis/run.sh @@ -515,7 +515,7 @@ if [[ -z "$fom_val" ]]; then fi { - bk_emit_result --fom "$fom_val" --exp "$exp" --nodes "$nodes" --numproc-node "$numproc_node" --nthreads "$nthreads" + bk_emit_result --fom "$fom_val" --fom-unit s --exp "$exp" --nodes "$nodes" --numproc-node "$numproc_node" --nthreads "$nthreads" genesis_emit_estimation_data_from_log "$output" "$fom_val" } >> ${resultsdir}/result # if information is requierd diff --git a/programs/qws/run.sh b/programs/qws/run.sh index c0af626..b0b3126 100644 --- a/programs/qws/run.sh +++ b/programs/qws/run.sh @@ -22,7 +22,7 @@ print_results() { ./check.sh "$outfile" "data/$exp" local fom fom=$(grep etime "$outfile" | awk 'NR==2{printf("%5.3f\n",$5)}') - bk_emit_result --fom "$fom" --fom-version DDSolverJacobi --exp "$exp" --nodes "$nodes" --numproc-node "$np" --nthreads "$nthreads" + bk_emit_result --fom "$fom" --fom-unit s --fom-version DDSolverJacobi --exp "$exp" --nodes "$nodes" --numproc-node "$np" --nthreads "$nthreads" qws_emit_estimation_data_from_fom "$fom" } @@ -78,7 +78,7 @@ case "$system" in # FugakuLN retired; previous LN smoke run kept for reference. # FugakuLN) # echo 'dummy call for CI test: QWS program: ./main 32 6 4 3 1 1 1 1 -1 -1 6 50' - # bk_emit_result --fom 123.56 --fom-version dummy --exp CheckingPrivateRepo --nodes "$nodes" --numproc-node "$numproc_node" --nthreads "$nthreads" >> ../results/result + # bk_emit_result --fom 123.56 --fom-unit s --fom-version dummy --exp CheckingPrivateRepo --nodes "$nodes" --numproc-node "$numproc_node" --nthreads "$nthreads" >> ../results/result # emit_qws_dummy_padata ../results/padata0.tgz # ;; RIKYU) diff --git a/programs/salmon/run.sh b/programs/salmon/run.sh index a382136..1689c38 100644 --- a/programs/salmon/run.sh +++ b/programs/salmon/run.sh @@ -231,6 +231,7 @@ fi { bk_emit_result \ --fom "${total_elapsed}" \ + --fom-unit s \ --fom-version "total_elapsed_time_s" \ --exp "Si-1-1-1" \ --nodes "${nodes}" \ diff --git a/programs/scale-letkf/run.sh b/programs/scale-letkf/run.sh index 487c787..cd20676 100644 --- a/programs/scale-letkf/run.sh +++ b/programs/scale-letkf/run.sh @@ -60,7 +60,7 @@ case "$system" in elapse_letkf=$elapse FOM=$(echo "$elapse_scale $elapse_letkf" | awk '{printf "%.3f\n", $1 + $2}') - bk_emit_result --fom "$FOM" --fom-version SCALE-LETKF --exp SC23_128x128 --nodes "$nodes" --numproc-node 4 --nthreads 12 >> ../results/result + bk_emit_result --fom "$FOM" --fom-unit s --fom-version SCALE-LETKF --exp SC23_128x128 --nodes "$nodes" --numproc-node 4 --nthreads 12 >> ../results/result ;; 75) echo "copy essential files ... `date`" @@ -102,7 +102,7 @@ case "$system" in elapse_letkf=$elapse FOM=$(echo "$elapse_scale $elapse_letkf" | awk '{printf "%.3f\n", $1 + $2}') - bk_emit_result --fom "$FOM" --fom-version SCALE-LETKF --exp SC23_1280x1280 --nodes "$nodes" --numproc-node 4 --nthreads 12 >> ../results/result + bk_emit_result --fom "$FOM" --fom-unit s --fom-version SCALE-LETKF --exp SC23_1280x1280 --nodes "$nodes" --numproc-node 4 --nthreads 12 >> ../results/result ;; esac ;; @@ -160,7 +160,7 @@ case "$system" in elapse_letkf=$elapse FOM=$(echo "$elapse_scale $elapse_letkf" | awk '{printf "%.3f\n", $1 + $2}') - bk_emit_result --fom "$FOM" --fom-version SCALE-LETKF --exp SC23_128x128 --nodes "$nodes" --numproc-node 12 --nthreads 1 >> ../results/result + bk_emit_result --fom "$FOM" --fom-unit s --fom-version SCALE-LETKF --exp SC23_128x128 --nodes "$nodes" --numproc-node 12 --nthreads 1 >> ../results/result ;; esac ;; diff --git a/result_server/templates/_results_table.html b/result_server/templates/_results_table.html index 2ddfb73..ac507d8 100644 --- a/result_server/templates/_results_table.html +++ b/result_server/templates/_results_table.html @@ -191,7 +191,8 @@ {% elif key in ["fom_version", "exp", "source_hash"] %} {{ row[key] }} {% elif key == "fom" %} - {{ "%.3f"|format(row[key]|float) if row[key] not in [None, '', 'N/A', 'null', 'nan'] else row[key] }} + {% set fom_value = "%.3f"|format(row[key]|float) if row[key] not in [None, '', 'N/A', 'null', 'nan'] else row[key] %} + {{ fom_value }}{% if row.fom_unit %} {{ row.fom_unit }}{% endif %} {% endif %} {% if key == "fom" %} diff --git a/result_server/tests/test_portal_list_templates.py b/result_server/tests/test_portal_list_templates.py index fa8f255..348b715 100644 --- a/result_server/tests/test_portal_list_templates.py +++ b/result_server/tests/test_portal_list_templates.py @@ -20,7 +20,7 @@ def test_results_template_renders_table_note(): {"label": "Timestamp", "key": "timestamp", "tooltip": "Date and time when benchmark execution completed and results were automatically submitted to server", "tooltip_class": "tooltip-left"}, {"label": "SYSTEM", "key": "system", "tooltip": "Computing system name"}, {"label": "CODE", "key": "code"}, - {"label": "FOM", "key": "fom", "tooltip": "Figure of Merit - Benchmark performance metric value, typically elapsed time in seconds for main section"}, + {"label": "FOM", "key": "fom", "tooltip": "Figure of Merit - Benchmark performance metric value with its unit when available"}, {"label": "Exp", "key": "exp", "tooltip": "Experimental conditions (filtered by CODE)"}, {"label": "Profiler / PA", "key": "profile_summary", "tooltip": "Profiler tool, level, report summary, and PA data download access"}, {"label": "CI", "key": "ci_summary", "tooltip": "CI trigger source and pipeline ID"}, @@ -32,6 +32,7 @@ def test_results_template_renders_table_note(): "system": "Fugaku", "code": "qws", "fom": 1.234, + "fom_unit": "s", "exp": "CASE0", "json_link": "/results/result0.json", "data_link": "/results/padata0.tgz", @@ -87,6 +88,7 @@ def test_results_template_renders_table_note(): assert "CI" in html assert "padata" in html assert "#10" in html + assert "1.234 s" in html def test_results_template_renders_ncu_options_tooltip(): diff --git a/result_server/tests/test_results_loader.py b/result_server/tests/test_results_loader.py index 4841d3b..b3c40b6 100644 --- a/result_server/tests/test_results_loader.py +++ b/result_server/tests/test_results_loader.py @@ -272,7 +272,7 @@ def test_existing_columns_unchanged(self, flask_app, tmp_dir): {"label": "CODE", "key": "code"}, {"label": "Branch/Hash", "key": "source_hash", "tooltip": "Source code branch name and short commit hash (git) or short md5sum (file archive)"}, {"label": "Exp", "key": "exp", "tooltip": "Experimental conditions (filtered by CODE)"}, - {"label": "FOM", "key": "fom", "tooltip": "Figure of Merit - Benchmark performance metric value, typically elapsed time in seconds for main section"}, + {"label": "FOM", "key": "fom", "tooltip": "Figure of Merit - Benchmark performance metric value with its unit when available"}, {"label": "FOM version", "key": "fom_version", "tooltip": "Version identifier for the FOM measurement section - helps identify which code region was measured when users modify the timing boundaries"}, {"label": "SYSTEM", "key": "system", "tooltip": "Computing system name"}, {"label": "Nodes", "key": "nodes"}, @@ -289,7 +289,7 @@ def test_existing_row_fields_preserved(self, flask_app, tmp_dir): uid = str(uuid.uuid4()) _write_json(tmp_dir, f"result_20250101_120000_{uid}.json", { "code": "mycode", "system": "mysys", "Exp": "myexp", - "FOM": 99.9, "FOM_version": "v1", "node_count": 4, + "FOM": 99.9, "FOM_unit": "s", "FOM_version": "v1", "node_count": 4, "numproc_node": "48", "nthreads": "12", }) @@ -302,6 +302,7 @@ def test_existing_row_fields_preserved(self, flask_app, tmp_dir): assert row["system"] == "mysys" assert row["exp"] == "myexp" assert row["fom"] == 99.9 + assert row["fom_unit"] == "s" assert row["timestamp"] == "2025-01-01 12:00:00" assert row["numproc_node"] == "48" assert row["nthreads"] == "12" diff --git a/result_server/utils/result_table_rows.py b/result_server/utils/result_table_rows.py index fabd42f..ba73448 100644 --- a/result_server/utils/result_table_rows.py +++ b/result_server/utils/result_table_rows.py @@ -31,6 +31,7 @@ def build_result_table_row(json_filename, result_data, padata_filenames): "code": result_data.get("code", "N/A"), "exp": result_data.get("Exp", "N/A"), "fom": result_data.get("FOM", "N/A"), + "fom_unit": result_data.get("FOM_unit") or "", "fom_version": result_data.get("FOM_version", "N/A"), "system": result_data.get("system", "N/A"), "nodes": result_data.get("node_count", "N/A"), diff --git a/result_server/utils/results_loader.py b/result_server/utils/results_loader.py index 40bae53..541a818 100644 --- a/result_server/utils/results_loader.py +++ b/result_server/utils/results_loader.py @@ -20,7 +20,7 @@ {"label": "CODE", "key": "code"}, {"label": "Branch/Hash", "key": "source_hash", "tooltip": "Source code branch name and short commit hash (git) or short md5sum (file archive)"}, {"label": "Exp", "key": "exp", "tooltip": "Experimental conditions (filtered by CODE)"}, - {"label": "FOM", "key": "fom", "tooltip": "Figure of Merit - Benchmark performance metric value, typically elapsed time in seconds for main section"}, + {"label": "FOM", "key": "fom", "tooltip": "Figure of Merit - Benchmark performance metric value with its unit when available"}, {"label": "FOM version", "key": "fom_version", "tooltip": "Version identifier for the FOM measurement section - helps identify which code region was measured when users modify the timing boundaries"}, {"label": "SYSTEM", "key": "system", "tooltip": "Computing system name"}, {"label": "Nodes", "key": "nodes"}, diff --git a/scripts/bk_functions.sh b/scripts/bk_functions.sh index 75cf114..1cf497b 100644 --- a/scripts/bk_functions.sh +++ b/scripts/bk_functions.sh @@ -8,6 +8,7 @@ # # Named arguments: # --fom (required, numeric) +# --fom-unit (recommended, no spaces; e.g. s, GB/s, GFLOPS) # --fom-version (optional) # --exp (optional) # --nodes (optional) @@ -18,14 +19,16 @@ # Unknown arguments are silently ignored for future extensibility. # # Output format (omitted optional args produce no key:value pair): -# FOM: [FOM_version:] [Exp:] [node_count:] -# [numproc_node:] [nthreads:] [confidential:] +# FOM: [FOM_unit:] [FOM_version:] [Exp:] +# [node_count:] [numproc_node:] [nthreads:] +# [confidential:] # # Exit codes: # 0 - success # 1 - missing or invalid --fom bk_emit_result() { _bk_fom="" + _bk_fom_unit="" _bk_fom_version="" _bk_exp="" _bk_nodes="" @@ -45,6 +48,12 @@ bk_emit_result() { _bk_fom="$1" _bk_fom_set=1 ;; + --fom-unit) + shift + if [ $# -gt 0 ]; then + _bk_fom_unit="$1" + fi + ;; --fom-version) shift if [ $# -gt 0 ]; then @@ -136,6 +145,10 @@ bk_emit_result() { # Build output line _bk_output="FOM:${_bk_fom}" + if [ -n "$_bk_fom_unit" ]; then + _bk_output="${_bk_output} FOM_unit:${_bk_fom_unit}" + fi + if [ -n "$_bk_fom_version" ]; then _bk_output="${_bk_output} FOM_version:${_bk_fom_version}" fi diff --git a/scripts/result.sh b/scripts/result.sh index d911161..5e8ddf2 100644 --- a/scripts/result.sh +++ b/scripts/result.sh @@ -153,7 +153,7 @@ build_source_info_block() { source_info_block=$(build_source_info_block) # Function to write a Result_JSON file for one FOM block -# Arguments: $1=index, uses global vars: code, system, fom, fom_version, exp, node_count, numproc_node, description, confidential, sections_json, overlaps_json +# Arguments: $1=index, uses global vars: code, system, fom, fom_unit, fom_version, exp, node_count, numproc_node, description, confidential, sections_json, overlaps_json write_result_json() { local idx="$1" local fom_breakdown_block="" @@ -252,6 +252,7 @@ write_result_json() { "code": "$code", "system": "$system", "FOM": "$fom", + "FOM_unit": "$fom_unit", "FOM_version": "$fom_version", "Exp": "$exp", "node_count": "$node_count", @@ -283,6 +284,7 @@ EOF i=0 in_fom_block=false fom="" +fom_unit="" fom_version="null" exp="null" description="null" @@ -308,6 +310,12 @@ while IFS= read -r line; do fom=null fi + if echo "$line" | grep -q 'FOM_unit:'; then + fom_unit=$(echo "$line" | grep -Eo 'FOM_unit:[ ]*[^ ]*' | head -n1 | awk -F':' '{print $2}' | sed 's/^ *//') + else + fom_unit="" + fi + node_count_line=$(echo $line | grep -Eo 'node_count:[ ]*[0-9]*' | head -n1 | awk -F':' '{print $2}' | sed 's/^ *//') if [ -n "$node_count_line" ]; then node_count=${node_count_line} diff --git a/scripts/tests/test_result_profile_data.sh b/scripts/tests/test_result_profile_data.sh index 19f7490..6a6059b 100644 --- a/scripts/tests/test_result_profile_data.sh +++ b/scripts/tests/test_result_profile_data.sh @@ -7,7 +7,7 @@ REPO_DIR=$(cd "${SCRIPT_DIR}/../.." && pwd) TMP_DIR=$(mktemp -d) trap 'rm -rf "${TMP_DIR}"' EXIT -mkdir -p "${TMP_DIR}/results" "${TMP_DIR}/bk_profiler_artifact" "${TMP_DIR}/ncu/results" "${TMP_DIR}/ncu/bk_profiler_artifact" +mkdir -p "${TMP_DIR}/results" "${TMP_DIR}/bk_profiler_artifact" "${TMP_DIR}/ncu/results" "${TMP_DIR}/ncu/bk_profiler_artifact" "${TMP_DIR}/nounit/results" if ! command -v jq >/dev/null 2>&1; then echo "jq not found; skipping result profile_data test" @@ -15,7 +15,7 @@ if ! command -v jq >/dev/null 2>&1; then fi cat > "${TMP_DIR}/results/result" <<'EOF' -FOM:9.9999999999999995e-07 FOM_version:test Exp:CASE0 node_count:1 numproc_node:1 nthreads:2 +FOM:9.9999999999999995e-07 FOM_unit:s FOM_version:test Exp:CASE0 node_count:1 numproc_node:1 nthreads:2 EOF cat > "${TMP_DIR}/results/pipeline_timing.json" <<'EOF' @@ -54,7 +54,11 @@ EOF tar -czf "${TMP_DIR}/results/padata0.tgz" -C "${TMP_DIR}" bk_profiler_artifact cat > "${TMP_DIR}/ncu/results/result" <<'EOF' -FOM:2.345 FOM_version:test Exp:CASE0 node_count:1 numproc_node:8 nthreads:9 +FOM:2.345 FOM_unit:GB/s FOM_version:test Exp:CASE0 node_count:1 numproc_node:8 nthreads:9 +EOF + +cat > "${TMP_DIR}/nounit/results/result" <<'EOF' +FOM:1.234 FOM_version:test Exp:CASE0 node_count:1 numproc_node:1 nthreads:1 EOF cat > "${TMP_DIR}/ncu/bk_profiler_artifact/meta.json" <<'EOF' @@ -90,10 +94,15 @@ pushd "${TMP_DIR}/ncu" >/dev/null bash "${REPO_DIR}/scripts/result.sh" genesis RC_GH200 cross build run 999 >/dev/null popd >/dev/null +pushd "${TMP_DIR}/nounit" >/dev/null +bash "${REPO_DIR}/scripts/result.sh" qws Fugaku cross build run 999 >/dev/null +popd >/dev/null + RESULT_JSON="${TMP_DIR}/results/result0.json" test -f "${RESULT_JSON}" jq -e ' .FOM == "9.9999999999999995e-07" and + .FOM_unit == "s" and .profile_data.tool == "fapp" and .profile_data.level == "single" and .profile_data.report_format == "text" and @@ -109,6 +118,7 @@ test ! -f "${TMP_DIR}/timing_env_was_sourced" NCU_RESULT_JSON="${TMP_DIR}/ncu/results/result0.json" test -f "${NCU_RESULT_JSON}" jq -e ' + .FOM_unit == "GB/s" and .profile_data.tool == "ncu" and .profile_data.level == "single" and .profile_data.report_format == "text" and @@ -118,6 +128,13 @@ jq -e ' (.profile_data.report_kinds | index("ncu_report") != null) ' "${NCU_RESULT_JSON}" >/dev/null +NOUNIT_RESULT_JSON="${TMP_DIR}/nounit/results/result0.json" +test -f "${NOUNIT_RESULT_JSON}" +jq -e ' + .FOM == "1.234" and + .FOM_unit == "" +' "${NOUNIT_RESULT_JSON}" >/dev/null + TIMING_TMP="${TMP_DIR}/timing" mkdir -p "${TIMING_TMP}/results" printf '100\n' > "${TIMING_TMP}/results/build_start"