This time based on a CPU-powered woodcrest 1.86ghz machine, 2 GB memory
1. Blas uses gotoblas. The latest version is version 1.10. Undo it and edit makefile. Rule as follows (the parts not listed here are the ones I have not modified ):
#
# Beginning of user configuration
#
# This library's version
Revision =-r1.10
# Which do you prefer to use for C compiler? Default is GCC.
# I recommend you to use GCC because inline caller is required.
C_compiler = GNU
# C_compiler = intel
# Which do you prefer to use for Fortran compiler? Default is GNU G77.
F_compiler = G77
# F_compiler = g95
# F_compiler = gfortran
# F_compiler = intel
# F_compiler = PGI
# F_compiler = pathscale
# F_compiler = IBM
# F_compiler = Compaq
# F_compiler = sun
# F_compiler = f2c
# If you need 64bit binary; some architecture can accept both 32bit and
# 64bit binary (em64t, opteron, iSCSI and power/PowerPC ).
Binary64 = 1
# If you want to build threaded version.
# You can specify number of threads by Environment Value
# "Omp_num_threads", otherwise, it's automatically detected.
SMP = 1
# You may specify maximum number of threads. It shocould be minimum.
# For OpenMP users; you have to specify max_threads even if you don't
# Use threaded Blas (max_threads> = omp_num_threads * goto_num_threads)
Max_threads = 2
2. Note that the above compiler can be modified as needed. For example, if an Intel compiler is installed, it can be changed to an Intel compiler. In addition, the binary64 = 1 option should be enabled, if the x86-64 operating system is installed, otherwise hpl will report at compilation that libgoto is not a library of x86-64, although xhpl can generate eventually, but it will encounter errors when running
OK. Input make.
3. Unpack the hpl package, CP Setup/make. linux_pii_fblas make. WC (indicating that arch is WC), edit make. WC, and modify it to the following:
#----------------------------------------------------------------------
#-Shell --------------------------------------------------------------
#----------------------------------------------------------------------
#
Shell =/bin/sh
#
Cd = CD
CP = CP
Ln_s = ln-S
Mkdir = mkdir
Rm =/bin/Rm-F
Touch = touch
#
#----------------------------------------------------------------------
#-Platform identifier ------------------------------------------------
#----------------------------------------------------------------------
#
Arch = WC
#
#----------------------------------------------------------------------
#-Hpl directory structure/hpl library ------------------------------
#----------------------------------------------------------------------
#
Topdir = $ (home)/hpl
Incdir = $ (topdir)/include
Bindir = $ (topdir)/bin/$ (ARCH)
Libdir = $ (topdir)/lib/$ (ARCH)
#
Maid = $ (libdir)/libhpl.
#
#----------------------------------------------------------------------
#-Message Passing Library (MPI )--------------------------------------
#----------------------------------------------------------------------
# Mpinc tells the C compiler where to find the message passing Library
# Header files, mplib is defined to be the name of the library to be
# Used. The variable mpdir is only used for defining mpinc and mplib.
#
Mpdir =/usr/local/mpich
Mpinc =-I $ (mpdir)/include
Mplib = $ (mpdir)/lib/libmp ich.
#
#----------------------------------------------------------------------
#-Linear algebra Library (blas or vsipl )-----------------------------
#----------------------------------------------------------------------
# Lainc tells the C compiler where to find the linear algebra Library
# Header files, lalib is defined to be the name of the library to be
# Used. The variable ladir is only used for defining lainc and lalib.
#
Ladir = $ (home)/gotoblas
Lainc =
Lalib = $ (ladir)/libgoto.
#
#----------------------------------------------------------------------
#-F77/C interface --------------------------------------------------
#----------------------------------------------------------------------
# You can skip this section if and only if you are not planning to use
# A Blas library featuring a Fortran 77 interface. Otherwise, it is
# Necessary to fill out the f2cdefs variable with the appropriate
# Options. ** one and only one ** option shoshould be chosen in ** each **
# The 3 following categories:
#
#1) Name Space (how C calla Fortran 77 routine)
#
#-Dadd _: all lower case and a suffixed underscore (suns,
# Intel,...), [Default]
#-Dnochange: all lower case (IBM rs6000 ),
#-Dupcase: All upper case (cray ),
#-Dadd _: the Fortran compiler in use is f2c.
#
#2) C and Fortran 77 integer Mapping
#
#-Df77_integer = int: Fortran 77 integer is a C int, [Default]
#-Df77_integer = long: Fortran 77 integer is a C long,
#-Df77_integer = short: Fortran 77 integer is a C short.
#
#3) Fortran 77 String Handling
#
#-Dstringsunstyle: the string address is passed at the string loca-
# Tion on the stack, and the string length is then
# Passed as an f77_integer after all explicit
# Stack arguments, [Default]
#-Dstringstructptr: the address of a structure is passed by
# Fortran 77 string, and the structure is of
# Form: struct {char * CP; f77_integer Len ;},
#-Dstringstructval: A structure is passed by value for each FORTRAN
#77 string, and the structure is of the form:
# Struct {char * CP; f77_integer Len ;},
#-Dstringcraystyle: Special option for cray machines, which uses
# Cray FCD (Fortran character descriptor)
# Interoperation.
#
F2cdefs =-dadd _-df77_integer = int-dstringsunstyle
#
#----------------------------------------------------------------------
#-Hpl uplodes/libraries/specifics -------------------------------
#----------------------------------------------------------------------
#
Maid =-I $ (incdir)/$ (ARCH) $ (lainc) $ (mpinc)
Maid $ (maid) $ (lalib) $ (mplib)
#
#-Compile time options -----------------------------------------------
#
#-Dhpl_copy_l force the copy of the Panel L before bcast;
#-Dhpl_call_cblas call the cblas interface;
#-Dhpl_call_vsipl call the vsip library;
#-Dhpl_detailed_timing enable detailed timers;
#
# By default hpl will:
# *) Not copy L before broadcast,
# *) Call the BLAs Fortran 77 interface,
# *) Not display detailed timing information.
#
Maid =
#
#----------------------------------------------------------------------
#
Maid $ (f2cdefs) $ (maid)
#
#----------------------------------------------------------------------
#-Compilers/linkers-optimization flags ---------------------------
#----------------------------------------------------------------------
#
Cc =/usr/local/mpich/bin/mpicc
Ccnoopt = $ (maid)
Ccflags = $ (maid)-fomit-frame-pointer-O3-funroll-loops-w-wall
#
# On some platforms, it is necessary to use the Fortran linker to find
# The Fortran internals used in the BLAs library.
#
Linker =/usr/local/mpich/bin/mpif77
Linkflags = $ (ccflags)
#
Archiver = ar
Arflags = r
Ranlib = echo
#
#----------------------------------------------------------------------
4. Very simple. Basically, you need to specify the position of hpl, libgoto. A, and mpich, and use mpif77 as the final link to compile and use mpicc. Enter Make arch = WC. If compilation fails, use make arch = WC clean to delete the traces of make.
5. Modify hpl. dat and run xhpl. Hpl. dat has already been mentioned many times.
The hpl. dat setting on the xxx cluster is used this time. The result is 12.15 gflops, the theoretical peak value is 14.88 gflops (1 CPU), and the efficiency is 81.65%.