{"id":3508,"date":"2021-04-10T04:58:08","date_gmt":"2021-04-09T20:58:08","guid":{"rendered":"http:\/\/www.chenlianfu.com\/?p=3508"},"modified":"2021-04-10T10:37:11","modified_gmt":"2021-04-10T02:37:11","slug":"%e4%bd%bf%e7%94%a8hpl%e8%bd%af%e4%bb%b6%e6%b5%8b%e8%af%95%e6%9c%8d%e5%8a%a1%e5%99%a8%e6%b5%ae%e7%82%b9%e6%95%b0%e8%ae%a1%e7%ae%97%e6%80%a7%e8%83%bd","status":"publish","type":"post","link":"http:\/\/www.chenlianfu.com\/?p=3508","title":{"rendered":"\u4f7f\u7528HPL\u8f6f\u4ef6\u6d4b\u8bd5\u670d\u52a1\u5668\u6d6e\u70b9\u6570\u8ba1\u7b97\u6027\u80fd"},"content":{"rendered":"\n<p><a rel=\"noreferrer noopener\" href=\"http:\/\/www.netlib.org\/benchmark\/hpl\/\" target=\"_blank\">HPL\uff08High-Performance Linpack\uff09\u8f6f\u4ef6<\/a>\u4f7f\u7528Linpack\u7b97\u6cd5\u6765\u6d4b\u8bd5\u8ba1\u7b97\u673a\u53cc\u7cbe\u5ea6\u6d6e\u70b9\u6570\u8ba1\u7b97\u6027\u80fd\u3002<\/p>\n\n\n\n<p>\u5b89\u88c5HPL\u8f6f\u4ef6<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u5b89\u88c5mpich\nwget http:\/\/www.mpich.org\/static\/downloads\/3.3\/mpich-3.3.tar.gz -P ~\/software\/\ntar zxf ~\/software\/mpich-3.3.tar.gz\ncd mpich-3.3\n.\/configure --prefix=\/opt\/sysoft\/mpich-3.3 &amp;&amp; make -j 4 &amp;&amp; make install\ncd .. &amp;&amp; rm -rf mpich-3.3\necho 'export PKG_CONFIG_PATH=\/opt\/sysoft\/mpich-3.3\/lib\/pkgconfig:$PKG_CONFIG_PATH' > ~\/.bashrc.mpich\necho 'export LD_LIBRARY_PATH=\/opt\/sysoft\/mpich-3.3\/lib:$LD_LIBRARY_PATH' >> ~\/.bashrc.mpich\necho 'export C_INCLUDE_PATH=\/opt\/sysoft\/mpich-3.3\/include:$C_INCLUDE_PATH' >> ~\/.bashrc.mpich\necho 'export PATH=\/opt\/sysoft\/mpich-3.3\/bin\/:$PATH' >> ~\/.bashrc.mpich\nsource ~\/.bashrc.mpich\n\n# \u5b89\u88c5openblas\nsudo yum -y install openblas openblas-devel\n# \u82e5\u662fCentOS8\u7cfb\u7edf\nsudo dnf --enablerepo=PowerTools install gcc-fortran openblas openblas-devel\n\n# \u5b89\u88c5hpl\nwget http:\/\/www.netlib.org\/benchmark\/hpl\/hpl-2.3.tar.gz\ntar zxf hpl-2.3.tar.gz\ncd hpl-2.3\/\nsource ~\/.bashrc.mpich\n.\/configure --prefix=\/opt\/sysoft\/hpl-2.3\nmake -j 8\nmake install\ncd ..\/ &amp;&amp; rm -rf hpl-2.3<\/code><\/pre>\n\n\n\n<p>\u5728\u5f53\u524d\u76ee\u5f55\u4e0b\u751f\u6210HPL\u7684\u914d\u7f6e\u6587\u4ef6HPL.dat\uff0c\u8be5\u914d\u7f6e\u6587\u4ef6\u9002\u540872\u6838\u5fc3\u7684\u5355\u8282\u70b9\u670d\u52a1\u5668\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>HPLinpack benchmark input file\nInnovative Computing Laboratory, University of Tennessee\nHPL.out      output file name (if any)\n6            device out (6=stdout,7=stderr,file)\n1            # of problems sizes (N)\n82944        Ns\n1            # of NBs\n144          NBs\n0            PMAP process mapping (0=Row-,1=Column-major)\n1            # of process grids (P x Q)\n8            Ps\n9            Qs\n16.0         threshold\n2            # of panel fact\n2 1 0        PFACTs (0=left, 1=Crout, 2=Right)\n1            # of recursive stopping criterium\n2 4          NBMINs (>= 1)\n1            # of panels in recursion\n2            NDIVs\n1            # of recursive panel fact.\n1 0 2        RFACTs (0=left, 1=Crout, 2=Right)\n1            # of broadcast\n0            BCASTs (0=1rg,1=1rM,2=2rg,3=2rM,4=Lng,5=LnM)\n1            # of lookahead depth\n0            DEPTHs (>=0)\n2            SWAP (0=bin-exch,1=long,2=mix)\n64           swapping threshold\n0            L1 in (0=transposed,1=no-transposed) form\n0            U  in (0=transposed,1=no-transposed) form\n1            Equilibration (0=no,1=yes)\n8            memory alignment in double (> 0)\n<\/code><\/pre>\n\n\n\n<p>\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684\u91cd\u8981\u53c2\u6570\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">1        # of problems sizes (N)\n    \u8bbe\u7f6e\u7a0b\u5e8f\u8fd0\u884c\u65f6\u4f7f\u7528\u7684 N \u503c\u7684\u4e2a\u6570\u3002\n82944    Ns\n    \u8bbe\u7f6e\u7a0b\u5e8f\u8fd0\u884c\u65f6\u4f7f\u7528\u7684 N \u503c\u3002\u4e0a\u4e00\u4e2a\u53c2\u6570\u7684\u503c\u6709\u591a\u5927\uff0c\u6b64\u5904\u5219\u8f93\u5165\u5bf9\u5e94\u4e2a\u6570\u7684 N \u503c\u3002N \u503c\u4e3aLinpack\u8fdb\u884c\u6d6e\u70b9\u8fd0\u7b97\u7684\u95ee\u9898\u89c4\u6a21\u3002\u6c42\u89e3\u95ee\u9898\u89c4\u6a21\u4e3aN\u65f6\uff0cLinpack\u6d6e\u70b9\u8fd0\u7b97\u6b21\u6570 = 2 \/ 3 * N^3 - 2 * N^2\u3002\u518d\u6d4b\u5f97\u7cfb\u7edf\u8ba1\u7b97\u6240\u6d88\u8017\u7684\u65f6\u95f4T\uff0c\u5373\u53ef\u7b97\u51fa\u6d6e\u70b9\u8fd0\u7b97\u6bcf\u79d2\u6b21\u6570FLOPS\u503c\u3002\u9700\u6ce8\u610f\u5185\u5b58\u548c\u8ba1\u7b97\u65f6\u95f4\u6d88\u8017\u968f\u8be5\u503c\u589e\u5927\u5448\u6307\u6570\u7ea7\u589e\u52a0\uff0c\u5185\u5b58\u6d88\u8017=N*N*8\u3002\u6bd4\u5982\u8be5\u53c2\u6570\u503c\u4e3a20000\u65f6\u6d88\u80173.2GB\u5185\u5b58\uff0c\u8bbe\u7f6e\u4e3a30000\u65f6\u6d88\u8017\u7ea67.2GB\u5185\u5b58\u3002\u5728HPL\u8f6f\u4ef6\u8fdb\u884c\u8ba1\u7b97\u65f6\uff0c\u8be5\u503c\u8bbe\u7f6e\u8d8a\u5927\uff0c\u6709\u6548\u8ba1\u7b97\u6240\u5360\u7684\u6bd4\u4f8b\u4e5f\u8d8a\u5927\uff0c\u5176\u7ed3\u679cFLOPS\u503c\u8d8a\u5927\u3002\u6b64\u5916\uff0c\u8be5\u503c\u63a8\u8350\u8bbe\u7f6e\u4e3a P * Q * NB \u7684\u6574\u6570\u500d\u3002\n1        # of NBs\n    \u8bbe\u7f6e\u7a0b\u5e8f\u8fd0\u884c\u65f6\u4f7f\u7528\u7684 NB \u503c\u7684\u4e2a\u6570\u3002\n144      NBs\n    \u8bbe\u7f6e\u6570\u636e\u5206\u5757\u6570\u91cf\uff0c\u6709\u5229\u4e8e\u5e76\u884c\u5316\u8ba1\u7b97\u3002\u4e0a\u4e00\u4e2a\u53c2\u6570\u7684\u503c\u6709\u591a\u5927\uff0c\u6b64\u5904\u5219\u8f93\u5165\u5bf9\u5e94\u4e2a\u6570\u7684 NB \u503c\u3002\u63a8\u8350\u8bbe\u7f6e\u4e3a P * Q \u7684\u6574\u6570\u500d\u3002\u8981\u8ba1\u7b97\u7684\u95ee\u9898\u89c4\u6a21\u6bd4\u8f83\u5927\uff0c\u5c06\u8fd9\u4e9b\u8ba1\u7b97\u5747\u5300\u5206\u914d\u7ed9\u5404\u4e2aCPU\u6838\u5fc3\u3002\n1        # of process grids (P x Q)\n    \u8bbe\u7f6e\u7a0b\u5e8f\u8fd0\u884c\u65f6\u4f7f\u7528\u7684 P x Q \u7684\u4e2a\u6570\u3002\n8        Ps\n9        Qs\n    \u8bbe\u7f6e\u5e76\u884c\u5316\u548c\u591a\u7ebf\u7a0b\u7684CPU\u4f7f\u7528\u4e2a\u6570\u3002\u5c3d\u53ef\u80fd\u8ba9P\u548cQ\u76f8\u7b49\uff0c\u5e76\u4f7f\u4e24\u8005\u7684\u4e58\u79ef\u4e3a\u670d\u52a1\u5668\u7684CPU\u603b\u6838\u5fc3\u6570\uff0c\u4f7fP &lt;= Q\uff0c\u4e5f\u6700\u597d\u4f7fP\u503c\u4e3a2\u7684n\u6b21\u65b9\u3002\u4e0a\u4e00\u4e2a\u53c2\u6570\u8bbe\u7f6e\u6709\u591a\u5927\uff0c\u5219\u6b64\u5904\u8f93\u5165\u5bf9\u5e94\u4e2a\u6570\u7684P\u548cQ\u503c\u3002\n2       # of panel fact\n2 1 0 PFACTs (0=left, 1=Crout, 2=Right)\n    \u8bbe\u7f6epanel fact\u7684\u503c\u4e2a\u6570\u3002\u4e0a\u9762\u8bbe\u7f6e\u4e86\u4f7f\u75282\u79cdpanel fact\u53c2\u6570\uff0c\u4e0b\u4e00\u4e2a\u53c2\u6570\u867d\u7136\u67093\u4e2a\u503c\uff0c\u4e8e\u662fHPL\u8fd0\u884c\u65f6\u9009\u53d6\u4f7f\u7528\u524d\u4e24\u4e2a\u503c\u3002\n    \u540e\u9762\u8fd8\u6709\u51e0\u4e2a\u8fd9\u6837\u7684\u53c2\u6570\u8bbe\u7f6e\u3002\u4f46\u662f\u5bf9\u7ed3\u679c\u5f71\u54cd\u4e0d\u5927\u3002\u53ea\u6709\u524d\u9762\u7684N, NB, P \u548c Q \u5bf9\u7ed3\u679c\u5f71\u54cd\u8f83\u5927\u3002\u7279\u522b\u662f N \u503c\u5f71\u54cd\u6700\u5927\u3002<\/pre>\n\n\n\n<p>\u8fd0\u884cHPL\u7a0b\u5e8f\u8fdb\u884cFLOPS\u8ba1\u7b97<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/opt\/sysoft\/mpich-3.3\/bin\/mpirun -np 72 \/opt\/sysoft\/hpl-2.3\/bin\/xhpl\n\n    \u7a0b\u5e8f\u8fd0\u884c\u9700\u8981\u5f53\u524d\u76ee\u5f55\u4e0b\u5b58\u5728HPL.date\u914d\u7f6e\u6587\u4ef6\u3002<\/code><\/pre>\n\n\n\n<p>\u7a0b\u5e8f\u8fd0\u884c\u7684\u6ce8\u610f\u4e8b\u9879\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\uff081\uff09mpirun\u7684-np\u53c2\u6570\u503c\u662f\u670d\u52a1\u5668\u7684CPU\u603b\u6838\u5fc3\u6570\u3002\u5bf9\u5e94\u7740\u53c2\u6570\u6587\u4ef6\u79cd P * Q \u7684\u503c\u3002\u8981\u6c42 -np \u53c2\u6570\u7684\u503c >= P * Q\uff0c\u5426\u5219\u7a0b\u5e8f\u62a5\u9519\u3002\n\uff082\uff09HPL\u82e5\u4f7f\u7528\u8d85\u7ebf\u7a0b\u540e\u603bCPU\u7ebf\u7a0b\u6570\u6765\u8fdb\u884c\u8ba1\u7b97\uff0c\u5176FLOPS\u503c\u66f4\u4f4e\uff0c\u6bd4\u7528\u603b\u6838\u5fc3\u6570\u4f4e\u7ea620%\u3002\n\uff083\uff09\u82e5\u53ef\u4ee5\u7684\u8bdd\uff0c\u8bbe\u7f6e\u4e0d\u540c\u7684\u53c2\u6570\u6765\u8ba9HPL\u7a0b\u5e8f\u8fd0\u884c\u591a\u6b21\uff0c\u53d6\u5176\u6700\u9ad8\u503c\uff08\u5cf0\u503c\uff09\u4f5c\u4e3a\u670d\u52a1\u7684FLOPS\u8ba1\u7b97\u6027\u80fd\u3002\n\uff084\uff09\u914d\u7f6e\u4ee5 # \u5f00\u59cb\u7684\u53c2\u6570\u7528\u4e8e\u8bbe\u7f6e\u591a\u4e2a\u503c\uff0c\u7a0b\u5e8f\u67097\u4e2a\u53c2\u6570\u53ef\u4ee5\u8bbe\u7f6e\u4e0d\u540c\u7684\u591a\u4e2a\u503c\uff0c\u4e8e\u662f\u6392\u5217\u7ec4\u5408\u540e\u53ef\u4ee5\u8fd0\u884c\u5f88\u591a\u6b21\uff0c\u9009\u62e9\u6700\u5927\u503c\u4f5c\u4e3aFLOPS\u8ba1\u7b97\u5cf0\u503c\u3002\n\uff085\uff09\u5f53\u8bbe\u7f6e\u591a\u79cd\u53c2\u6570\u503c\uff0c\u4f1a\u5f88\u6d88\u8017\u8ba1\u7b97\u65f6\u95f4\uff0c\u4e14\u5176\u7ed3\u679c\u90fd\u76f8\u5dee\u4e0d\u5927\uff0c\u5219\u53ef\u4ee5\u8003\u8651\u8282\u7ea6\u65f6\u95f4\uff0c\u4e0d\u7528\u8bbe\u7f6e\u592a\u591a\u7684\u53c2\u6570\u503c\u3002\n\uff086\uff09\u7a0b\u5e8f\u7b2c\u4e00\u4e2a\u8fd0\u884c\u79cdCPU\u521a\u5524\u9192\uff0c\u5bfc\u81f4\u5176\u6709\u6548\u8ba1\u7b97\u6240\u5360\u7684\u6bd4\u4f8b\u8981\u5c0f\u4e9b\uff0c\u5176\u7ed3\u679c\u4f1a\u5dee\u4e9b\uff0c\u7279\u522b\u662fN\u503c\u8bbe\u7f6e\u4e0d\u591f\u5927\u65f6\u66f4\u660e\u663e\uff0c\u63a8\u8350\u81f3\u5c11\u67092\u6b21\u8fd0\u884c\u3002\n\uff087\uff09\u8bbe\u7f6e\u7a0d\u5927\u7684 N \u503c\uff0c\u8ba9\u6bcf\u6b21Linpack\u7a0b\u5e8f\u8fd0\u884c\u65f6\u95f4\u957f\u5ea6\u8d85\u8fc7200\u79d2,\u5219\u83b7\u5f97\u7684\u7ed3\u679c\u66f4\u51c6\u786e\u4e9b\u3002\u82e5\u8fd0\u884c\u65f6\u95f4\u592a\u957f\uff0c\u5219\u611f\u89c9\u5f88\u8d39\u65f6\u95f4\u3002<\/pre>\n\n\n\n<p>\u7a0b\u5e8f\u7ed3\u679c\u5982\u4e0b\u3002\u6309\u4e0a\u9762\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u8bbe\u7f6e\u4e862\u4e2a\u4e0d\u540c\u7684\u53c2\u6570\u8fd0\u884c\u3002\u7b2c\u4e00\u6b21\u8fd0\u884c\u7684\u7ed3\u679c\u4e00\u822c\u8f83\u4f4e\uff0c\u76f4\u63a5\u770b\u7b2c\u4e8c\u6b21\u7684\u7ed3\u679c\u4f5c\u4e3a\u670d\u52a1\u5668\u7684\u8ba1\u7b97\u6027\u80fd\uff1a1297 Gflops\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>================================================================================\nT\/V                N    NB     P     Q               Time                 Gflops\n--------------------------------------------------------------------------------\nWR00C2R2       82944   144     8     9             311.44             1.2215e+03\nHPL_pdgesv() start time Sat Apr 10 06:32:55 2021\n\nHPL_pdgesv() end time   Sat Apr 10 06:38:06 2021\n\n--------------------------------------------------------------------------------\n||Ax-b||_oo\/(eps*(||A||_oo*||x||_oo+||b||_oo)*N)=   1.11497782e-03 ...... PASSED\n================================================================================\nT\/V                N    NB     P     Q               Time                 Gflops\n--------------------------------------------------------------------------------\nWR00C2C2       82944   144     8     9             293.31             1.2970e+03\nHPL_pdgesv() start time Sat Apr 10 06:38:15 2021\n\nHPL_pdgesv() end time   Sat Apr 10 06:43:09 2021\n\n--------------------------------------------------------------------------------\n||Ax-b||_oo\/(eps*(||A||_oo*||x||_oo+||b||_oo)*N)=   1.07067674e-03 ...... PASSED\n================================================================================<\/code><\/pre>\n\n\n\n<p>\u4f7f\u7528HPL\u5bf9\u4e00\u4e9b\u670d\u52a1\u5668\u7684FLOPS\u6d4b\u8bd5\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>\u670d\u52a1\u5668\u578b\u53f7        CPU\u578b\u53f7\u6570\u91cf        \u6574\u4f53FLOPS<\/strong>          <strong>\u7cfb\u7edf<\/strong>\n\u60e0\u666eDL580G9      E7-8890 V3 * 4    1297.0 GFlops      CentOS7\n\u534e\u4e3aRH5885H V3   E7-4890 V2 * 4    904.68 GFlops      CentOS7\n\u534e\u4e3aRH5885H V3   E7-4890 V2 * 4    614.23 GFlops      CentOS8\n\u60e0\u666eDL980G7      E7-4870 * 4       339.53 GFlops      CentOS8<\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>HPL\uff08High-Performance Linpack\uff09\u8f6f\u4ef6\u4f7f\u7528Linpack &hellip; <a href=\"http:\/\/www.chenlianfu.com\/?p=3508\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/www.chenlianfu.com\/index.php?rest_route=\/wp\/v2\/posts\/3508"}],"collection":[{"href":"http:\/\/www.chenlianfu.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.chenlianfu.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.chenlianfu.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.chenlianfu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3508"}],"version-history":[{"count":13,"href":"http:\/\/www.chenlianfu.com\/index.php?rest_route=\/wp\/v2\/posts\/3508\/revisions"}],"predecessor-version":[{"id":3525,"href":"http:\/\/www.chenlianfu.com\/index.php?rest_route=\/wp\/v2\/posts\/3508\/revisions\/3525"}],"wp:attachment":[{"href":"http:\/\/www.chenlianfu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3508"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.chenlianfu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3508"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.chenlianfu.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3508"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}