How to run HPL/HPCG/IO500 in WSL (5) | 青训营笔记

442 阅读1分钟

3. HPCG Test

  1. Get source from github.com/hpcg-benchm….

     git clone https://github.com/hpcg-benchmark/hpcg.git && cd hpcg
    
  2. Copy example config.

     cp setup/Make.Linux_MPI ./
    
  3. Modify Configuration, using nano Make.Linux_MPI.

     TOPdir       = $(HOME)/hpcg
     ​
     MPdir        = /usr/lib/x86_64-linux-gnu/openmpi
     MPinc        = -I$(MPdir)/include
     MPlib        = $(MPdir)/lib/libmpi.so
     ​
     HPCG_OPTS     = -DHPCG_NO_OPENMP -DHPCG_DETAILED_TIMING
    
  4. Build from source. If the build fails, delete the folder and download the source code again.

     make arch=Linux_MPI -j4
    
  5. Now you can find the xhpcg and hpcg.dat files in the bin directory

  6. Test HPCG.

     cd bin
     mpirun -np 4 xhpcg --nx=16 --rt=1800
     # The test will last for 30 minutes (1800 seconds)
    

    Output in file hpcg<identifier>.txt and HPCG-Benchmark_3.1_<identifier>.txt:

     $ cat HPCG-Benchmark_3.1_<identifier>.txt | grep GFLOP
     GFLOP/s Summary=
     GFLOP/s Summary::Raw DDOT=1.46162
     GFLOP/s Summary::Raw WAXPBY=18.9513
     GFLOP/s Summary::Raw SpMV=10.583
     GFLOP/s Summary::Raw MG=8.18653
     GFLOP/s Summary::Raw Total=7.88411
     GFLOP/s Summary::Total with convergence overhead=7.88411
     GFLOP/s Summary::Total with convergence and optimization phase overhead=7.55894
     Final Summary::HPCG result is VALID with a GFLOP/s rating of=7.55894
    

    Result is 7.55894 GFLOP/s

  7. Performance Tuning

    See github.com/hpcg-benchm… and modify the HPCG.dat

     HPCG benchmark input file
     Sandia National Laboratories; University of Tennessee, Knoxville
     120 120 120
     120
    

    And run again.

4. IO500 Test

  1. Clone the io500 source.

     git clone https://github.com/IO500/io500.git && cd io500
    
  2. To Retrieve the required packages and compile the library version, run:

     sudo apt install pkg-config # to solve autoconf errors
     ./prepare.sh
    

    When it’s OK,output:

     OK: All required software packages are now prepared
     ior  md-workbench  mdtest  pfind
    
  3. In order to create a new INI file with all the options, you can execute:

     ./io500 --list > config-all.ini
    
  4. (Optional) Modify config-all.ini (My disk space is not enough, you may need not modify).

     [ior-easy]
     blockSize = 100m
     ​
     [mdtest-easy]
     n = 100
     ​
     [ior-hard]
     segmentCount = 100
     ​
     [find-hard]
     pfind-queue-length = 100
    
  5. Then you can running the io500 test:

     mpiexec -np 8 ./io500 config-all.ini
    

    Output:

     IO500 version io500-isc23 (standard)
     ERROR INVALID (src/phase_dbg.c:15) stonewall-time < 300s
     ERROR INVALID (src/phase_ior.c:24) Write phase needed 1.370603s instead of stonewall 5s. Stonewall was hit at 0.2s
     ERROR INVALID (src/main.c:437) Runtime of phase (1.379476) is below stonewall time. This shouldn't happen!
     ERROR INVALID (src/main.c:443) Runtime is smaller than expected minimum runtime
     [RESULT]       ior-easy-write        0.570005 GiB/s : time 1.379 seconds [INVALID]
     ERROR INVALID (src/main.c:437) Runtime of phase (1.056533) is below stonewall time. This shouldn't happen!
     ERROR INVALID (src/main.c:443) Runtime is smaller than expected minimum runtime
     [RESULT]    mdtest-easy-write       15.711578 kIOPS : time 1.057 seconds [INVALID]
     [      ]            timestamp        0.000000 kIOPS : time 0.000 seconds
     ERROR INVALID (src/phase_ior.c:24) Write phase needed 0.484803s instead of stonewall 5s. Stonewall was hit at 0.0s
     ERROR INVALID (src/main.c:437) Runtime of phase (0.485622) is below stonewall time. This shouldn't happen!
     ERROR INVALID (src/main.c:443) Runtime is smaller than expected minimum runtime
     [RESULT]       ior-hard-write        0.072243 GiB/s : time 0.486 seconds [INVALID]
     ERROR INVALID (src/main.c:443) Runtime is smaller than expected minimum runtime
     [RESULT]    mdtest-hard-write       56.509355 kIOPS : time 8.147 seconds [INVALID]
     [RESULT]                 find     2339.353769 kIOPS : time 0.173 seconds
     [RESULT]        ior-easy-read       14.772937 GiB/s : time 0.057 seconds
     [RESULT]     mdtest-easy-stat     2115.664061 kIOPS : time 1.002 seconds
     [RESULT]        ior-hard-read       18.307577 GiB/s : time 0.002 seconds
     [RESULT]     mdtest-hard-stat     7693.419492 kIOPS : time 1.059 seconds
     [RESULT]   mdtest-easy-delete      481.067125 kIOPS : time 1.003 seconds
     [RESULT]     mdtest-hard-read     1630.211454 kIOPS : time 1.252 seconds
     [RESULT]   mdtest-hard-delete      145.488834 kIOPS : time 3.870 seconds
     [SCORE ] Bandwidth 1.826809 GiB/s : IOPS 499.212193 kiops : TOTAL 30.198765 [INVALID]
     ​
     The result files are stored in the directory: ./results/<date>-<time>
    

    Why is [INVALID], because the running time is not enough for 300 seconds :).

  6. Performance Tuning.

    Modify the config-all.ini

     [ior-easy]
     blockSize = 9920000m
     ​
     [mdtest-easy]
     n = 1000000
     ​
     [ior-hard]
     segmentCount = 10000000
     ​
     [find-hard]
     pfind-queue-length = 10000
    

    And run it again.

5. Reference

  1. chat.openai.com
  2. www.deepl.com/translator
  3. www.open-mpi.org
  4. www.netlib.org/benchmark/h…
  5. www.hpcg-benchmark.org
  6. github.com/hpcg-benchm…
  7. github.com/IO500/io500
  8. www.cnblogs.com/liu-shaobo/…
  9. blog.csdn.net/gyx15496246…