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