#threadwillberunningfor(1<<26)cycles(about25mson3.0GHz
#system).AlsoyoucancontrolthismumberbyGOTO_THREAD_TIMEOUT
#CCOMMON_OPT+=-DTHREAD_TIMEOUT=26
#Usingspecialdevicedriverformappingphysicallycontigousmemory
#totheuserspace.Ifbigphysareaisenabled,itwilluseit.
#DEVICEDRIVER_ALLOCATION=1
#IfyouneedtosynchronizeFPCSRbetweenthreads(forx86/x86_64only).
#CONSISTENT_FPCSR=1
#IfyouneedsantycheckbycomparingreferenceBLAS.It'llbevery
#slow(Notimplementedyet).
#SANITY_CHECK=1
#CommonOptimizationFlag;-O2isenough.
COMMON_OPT+=-O2
#Profilingflags
COMMON_PROF=-pg
#
#Endofuserconfiguration
#
进入目录执行:
./quickbuild.64bit
若出现如下:
../kernel/x86_64/gemm_ncopy_4.S:
192:
Error:
undefinedsymbol`RPREFETCHSIZE'inoperation../kernel/x86_64/gemm_ncopy_4.S:
193:
Error:
undefinedsymbol`RPREFETCHSIZE'inoperation../kernel/x86_64/gemm_ncopy_4.S:
194:
Error:
undefinedsymbol`RPREFETCHSIZE'inoperation../kernel/x86_64/gemm_ncopy_4.S:
195:
Error:
undefinedsymbol`RPREFETCHSIZE'inoperation
则执行:
gmakeclean
makeBINARY=64TARGET=NEHALEM
出现以上错误的原因为,cpu太新,配置文件不识别,需要重新指定一下CPU类型
三、安装HPL。
进入hpl文件夹从setup文件夹下cp与自己平台相近的Make.文件,复制到hpl文件夹内,比如我们的平台为Intelxeon,所以就选择了Make.Linux_PII_FBLAS,它代表Linux操作系统、PII平台、采用FBLAS库。
tarxzvfhpl-2.0.tar.gz
viMake.Linux_PII_FBLAS
#OFTHISSOFTWARE,EVENIFADVISEDOFTHEPOSSIBILITYOFSUCHDAMAGE.
#######################################################################
#
#----------------------------------------------------------------------
#-shell--------------------------------------------------------------
#----------------------------------------------------------------------
#
SHELL=/bin/sh
#
CD=cd
CP=cp
LN_S=ln-s
MKDIR=mkdir
RM=/bin/rm-f
TOUCH=touch
#
#----------------------------------------------------------------------
#-Platformidentifier------------------------------------------------
#----------------------------------------------------------------------
#
ARCH=Linux_PII_FBLAS
#
#----------------------------------------------------------------------
#-HPLDirectoryStructure/HPLlibrary------------------------------
#----------------------------------------------------------------------
#
TOPdir=/root/linpack/hpl
INCdir=$(TOPdir)/include
BINdir=$(TOPdir)/bin/$(ARCH)
LIBdir=$(TOPdir)/lib/$(ARCH)
#
HPLlib=$(LIBdir)/libhpl.a
#
#----------------------------------------------------------------------
#-MessagePassinglibrary(MPI)--------------------------------------
#----------------------------------------------------------------------
#MPinctellstheCcompilerwheretofindtheMessagePassinglibrary
#headerfiles,MPlibisdefinedtobethenameofthelibrarytobe
#used.ThevariableMPdirisonlyusedfordefiningMPincandMPlib.
#
MPdir=/root/linpack/mpi
MPinc=-I$(MPdir)/include
MPlib=$(MPdir)/lib/libmpich.a
#
#----------------------------------------------------------------------
#-LinearAlgebralibrary(BLASorVSIPL)-----------------------------
#----------------------------------------------------------------------
#LAinctellstheCcompilerwheretofindtheLinearAlgebralibrary
#headerfiles,LAlibisdefinedtobethenameofthelibrarytobe
#used.ThevariableLAdirisonlyusedfordefiningLAincandLAlib.
#
LAdir=/root/linpack/GotoBLAS2
LAinc=
LAlib=$(LAdir)/libgoto2.a$(LAdir)/libgoto2.so
#
#----------------------------------------------------------------------
#-F77/Cinterface--------------------------------------------------
#----------------------------------------------------------------------
#Youcanskipthissectionifandonlyifyouarenotplanningtouse
#aBLASlibraryfeaturingaFortran77interface.Otherwise,itis
#necessarytofillouttheF2CDEFSvariablewiththeappropriate
#options.**Oneandonlyone**optionshouldbechosenin**each**of
#the3followingcategories:
#
#1)namespace(HowCcallsaFortran77routine)
#
#-DAdd_:
alllowercaseandasuffixedunderscore(Suns,
#Intel,...),[default]
#-DNoChange:
alllowercase(IBMRS6000),
#-DUpCase:
alluppercase(Cray),
#-DAdd__:
theFORTRANcompilerinuseisf2c.
#
#2)CandFortran77integermapping
#
#-DF77_INTEGER=int:
Fortran77INTEGERisaCint,[default]
#-DF77_INTEGER=long:
Fortran77INTEGERisaClong,
#-DF77_INTEGER=short:
Fortran77INTEGERisaCshort.
#
#3)Fortran77stringhandling
#
#-DStringSunStyle:
Thestringaddressispassedatthestringloca-
#tiononthestack,andthestringlengthisthen
#passedasanF77_INTEGERafterallexplicit
#stackarguments,[default]
#-DStringStructPtr:
Theaddressofastructureispassedbya
#Fortran77string,andthestructureisofthe
#form:
struct{char*cp;F77_INTEGERlen;},
#-DStringStructVal:
AstructureispassedbyvalueforeachFortran
#77string,andthestructureisoftheform:
#struct{char*cp;F77_INTEGERlen;},
#-DStringCrayStyle:
SpecialoptionforCraymachines,whichuses
#Crayfcd(fortrancharacterdescriptor)for
#interoperation.
#
F2CDEFS=-DAdd__-DF77_INTEGER=int-DStringSunStyle
#
#----------------------------------------------------------------------
#-HPLincludes/libraries/specifics-------------------------------
#----------------------------------------------------------------------
#
HPL_INCLUDES=-I$(INCdir)-I$(INCdir)/$(ARCH)$(LAinc)$(MPinc)
HPL_LIBS=$(HPLlib)$(LAlib)$(MPlib)
#
#-Compiletimeoptions-----------------------------------------------
#
#-DHPL_COPY_LforcethecopyofthepanelLbeforebcast;
#-DHPL_CALL_CBLAScallthecblasinterface;
#-DHPL_CALL_VSIPLcallthevsiplibrary;
#-DHPL_DETAILED_TIMINGenabledetailedtimers;
#
#BydefaultHPLwill:
#*)notcopyLbeforebroadcast,
#*)calltheBLASFortran77interface,
#*)notdisplaydetailedtiminginformation.
#
HPL_OPTS=
#
#------------------------------------------------------------------