alt

Как установить HPL для CPU?

INSTALL HPL 2.3 c OpenBLAS

Подробнее об установке OpenMPI, OpenBLAS.

Настроим переменные окружения подключив модули и скачаем HPL 2.3.

$ module add openmpi/v2.1.6
$ module add openblas/v0.3.6
$ wget https://www.netlib.org/benchmark/hpl/hpl-2.3.tar.gz
$ tar -xvf hpl-2.3.tar.gz
$ cd hpl-2.3
$ cp setup/Make.Linux_Intel64 .

Отредактируем Make.Linux_Intel64:

$ cat Make.Linux_Intel64
  SHELL        = /bin/sh
  CD           = cd
  CP           = cp
  LN_S         = ln -fs
  MKDIR        = mkdir -p
  RM           = /bin/rm -f
  TOUCH        = touch
  ARCH         = Linux_Intel64
  TOPdir       = /home/user/hpl-2.3
  INCdir       = $(TOPdir)/include
  BINdir       = $(TOPdir)/bin/$(ARCH)
  LIBdir       = $(TOPdir)/lib/$(ARCH)
  HPLlib       = $(LIBdir)/libhpl.a
  MPdir        = /nfs/software/openmpi/v2.1.6
  MPinc        = -I$(MPdir)/include
  MPlib        = $(MPdir)/lib/libmpi.so
  LAdir        = /nfs/software/openblas/v0.3.6
  LAinc        = $(LAdir)/include
  LAlib        = -L$(LAdir)/lib -lopenblas
  F2CDEFS      = -DAdd__ -DF77_INTEGER=int -DStringSunStyle
  HPL_INCLUDES = -I$(INCdir) -I$(INCdir)/$(ARCH) $(LAinc) $(MPinc)
  HPL_LIBS     = $(HPLlib) $(LAlib) $(MPlib)
  HPL_OPTS     = -DHPL_DETAILED_TIMING -DHPL_PROGRESS_REPORT
  HPL_DEFS     = $(F2CDEFS) $(HPL_OPTS) $(HPL_INCLUDES)
  CC           = mpicc
  CCNOOPT      = $(HPL_DEFS)
  OMP_DEFS     = -fopenmp
  CCFLAGS      = $(HPL_DEFS) -O3 -lpthread -fomit-frame-pointer -O3 -funroll-loops
  LINKER       = $(CC)
  LINKFLAGS    = $(CCFLAGS) $(OMP_DEFS)
  ARCHIVER     = ar
  ARFLAGS      = r
  RANLIB       = echo

9. Путь до директории hpl-2.3
14. Путь до OpenMPI
17. Путь до OpenBLAS

Соберем и запустим HPL:

$ make arch=Linux_Intel64
$ cd bin/Linux_Intel64
$ 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.