环境
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.4.0-1ubuntu1~22.04' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-11-XeT9lY/gcc-11-11.4.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-11-XeT9lY/gcc-11-11.4.0/debian/tmp-gcn/usr --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)
$ lscpu
架构: x86_64
CPU 运行模式: 32-bit, 64-bit
字节序: Little Endian
Address sizes: 39 bits physical, 48 bits virtual
CPU: 6
在线 CPU 列表: 0-5
每个核的线程数: 1
每个座的核数: 6
座: 1
NUMA 节点: 1
厂商 ID: GenuineIntel
CPU 系列: 6
型号: 158
型号名称: Intel(R) Core(TM) i5-9600K CPU @ 3.70GHz
步进: 13
CPU MHz: 800.010
CPU 最大 MHz: 4600.0000
CPU 最小 MHz: 800.0000
BogoMIPS: 7399.70
虚拟化: VT-x
L1d 缓存: 192 KiB
L1i 缓存: 192 KiB
L2 缓存: 1.5 MiB
L3 缓存: 9 MiB
NUMA 节点0 CPU: 0-5
Vulnerability Itlb multihit: KVM: Mitigation: Split huge pages
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Mmio stale data: Mitigation; Clear CPU buffers; SMT disabled
Vulnerability Retbleed: Mitigation; Enhanced IBRS
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; Enhanced IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS SW sequence
Vulnerability Srbds: Mitigation; Microcode
Vulnerability Tsx async abort: Mitigation; TSX disabled
标记: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d arch_capabilities
依赖
sudo apt install gfortran
安装SPEC CPU 2017
sudo mkdir /mnt/cpu2017
sudo mount cpu2017-1_0_5.iso /mnt/cpu2017/
cd /mnt/cpu2017/
bash install.sh -d /home/speccpu/cpu2017
安装日志
SPEC CPU2017 InstallationTop of the CPU2017 tree is '/mnt/cpu2017'Installing FROM /mnt/cpu2017
Installing TO /home/speccpu/cpu2017Is this correct? (Please enter 'yes' or 'no')
yesThe following toolset is expected to work on your platform. If the
automatically installed one does not work, please re-run install.sh and
exclude that toolset using the '-e' switch.The toolset selected will not affect your benchmark scores.linux-x86_64 For x86_64 Linux systemsBuilt on Oracle Linux 6.0 withGCC v4.4.4 20100726 (Red Hat 4.4.4-13)=================================================================
Attempting to install the linux-x86_64 toolset...Unpacking CPU2017 base files (44 MB)
Unpacking CPU2017 tools binary files (150.2 MB)
Unpacking 500.perlbench_r benchmark and data files (102 MB)
Unpacking 502.gcc_r benchmark and data files (240.3 MB)
Unpacking 503.bwaves_r benchmark and data files (0.2 MB)
Unpacking 505.mcf_r benchmark and data files (8.5 MB)
Unpacking 507.cactuBSSN_r benchmark and data files (12.5 MB)
Unpacking 508.namd_r benchmark and data files (8.3 MB)
Unpacking 510.parest_r benchmark and data files (25.6 MB)
Unpacking 511.povray_r benchmark and data files (23.3 MB)
Unpacking 519.lbm_r benchmark and data files (4.3 MB)
Unpacking 520.omnetpp_r benchmark and data files (56.6 MB)
Unpacking 521.wrf_r benchmark and data files (217.2 MB)
Unpacking 523.xalancbmk_r benchmark and data files (212 MB)
Unpacking 525.x264_r benchmark and data files (57.9 MB)
Unpacking 526.blender_r benchmark and data files (215.7 MB)
Unpacking 527.cam4_r benchmark and data files (348.6 MB)
Unpacking 531.deepsjeng_r benchmark and data files (0.5 MB)
Unpacking 538.imagick_r benchmark and data files (80.7 MB)
Unpacking 541.leela_r benchmark and data files (3.8 MB)
Unpacking 544.nab_r benchmark and data files (38.6 MB)
Unpacking 548.exchange2_r benchmark and data files (0.1 MB)
Unpacking 549.fotonik3d_r benchmark and data files (5.2 MB)
Unpacking 554.roms_r benchmark and data files (11.4 MB)
Unpacking 557.xz_r benchmark and data files (104.1 MB)
Unpacking 600.perlbench_s benchmark and data files (3.1 MB)
Unpacking 602.gcc_s benchmark and data files (0.9 MB)
Unpacking 603.bwaves_s benchmark and data files (0 MB)
Unpacking 605.mcf_s benchmark and data files (0.1 MB)
Unpacking 607.cactuBSSN_s benchmark and data files (0.1 MB)
Unpacking 619.lbm_s benchmark and data files (30.4 MB)
Unpacking 620.omnetpp_s benchmark and data files (0.1 MB)
Unpacking 621.wrf_s benchmark and data files (0.3 MB)
Unpacking 623.xalancbmk_s benchmark and data files (0.1 MB)
Unpacking 625.x264_s benchmark and data files (0.2 MB)
Unpacking 627.cam4_s benchmark and data files (0.5 MB)
Unpacking 628.pop2_s benchmark and data files (283.8 MB)
Unpacking 631.deepsjeng_s benchmark and data files (0.2 MB)
Unpacking 638.imagick_s benchmark and data files (0.3 MB)
Unpacking 641.leela_s benchmark and data files (0 MB)
Unpacking 644.nab_s benchmark and data files (0.1 MB)
Unpacking 648.exchange2_s benchmark and data files (0 MB)
Unpacking 649.fotonik3d_s benchmark and data files (0.1 MB)
Unpacking 654.roms_s benchmark and data files (1.1 MB)
Unpacking 657.xz_s benchmark and data files (0.2 MB)
Unpacking 996.specrand_fs benchmark and data files (0 MB)
Unpacking 997.specrand_fr benchmark and data files (0 MB)
Unpacking 998.specrand_is benchmark and data files (0 MB)
Unpacking 999.specrand_ir benchmark and data files (6.4 MB)Checking the integrity of your source tree...Checksums are all okay.Unpacking binary tools for linux-x86_64...Checking the integrity of your binary tools...Checksums are all okay.Testing the tools installation (this may take a minute)...................................................................................................................................................................................................................................................................................................................-.......Installation successful. Source the shrc or cshrc in
/home/speccpu/cpu2017
to set up your environment for the benchmark.
配置
gcc.cfg
cd /home/speccpu/cpu2017/config/
cp Example-gcc-linux-x86.cfg gcc.cfg
配置gcc路径
*** Example-gcc-linux-x86.cfg Thu Dec 16 19:24:09 2021
--- gcc.cfg Mon Jul 3 15:01:52 2023
*************** default:
*** 151,157 ****# WARNING: See section "Older GCC" above.#%ifndef %{gcc_dir}
! % define gcc_dir "/opt/rh/devtoolset-9/root/usr" # EDIT (see above)%endif# EDIT: If your compiler version is 10 or greater, you must enable the next
--- 151,157 ----# WARNING: See section "Older GCC" above.#%ifndef %{gcc_dir}
! % define gcc_dir "/usr" # EDIT (see above)%endif# EDIT: If your compiler version is 10 or greater, you must enable the next
gcc.xml
直接使用config/flags/gcc.xml
在线更新 SPEC CPU 2017
source shrc
runcpu --update
日志
(base) yeqiang@yeqiang-MS-7B23:/home/speccpu/cpu2017$ runcpu --update
SPEC CPU(r) 2017 Benchmark Suites
Copyright 1995-2017 Standard Performance Evaluation Corporation (SPEC)runcpu v5825
Using 'linux-x86_64' tools
Reading file manifests... read 32272 entries from 2 files in 0.08s (402042 files/s)
Loading runcpu modules.................
Locating benchmarks...found 47 benchmarks in 53 benchsets.CPU2017 update mode selected
Downloading update information...Selected update:From v1.0.5 to v1.1.9Update size: 35 MBDownloading update metadata: 6745 B (18 KB/s)
Update metadata parsed successfully.Update summary:Files to remove: 21Directories to remove: 0Files to change: 584Files to add: 101
Update metadata downloaded and verified.Checking files that will be changed or removed by the update...
Checks completed.
Update: Downloading update: 35 MB/35 MB (100%; 1982 KB/s))
Update downloaded and verified.Uncompressing update fileProceed with update? (y/n)
ySuite update successful!There is no log file for this run.runcpu finished at 2023-07-03 14:55:49; 80 total seconds elapsed
测试
单核整形、浮点
/home/speccpu/cpu2017
source shrc
runcpu -c gcc.cfg -T base -s -F config/flags/gcc.xml -n 3 -C 0 -i ref intrate fprate
日志
(base) yeqiang@yeqiang-MS-7B23:/home/speccpu/cpu2017$ runcpu -c gcc.cfg -T base -s -F config/flags/gcc.xml -n 3 -C 0 -i ref intrate fprate
SPEC CPU(r) 2017 Benchmark Suites
Copyright 1995-2019 Standard Performance Evaluation Corporation (SPEC)runcpu v6612
Using 'linux-x86_64' tools
Reading file manifests... read 32225 entries from 2 files in 0.08s (394584 files/s)
Loading runcpu modules.................
Locating benchmarks...found 47 benchmarks in 73 benchsets.
Reading config file '/home/speccpu/cpu2017/config/gcc.cfg'
2 configurations selected:Action Run Mode Workload Report Type Benchmarks
-------- -------- -------- ---------------- ---------------------------
validate rate refrate SPECrate2017_int intrate
validate rate refrate SPECrate2017_fp fprate
Downloading update information for version check...
OKVersion 1.1.9 of CPU2017 is the latest available.Reportable runs must include a 'test' run; adding to run list
Reportable runs must include a 'train' run; adding to run list
Reportable runs must include a 'test' run; adding to run list
Reportable runs must include a 'train' run; adding to run list
-------------------------------------------------------------------------------Setting up environment for running intrate...
Starting runcpu for intrate...
Running "specperl /home/speccpu/cpu2017/bin/sysinfo" to gather system information.
sysinfo: r6732 of 2022-11-07 (fe91c89b7ed5c36ae2c92cc097bec197)
sysinfo: ...getting basic information about kernel, users, and limits
sysinfo: Getting system information for Linux...
sysinfo: ...getting CPU info
sysinfo: ...getting info from numactl
sysinfo: ...getting memory info
sysinfo: ...getting info from systemd
sysinfo: ...getting power info
sysinfo: ...getting system tuning info
sysinfo: ...getting OS info
sysinfo: ...getting disk info
sysinfo: ...getting info from /sys/devices/virtual/dmi/id
sysinfo: ...getting info from dmidecode
Retrieving flags file (config/flags/gcc.xml)...
Reportable runs must include a 'test' run; adding to run list
Reportable runs must include a 'train' run; adding to run list
Benchmarks selected: 500.perlbench_r, 502.gcc_r, 505.mcf_r, 520.omnetpp_r, 523.xalancbmk_r, 525.x264_r, 531.deepsjeng_r, 541.leela_r, 548.exchange2_r, 557.xz_r, 999.specrand_ir
Notice: Errors may not be ignored for reportable runs.
Compiling BinariesBuilding 500.perlbench_r base mytest-m64: (build_base_mytest-m64.0000) [2023-07-03 15:03:00]Building 502.gcc_r base mytest-m64: (build_base_mytest-m64.0000) [2023-07-03 15:03:15]Building 505.mcf_r base mytest-m64: (build_base_mytest-m64.0000) [2023-07-03 15:04:15]Building 520.omnetpp_r base mytest-m64: (build_base_mytest-m64.0000) [2023-07-03 15:04:17]Building 523.xalancbmk_r base mytest-m64: (build_base_mytest-m64.0000) [2023-07-03 15:04:38]Building 525.x264_r base mytest-m64: (build_base_mytest-m64.0000) [2023-07-03 15:05:29]Building 531.deepsjeng_r base mytest-m64: (build_base_mytest-m64.0000) [2023-07-03 15:05:41]Building 541.leela_r base mytest-m64: (build_base_mytest-m64.0000) [2023-07-03 15:05:43]Building 548.exchange2_r base mytest-m64: (build_base_mytest-m64.0000) [2023-07-03 15:05:47]Building 557.xz_r base mytest-m64: (build_base_mytest-m64.0000) [2023-07-03 15:05:56]Building 999.specrand_ir base mytest-m64: (build_base_mytest-m64.0000) [2023-07-03 15:05:59]Build successes for intrate: 500.perlbench_r(base), 502.gcc_r(base), 505.mcf_r(base), 520.omnetpp_r(base), 523.xalancbmk_r(base), 525.x264_r(base), 531.deepsjeng_r(base), 541.leela_r(base), 548.exchange2_r(base), 557.xz_r(base), 999.specrand_ir(base)
Build errors for intrate: NoneSetting Up Run DirectoriesSetting up 500.perlbench_r test base mytest-m64 (1 copy): run_base_test_mytest-m64.0000Setting up 502.gcc_r test base mytest-m64 (1 copy): run_base_test_mytest-m64.0000Setting up 505.mcf_r test base mytest-m64 (1 copy): run_base_test_mytest-m64.0000Setting up 520.omnetpp_r test base mytest-m64 (1 copy): run_base_test_mytest-m64.0000Setting up 523.xalancbmk_r test base mytest-m64 (1 copy): run_base_test_mytest-m64.0000Setting up 525.x264_r test base mytest-m64 (1 copy): run_base_test_mytest-m64.0000Setting up 531.deepsjeng_r test base mytest-m64 (1 copy): run_base_test_mytest-m64.0000Setting up 541.leela_r test base mytest-m64 (1 copy): run_base_test_mytest-m64.0000Setting up 548.exchange2_r test base mytest-m64 (1 copy): run_base_test_mytest-m64.0000Setting up 557.xz_r test base mytest-m64 (1 copy): run_base_test_mytest-m64.0000Setting up 999.specrand_ir test base mytest-m64 (1 copy): run_base_test_mytest-m64.0000
Running BenchmarksRunning 500.perlbench_r test base mytest-m64 (1 copy) [2023-07-03 15:06:05]Running 502.gcc_r test base mytest-m64 (1 copy) [2023-07-03 15:06:30]Running 505.mcf_r test base mytest-m64 (1 copy) [2023-07-03 15:06:30]Running 520.omnetpp_r test base mytest-m64 (1 copy) [2023-07-03 15:06:39]Running 523.xalancbmk_r test base mytest-m64 (1 copy) [2023-07-03 15:06:45]Running 525.x264_r test base mytest-m64 (1 copy) [2023-07-03 15:06:46]Running 531.deepsjeng_r test base mytest-m64 (1 copy) [2023-07-03 15:07:03]Running 541.leela_r test base mytest-m64 (1 copy) [2023-07-03 15:07:09]Running 548.exchange2_r test base mytest-m64 (1 copy) [2023-07-03 15:07:14]Running 557.xz_r test base mytest-m64 (1 copy) [2023-07-03 15:07:22]Running 999.specrand_ir test base mytest-m64 (1 copy) [2023-07-03 15:07:32]
Success: 1x500.perlbench_r 1x502.gcc_r 1x505.mcf_r 1x520.omnetpp_r 1x523.xalancbmk_r 1x525.x264_r 1x531.deepsjeng_r 1x541.leela_r 1x548.exchange2_r 1x557.xz_r 1x999.specrand_ir
Benchmarks selected: 500.perlbench_r, 502.gcc_r, 505.mcf_r, 520.omnetpp_r, 523.xalancbmk_r, 525.x264_r, 531.deepsjeng_r, 541.leela_r, 548.exchange2_r, 557.xz_r, 999.specrand_ir
Notice: Errors may not be ignored for reportable runs.
Compiling BinariesUp to date 500.perlbench_r base mytest-m64Up to date 502.gcc_r base mytest-m64Up to date 505.mcf_r base mytest-m64Up to date 520.omnetpp_r base mytest-m64Up to date 523.xalancbmk_r base mytest-m64Up to date 525.x264_r base mytest-m64Up to date 531.deepsjeng_r base mytest-m64Up to date 541.leela_r base mytest-m64Up to date 548.exchange2_r base mytest-m64Up to date 557.xz_r base mytest-m64Up to date 999.specrand_ir base mytest-m64Setting Up Run DirectoriesSetting up 500.perlbench_r train base mytest-m64 (1 copy): run_base_train_mytest-m64.0000Setting up 502.gcc_r train base mytest-m64 (1 copy): run_base_train_mytest-m64.0000Setting up 505.mcf_r train base mytest-m64 (1 copy): run_base_train_mytest-m64.0000Setting up 520.omnetpp_r train base mytest-m64 (1 copy): run_base_train_mytest-m64.0000Setting up 523.xalancbmk_r train base mytest-m64 (1 copy): run_base_train_mytest-m64.0000Setting up 525.x264_r train base mytest-m64 (1 copy): run_base_train_mytest-m64.0000Setting up 531.deepsjeng_r train base mytest-m64 (1 copy): run_base_train_mytest-m64.0000Setting up 541.leela_r train base mytest-m64 (1 copy): run_base_train_mytest-m64.0000Setting up 548.exchange2_r train base mytest-m64 (1 copy): run_base_train_mytest-m64.0000Setting up 557.xz_r train base mytest-m64 (1 copy): run_base_train_mytest-m64.0000Setting up 999.specrand_ir train base mytest-m64 (1 copy): run_base_train_mytest-m64.0000
Running BenchmarksRunning 500.perlbench_r train base mytest-m64 (1 copy) [2023-07-03 15:07:44]Running 502.gcc_r train base mytest-m64 (1 copy) [2023-07-03 15:08:00]Running 505.mcf_r train base mytest-m64 (1 copy) [2023-07-03 15:08:31]Running 520.omnetpp_r train base mytest-m64 (1 copy) [2023-07-03 15:09:17]Running 523.xalancbmk_r train base mytest-m64 (1 copy) [2023-07-03 15:10:05]Running 525.x264_r train base mytest-m64 (1 copy) [2023-07-03 15:10:36]Running 531.deepsjeng_r train base mytest-m64 (1 copy) [2023-07-03 15:10:51]
等待。。。
错误处理
警告Version check returned "1.1.7 1613543369" NOTICE: Your version, 1.0.5, is not the newest
SPEC CPU(r) 2017 Benchmark Suites
Copyright 1995-2017 Standard Performance Evaluation Corporation (SPEC)runcpu v5825
Using 'linux-x86_64' tools
Reading file manifests... read 32272 entries from 2 files in 0.08s (399173 files/s)
Loading runcpu modules.................
Locating benchmarks...found 47 benchmarks in 53 benchsets.
Reading config file '/home/speccpu/cpu2017/config/gcc.cfg'
2 configurations selected:Action Run Mode Workload Report Type Benchmarks
-------- -------- -------- ---------------- ---------------------------
validate rate refrate SPECrate2017_int intrate
validate rate refrate SPECrate2017_fp fprate
Loading "http://www.spec.org/auto/cpu2017/current_version" for version check...
OKVersion check returned "1.1.7 1613543369"
NOTICE: Your version, 1.0.5, is not the newestVersion 1.1.7 was released on 2021-02-17 14:29:29Use 'runcpu --update' to get the new version. For more info, see:https://www.spec.org/cpu2017/Docs/runcpu.html#update----------------------------------The run will continue in 5 seconds----------------------------------
在线更新 SPEC CPU 2017
runcpu --update
日志
(base) yeqiang@yeqiang-MS-7B23:/home/speccpu/cpu2017$ runcpu --update
SPEC CPU(r) 2017 Benchmark Suites
Copyright 1995-2017 Standard Performance Evaluation Corporation (SPEC)runcpu v5825
Using 'linux-x86_64' tools
Reading file manifests... read 32272 entries from 2 files in 0.08s (402042 files/s)
Loading runcpu modules.................
Locating benchmarks...found 47 benchmarks in 53 benchsets.CPU2017 update mode selected
Downloading update information...Selected update:From v1.0.5 to v1.1.9Update size: 35 MBDownloading update metadata: 6745 B (18 KB/s)
Update metadata parsed successfully.Update summary:Files to remove: 21Directories to remove: 0Files to change: 584Files to add: 101
Update metadata downloaded and verified.Checking files that will be changed or removed by the update...
Checks completed.
Update: Downloading update: 35 MB/35 MB (100%; 1982 KB/s))
Update downloaded and verified.Uncompressing update fileProceed with update? (y/n)
ySuite update successful!There is no log file for this run.runcpu finished at 2023-07-03 14:55:49; 80 total seconds elapsed