介紹如何使用 Intel LINPACK Benchmark 工具測試 CPU 的每秒浮點運算次數(FLOPS)。
Step 1
從 Intel 官方網站下載 MKL(Math Kernel Library)標竿測試工具,這個工具有分為 Windows、macOS 與 Linux 版本,請依照自己的平台下載對應的版本。
Step 2
執行位於
windowsmklbenchmarkslinpack
目錄之下的 runme_xeon64.bat
。
Step 3
LINPACK 標竿測試的結果會儲存在 win_xeon64.txt
這個檔案中,其內容大致會像這樣。
Sample data file lininput_xeon64. Current date/time: Tue Apr 14 09:23:12 2020 CPU frequency: 1.631 GHz Number of CPUs: 1 Number of cores: 2 Number of threads: 2 Parameters are set to: Number of tests: 15 Number of equations to solve (problem size) : 1000 2000 5000 10000 15000 18000 20000 22000 25000 26000 27000 30000 35000 40000 45000 Leading dimension of array : 1000 2000 5008 10000 15000 18008 20016 22008 25000 26000 27000 30000 35000 40000 45000 Number of trials to run : 4 2 2 2 2 2 2 2 2 2 1 1 1 1 1 Data alignment value (in Kbytes) : 4 4 4 4 4 4 4 4 4 4 4 1 1 1 1 Maximum memory requested that can be used=16200901024, at the size=45000 =================== Timing linear equation system solver =================== Size LDA Align. Time(s) GFlops Residual Residual(norm) Check 1000 1000 4 0.026 25.4123 1.197552e-12 4.083962e-02 pass 1000 1000 4 0.019 35.5184 1.197552e-12 4.083962e-02 pass 1000 1000 4 0.017 40.1228 1.197552e-12 4.083962e-02 pass 1000 1000 4 0.035 18.8549 1.197552e-12 4.083962e-02 pass 2000 2000 4 0.126 42.5335 3.689105e-12 3.209069e-02 pass 2000 2000 4 0.125 42.7847 3.689105e-12 3.209069e-02 pass 5000 5008 4 1.627 51.2364 2.162331e-11 3.015197e-02 pass 5000 5008 4 1.718 48.5431 2.162331e-11 3.015197e-02 pass 10000 10000 4 12.680 52.5925 1.090217e-10 3.844215e-02 pass 10000 10000 4 15.221 43.8123 1.090217e-10 3.844215e-02 pass 15000 15000 4 52.129 43.1711 2.375579e-10 3.741577e-02 pass 15000 15000 4 40.432 55.6608 2.375579e-10 3.741577e-02 pass 18000 18008 4 72.897 53.3443 3.140936e-10 3.439711e-02 pass 18000 18008 4 114.054 34.0947 3.140936e-10 3.439711e-02 pass 20000 20016 4 108.742 49.0532 3.439756e-10 3.044937e-02 pass 20000 20016 4 98.986 53.8879 3.439756e-10 3.044937e-02 pass [略]
從測試的結果中可以看出來,這一顆 1.631 GHz 的 CPU 每秒浮點運算次數大約可以達到 55 GFlops
左右。
參考資料:linustechtips