估计 Linux 中的 FLOPS?

mol*_*ear 16 linux benchmark

我正在寻找一个快速简单的程序来估计我的 Linux 系统上的 FLOPS。我找到了HPL,但事实证明编译它很烦人。我所需要的只是对 FLOPS 的大致估计,而无需花一天时间研究基准测试包和安装相关软件。有没有这样的程序?编写一个在循环中乘以两个浮点数的 C 程序是否足够?

rog*_*ack 8

显然有一个“sysbench”基准测试包和命令:

sudo apt-get install sysbench(或brew install sysbenchOS X)

像这样运行它:

sysbench --test=cpu --cpu-max-prime=20000 --num-threads=2 run

比较输出:

 total time:                          15.3047s
Run Code Online (Sandbox Code Playgroud)

参考:http : //www.midwesternmac.com/blogs/jeff-geerling/2013-vps-benchmarks-linode

  • 这如何给 FLOPS? (3认同)

Ron*_*tol 7

问题是你所说的翻牌是什么意思?如果您只关心每个时钟有多少最简单的浮点运算,它可能是您时钟速度的 3 倍,但这与 bogomips 一样毫无意义。一些浮点运算需要很长时间(对于初学者来说是除法),加法和乘法通常很快(每个时钟每个 fp 单位一个)。下一个问题是内存性能,上一个经典的 CRAY 有 31 个内存条是有原因的,最终 CPU 性能受到内存读写速度的限制,那么你的问题适合什么级别的缓存?Linpack 曾经是一个真正的基准测试,现在它适合缓存(如果不是 L1,则为 L2)并且更像是一个纯粹的理论 CPU 基准测试。当然,您的 SSE(等)单元也可以增加浮点性能。

你运行什么发行版?

这看起来是一个很好的指针:http : //linuxtoolkit.blogspot.com/2009/04/intel-optimized-linpack-benchmark-for.html

http://onemansjourneyintolinux.blogspot.com/2008/12/show-us-yer-flops.html

http://www.phoronix-test-suite.com/可能是安装 flops 基准的更简单方法。

我仍然想知道你为什么关心,你用它做什么?如果你只是想要一个无意义的数字,你的系统 bogomips 仍然在 dmesg 中。

  • Phoronix 似乎正是我要找的——谢谢!我想要这个的唯一原因是因为我正在填写一份调查,询问我有多少 teraflops 的计算能力。调查并不是很重要,所以我并不担心答案的准确性。不过,能够说“我们的集群可以执行 X teraflops”还是很不错的。尽管正如您指出的那样,该数字不一定在现实世界中具有太多意义。 (2认同)

Mar*_*oma 5

对于棒球场估计:

链接包

  1. 下载它(链接
  2. 提取它
  3. cd benchmarks_2017/linux/mkl/benchmarks/linpack
  4. ./runme_xeon64
  5. 稍等片刻(1个多小时)

在 Thinkpad T460p(Intel i7-6700HQ CPU)上,它提供:

This is a SAMPLE run script for SMP LINPACK. Change it to reflect
the correct number of CPUs/threads, problem input files, etc..
./runme_xeon64: 33: [: -gt: unexpected operator
Mi 21. Dez 11:50:29 CET 2016
Intel(R) Optimized LINPACK Benchmark data

Current date/time: Wed Dec 21 11:50:29 2016

CPU frequency:    3.491 GHz
Number of CPUs: 1
Number of cores: 4
Number of threads: 4

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=9800701024, at the size=35000

=================== Timing linear equation system solver ===================

Size   LDA    Align. Time(s)    GFlops   Residual     Residual(norm) Check
1000   1000   4      0.014      46.5838  1.165068e-12 3.973181e-02   pass
1000   1000   4      0.010      64.7319  1.165068e-12 3.973181e-02   pass
1000   1000   4      0.009      77.3583  1.165068e-12 3.973181e-02   pass
1000   1000   4      0.010      67.0096  1.165068e-12 3.973181e-02   pass
2000   2000   4      0.064      83.6177  5.001027e-12 4.350281e-02   pass
2000   2000   4      0.063      84.5568  5.001027e-12 4.350281e-02   pass
5000   5008   4      0.709      117.6800 2.474679e-11 3.450740e-02   pass
5000   5008   4      0.699      119.2350 2.474679e-11 3.450740e-02   pass
10000  10000  4      4.895      136.2439 9.069137e-11 3.197870e-02   pass
10000  10000  4      4.904      135.9888 9.069137e-11 3.197870e-02   pass
15000  15000  4      17.260     130.3870 2.052533e-10 3.232773e-02   pass
15000  15000  4      18.159     123.9303 2.052533e-10 3.232773e-02   pass
18000  18008  4      31.091     125.0738 2.611497e-10 2.859910e-02   pass
18000  18008  4      31.869     122.0215 2.611497e-10 2.859910e-02   pass
20000  20016  4      44.877     118.8622 3.442628e-10 3.047480e-02   pass
20000  20016  4      44.646     119.4762 3.442628e-10 3.047480e-02   pass
22000  22008  4      57.918     122.5811 4.714135e-10 3.452918e-02   pass
22000  22008  4      57.171     124.1816 4.714135e-10 3.452918e-02   pass
25000  25000  4      86.259     120.7747 5.797896e-10 3.297056e-02   pass
25000  25000  4      83.721     124.4356 5.797896e-10 3.297056e-02   pass
26000  26000  4      97.420     120.2906 5.615238e-10 2.952660e-02   pass
26000  26000  4      96.061     121.9924 5.615238e-10 2.952660e-02   pass
27000  27000  4      109.479    119.8722 5.956148e-10 2.904520e-02   pass
30000  30000  1      315.697    57.0225  8.015488e-10 3.159714e-02   pass
35000  35000  1      2421.281   11.8061  1.161127e-09 3.370575e-02   pass

Performance Summary (GFlops)

Size   LDA    Align.  Average  Maximal
1000   1000   4       63.9209  77.3583 
2000   2000   4       84.0872  84.5568 
5000   5008   4       118.4575 119.2350
10000  10000  4       136.1164 136.2439
15000  15000  4       127.1586 130.3870
18000  18008  4       123.5477 125.0738
20000  20016  4       119.1692 119.4762
22000  22008  4       123.3813 124.1816
25000  25000  4       122.6052 124.4356
26000  26000  4       121.1415 121.9924
27000  27000  4       119.8722 119.8722
30000  30000  1       57.0225  57.0225 
35000  35000  1       11.8061  11.8061 

Residual checks PASSED

End of tests

Done: Mi 21. Dez 12:58:23 CET 2016
Run Code Online (Sandbox Code Playgroud)