# HPCG
CPU[上一屆的HPCG筆記-1](https://hackmd.io/@tings0802/test2_02#HPCG)
GPU[上一屆的HPCG筆記-2](https://hackmd.io/@tings0802/demon#HPCG-)
## 原理(?
[HPCG benchmark-wikipedia](https://en.wikipedia.org/wiki/HPCG_benchmark)
[HPCG Benchmark官方](https://www.hpcg-benchmark.org/)
## starting
[HPCGPerformance Benchmark and Profiling](https://www.hpcadvisorycouncil.com/pdf/HPCG_Analysis_POWER8.pdf)
[UL HPC MPI Tutorial: High Performance Conjugate Gradients (HPCG) benchmarking on UL HPC platform](https://ulhpc-tutorials.readthedocs.io/en/latest/parallel/hybrid/HPCG/)
## testing、observing
[Performance modeling of the HPCG benchmark](https://www.dcs.warwick.ac.uk/pmbs/pmbs14/PMBS14/Workshop_Schedule_files/10-PerformanceModelHPCG.pdf)
[HPCG Performance study with Intel Skylake processors](https://downloads.dell.com/manuals/all-products/esuprt_solutions_int/esuprt_solutions_int_solutions_resources/high-computing-solution-resources_white-papers63_en-us.pdf)
[在兩路cpu伺服器進行HPCG(高度共軛梯度基準測試)測試與優化](https://www.itread01.com/content/1548535717.html)
## 下載
參照 [HPCG](https://hackmd.io/@tings0802/test2_02#HPCG)
(make所需為mpicc)
## dockerfile
```
#centos base image
FROM centos:7
#download necessary document
RUN yum -y update && yum -y install wget vim fftw GNUmake make which locate git&& yum groupinstall -y 'Development Tools' && yum clean all
#openmpi
WORKDIR /
RUN wget https://download.open-mpi.org/release/open-mpi/v3.1/openmpi-3.1.4.tar.gz && \
tar xvf openmpi-3.1.4.tar.gz && \
cd openmpi-3.1.4 && \
./configure --prefix=/openmpi && \
make && \
make install
ENV PATH=$PATH:/openmpi/bin
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/openmpi/lib
RUN cd / && \
git clone https://github.com/hpcg-benchmark/hpcg.git && \
cd hpcg && \
mkdir build && \
cd build && \
../configure Linux_MPI && \
make
CMD ["/bin/bash"]
```
## 測試執行
測試結果
```shell=
cd bin
vim hpcg.dat
```
```shell=
24 24 24
60
```
```shell=
mpirun -np 核心數量 ./xhpcg
```