HPL下載: http://www.netlib.org/benchmark/hpl/hpl-2.0.tar.gz
如果選用atlas數學庫,則用libatlas.a 和 libblas.a庫檔案。
如果是在AMD CPU 上,則用arch=Linux_ATHLON_CBLAS
$tar xzvf hpl-2.0.tar.gz
$cd hpl-2.0
$cp setup/Make. Linux_ATHLON_CBLAS ..
$cd ..
$vi Linux_ATHLON_CBLAS
主要修改如下
TOPdir = /softwareBAK/mathlibs/hpl/hpl-2.0
#修改為拷貝後的Make. Linux_ATHLON_CBLAS檔案所在位置,即hpc-2.0根目錄。
MPdir = /opt/mpich/ch-p4
MPinc = -I$(MPdir)/include
MPlib = $(MPdir)/lib64/libmpich.a
#修改為mpi路徑、庫路徑、標頭檔路徑。
LAdir = /opt/mathlibs/atlas/3.9.25
LAlib = $(LAdir)/lib/libcblas.a $(LAdir)/lib/libatlas.a
#修改為atlas的庫路徑及庫檔案路徑。
CC = /opt/mpich/ch-p4/bin/mpicc
LINKER = /opt/mpich/ch-p4/bin/mpicc
#修改位mpi的執行路徑,如果LINKER是f77,則用mpif77。
修改後儲存
$make arch= Linux_ATHLON_CBLAS
完成後在bin目錄的Linux_ATHLON_CBLAS下面將產生測試檔案
HPL.dat和xhpl
在lib目錄的Linux_ATHLON_CBLAS下面將產生庫檔案
libhpl.a
運行小測試
mpirun –np 4 xhpl
成功後顯示
Finished 864 tests with the following results:
864 tests completed and passed residual checks,
0 tests completed and failed residual checks,
0 tests skipped because of illegal input values.
參考:
http://219.232.54.3/cgi-bin/LB5000/topic.cgi?forum=54&topic=225&show=75
http://hi.baidu.com/kirksky/blog/item/5b44a3130b569a075aaf53df.html