Speckleは、SPEC CPU2006ベンチマークのコンパイルと実行を簡素化するためのツールセットである。
Speckleリポジトリの主な目的は、SPEC CPU2006 v1.2ベンチマークのコンパイルと実行プロセスを簡素化することである。従来のSPEC CPU2006の複雑な設定と実行手順を抽象化し、研究者や開発者がより簡単にベンチマークを実行できる環境を提供する。
設計思想
このリポジトリはin vivoコンパイルアプローチを採用している。つまり、実際のSPEC CPU2006ディレクトリ内でベンチマークをコンパイルし、完了後にバイナリをこのディレクトリ(./build)にコピーする方式である。
リポジトリの構成
主要ファイル
gen_binaries.sh: メインのスクリプトファイル- ベンチマークのコンパイルと実行を制御
- 設定可能なパラメータ(BENCHMARKS、RUN、INPUT_TYPE等)
run.sh: 実行用スクリプト- コンパイル済みバイナリの実行を管理
- 出力ファイルの生成と管理
- 設定ファイル:
riscv.cfg: RISC-V用SPEC設定ファイルarm.cfg: ARM用SPEC設定ファイル
- commands/: 各ベンチマークのコマンドファイル
- 各ベンチマークの実行パラメータを定義
- test、ref、trainの各入力セットに対応
サポートベンチマーク
整数ベンチマーク(SPECint):
- 400.perlbench: Perlベンチマーク
- 401.bzip2: データ圧縮
- 403.gcc: GCCコンパイラ
- 429.mcf: ネットワークフロー最適化
- 445.gobmk: 囲碁プログラム
- 456.hmmer: バイオインフォマティクス
- 458.sjeng: チェスエンジン
- 462.libquantum: 量子計算シミュレーション
- 464.h264ref: H.264動画エンコーダ
- 471.omnetpp: ネットワークシミュレーション
- 473.astar: パスファインディング
- 483.xalancbmk: XML処理
実際に使ってみる
$ git clone git@github.com:ccelio/Speckle.git
SPECベンチマークの場所を指定する:
$ export SPEC_DIR=/home/msyksphinz/work/bench_trace_env/spec2006_work/spec2006_installed
実行してみよう。
$ ./gen_binaries.sh --compile
== Speckle Options ==
Config : riscv
Input : test
compile: true
run : false
copy : false
Compiling SPEC...
runspec v6152 - Copyright 1999-2008 Standard Performance Evaluation Corporation
Using 'linux-suse101-AMD64' tools
Reading MANIFEST... 18335 files
Loading runspec modules................
Locating benchmarks...found 31 benchmarks in 6 benchsets.
Reading config file '/home/msyksphinz/work/bench_trace_env/spec2006_work/spec2006_installed/config/riscv.cfg'
Loading "http://www.spec.org/auto/cpu2006/current_version" for version check: OK
NOTICE: There is a newer version of the suite available from SPEC.
Version 1.200 was released on Wed Aug 17 10:10:33 2011
----------------------------------
The run will continue in 5 seconds
----------------------------------
なんかいろいろ怒られたな: riscv64-unknown-linux-gnu が必要だ。
Benchmarks selected: 400.perlbench, 401.bzip2, 403.gcc, 429.mcf, 445.gobmk, 456.hmmer, 458.sjeng, 462.libquantum, 464.h264ref, 471.omnetpp, 473.astar, 483.xalancbmk, 999.specrand Compiling Binaries Building 400.perlbench base riscv default: (build_base_riscv.0000) Error with make 'specmake build': check file '/home/kimura/work/bench_trace_env/spec2006_work/spec2006_installed/benchspec/CPU2006/400.perlbench/build/build_base_riscv.0000/make.err' Command returned exit code 2 Error with make! *** Error building 400.perlbench Building 401.bzip2 base riscv default: (build_base_riscv.0000) Error with make 'specmake build': check file '/home/kimura/work/bench_trace_env/spec2006_work/spec2006_installed/benchspec/CPU2006/401.bzip2/build/build_base_riscv.0000/make.err' Command returned exit code 2 Error with make! *** Error building 401.bzip2
今度はうまくいったようだ:
Benchmarks selected: 400.perlbench, 401.bzip2, 403.gcc, 429.mcf, 445.gobmk, 456.hmmer, 458.sjeng, 462.libquantum, 464.h264ref, 471.omnetpp, 473.astar, 483.xalancbmk, 999.specrand Compiling Binaries Building 400.perlbench base riscv default: (build_base_riscv.0001)
ちなみに、 commands 以下は実行用のオプションが入っているようだ:
$ cat commands/400.perlbench.ref.cmd -I./lib checkspam.pl 2500 5 25 11 150 1 1 1 1 -I./lib diffmail.pl 4 800 10 17 19 300 -I./lib splitmail.pl 1600 12 26 16 4500
$ cat commands/400.perlbench.test.cmd -I. -I./lib attrs.pl -I. -I./lib gv.pl -I. -I./lib makerand.pl -I. -I./lib pack.pl -I. -I./lib redef.pl -I. -I./lib ref.pl -I. -I./lib regmesg.pl -I. -I./lib test.pl