免費工具

測試 CPU 每秒浮點運算次數 FLOPS 運算效能教學

介紹如何使用 Intel LINPACK Benchmark 工具測試 CPU 的每秒浮點運算次數(FLOPS)。

Step 1
Intel 官方網站下載 MKL(Math Kernel Library)標竿測試工具,這個工具有分為 Windows、macOS 與 Linux 版本,請依照自己的平台下載對應的版本。
Step 2
執行位於 windowsmklbenchmarkslinpack 目錄之下的 runme_xeon64.bat

LINPACK 標竿測試

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

Share
Published by
Office Guide

Recent Posts

Python 使用 PyAutoGUI 自動操作滑鼠與鍵盤

本篇介紹如何在 Python ...

9 個月 ago

Ubuntu Linux 以 WireGuard 架設 VPN 伺服器教學與範例

本篇介紹如何在 Ubuntu ...

9 個月 ago

Linux 網路設定 ip 指令用法教學與範例

本篇介紹如何在 Linux 系...

9 個月 ago

Windows 使用 TPM 虛擬智慧卡保護 SSH 金鑰教學與範例

本篇介紹如何在 Windows...

10 個月 ago

Linux 以 Shamir’s Secret Sharing 分割保存金鑰教學與範例

介紹如何在 Linux 中使用...

10 個月 ago

Linux 以 Cryptsetup、LUKS 加密 USB 隨身碟教學與範例

介紹如何在 Linux 系統中...

10 個月 ago