Advertisement
banskt

kalindi-hpl23-make-linux-zen2-blis

Dec 4th, 2020
2,274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 9.19 KB | None | 0 0
  1. #  
  2. #  -- High Performance Computing Linpack Benchmark (HPL)                
  3. #     HPL - 2.3 - December 2, 2018                          
  4. #     Antoine P. Petitet                                                
  5. #     University of Tennessee, Knoxville                                
  6. #     Innovative Computing Laboratory                                
  7. #     (C) Copyright 2000-2008 All Rights Reserved                      
  8. #                                                                      
  9. #  -- Copyright notice and Licensing terms:                            
  10. #                                                                      
  11. #  Redistribution  and  use in  source and binary forms, with or without
  12. #  modification, are  permitted provided  that the following  conditions
  13. #  are met:                                                            
  14. #                                                                      
  15. #  1. Redistributions  of  source  code  must retain the above copyright
  16. #  notice, this list of conditions and the following disclaimer.        
  17. #                                                                      
  18. #  2. Redistributions in binary form must reproduce  the above copyright
  19. #  notice, this list of conditions,  and the following disclaimer in the
  20. #  documentation and/or other materials provided with the distribution.
  21. #                                                                      
  22. #  3. All  advertising  materials  mentioning  features  or  use of this
  23. #  software must display the following acknowledgement:                
  24. #  This  product  includes  software  developed  at  the  University  of
  25. #  Tennessee, Knoxville, Innovative Computing Laboratory.            
  26. #                                                                      
  27. #  4. The name of the  University,  the name of the  Laboratory,  or the
  28. #  names  of  its  contributors  may  not  be used to endorse or promote
  29. #  products  derived   from   this  software  without  specific  written
  30. #  permission.                                                          
  31. #                                                                      
  32. #  -- Disclaimer:                                                      
  33. #                                                                      
  34. #  THIS  SOFTWARE  IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  35. #  ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,  INCLUDING,  BUT NOT
  36. #  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  37. #  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY
  38. #  OR  CONTRIBUTORS  BE  LIABLE FOR ANY  DIRECT,  INDIRECT,  INCIDENTAL,
  39. #  SPECIAL,  EXEMPLARY,  OR  CONSEQUENTIAL DAMAGES  (INCLUDING,  BUT NOT
  40. #  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  41. #  DATA OR PROFITS; OR BUSINESS INTERRUPTION)  HOWEVER CAUSED AND ON ANY
  42. #  THEORY OF LIABILITY, WHETHER IN CONTRACT,  STRICT LIABILITY,  OR TORT
  43. #  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  44. #  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  45. # ######################################################################
  46. #  
  47. # ----------------------------------------------------------------------
  48. # - shell --------------------------------------------------------------
  49. # ----------------------------------------------------------------------
  50. #
  51. SHELL        = /bin/sh
  52. #
  53. CD           = cd
  54. CP           = cp
  55. LN_S         = ln -s
  56. MKDIR        = mkdir
  57. RM           = /bin/rm -f
  58. TOUCH        = touch
  59. #
  60. # ----------------------------------------------------------------------
  61. # - Platform identifier ------------------------------------------------
  62. # ----------------------------------------------------------------------
  63. #
  64. ARCH         = Linux_ZEN2_BLIS
  65. #
  66. # ----------------------------------------------------------------------
  67. # - HPL Directory Structure / HPL library ------------------------------
  68. # ----------------------------------------------------------------------
  69. #
  70. TOPdir       = $(HOME)/Documents/hpl-benchmark/hpl-build/hpl-2.3
  71. INCdir       = $(TOPdir)/include
  72. BINdir       = $(TOPdir)/bin/$(ARCH)
  73. LIBdir       = $(TOPdir)/lib/$(ARCH)
  74. #
  75. HPLlib       = $(LIBdir)/libhpl.a
  76. #
  77. # ----------------------------------------------------------------------
  78. # - Message Passing library (MPI) --------------------------------------
  79. # ----------------------------------------------------------------------
  80. # MPinc tells the  C  compiler where to find the Message Passing library
  81. # header files,  MPlib  is defined  to be the name of  the library to be
  82. # used. The variable MPdir is only used for defining MPinc and MPlib.
  83. #
  84. MPdir        = /opt/openmpi/4.0.5-gcc10
  85. MPinc        = -I$(MPdir)/include
  86. MPlib        = $(MPdir)/lib/libmpi.so
  87. #
  88. # ----------------------------------------------------------------------
  89. # - Linear Algebra library (BLAS or VSIPL) -----------------------------
  90. # ----------------------------------------------------------------------
  91. # LAinc tells the  C  compiler where to find the Linear Algebra  library
  92. # header files,  LAlib  is defined  to be the name of  the library to be
  93. # used. The variable LAdir is only used for defining LAinc and LAlib.
  94. #
  95. LAdir        = /opt/amd/amd-blis-2.2-4/lib
  96. LAinc        =
  97. LAlib        = $(LAdir)/libblis.a
  98. #
  99. # ----------------------------------------------------------------------
  100. # - F77 / C interface --------------------------------------------------
  101. # ----------------------------------------------------------------------
  102. # You can skip this section  if and only if  you are not planning to use
  103. # a  BLAS  library featuring a Fortran 77 interface.  Otherwise,  it  is
  104. # necessary  to  fill out the  F2CDEFS  variable  with  the  appropriate
  105. # options.  **One and only one**  option should be chosen in **each** of
  106. # the 3 following categories:
  107. #
  108. # 1) name space (How C calls a Fortran 77 routine)
  109. #
  110. # -DAdd_              : all lower case and a suffixed underscore  (Suns,
  111. #                       Intel, ...),                           [default]
  112. # -DNoChange          : all lower case (IBM RS6000),
  113. # -DUpCase            : all upper case (Cray),
  114. # -DAdd__             : the FORTRAN compiler in use is f2c.
  115. #
  116. # 2) C and Fortran 77 integer mapping
  117. #
  118. # -DF77_INTEGER=int   : Fortran 77 INTEGER is a C int,         [default]
  119. # -DF77_INTEGER=long  : Fortran 77 INTEGER is a C long,
  120. # -DF77_INTEGER=short : Fortran 77 INTEGER is a C short.
  121. #
  122. # 3) Fortran 77 string handling
  123. #
  124. # -DStringSunStyle    : The string address is passed at the string loca-
  125. #                       tion on the stack, and the string length is then
  126. #                       passed as  an  F77_INTEGER  after  all  explicit
  127. #                       stack arguments,                       [default]
  128. # -DStringStructPtr   : The address  of  a  structure  is  passed  by  a
  129. #                       Fortran 77  string,  and the structure is of the
  130. #                       form: struct {char *cp; F77_INTEGER len;},
  131. # -DStringStructVal   : A structure is passed by value for each  Fortran
  132. #                       77 string,  and  the  structure is  of the form:
  133. #                       struct {char *cp; F77_INTEGER len;},
  134. # -DStringCrayStyle   : Special option for  Cray  machines,  which  uses
  135. #                       Cray  fcd  (fortran  character  descriptor)  for
  136. #                       interoperation.
  137. #
  138. F2CDEFS      = -DAdd__ -DF77_INTEGER=int -DStringSunStyle
  139. #
  140. # ----------------------------------------------------------------------
  141. # - HPL includes / libraries / specifics -------------------------------
  142. # ----------------------------------------------------------------------
  143. #
  144. HPL_INCLUDES = -I$(INCdir) -I$(INCdir)/$(ARCH) $(LAinc) $(MPinc)
  145. HPL_LIBS     = $(HPLlib) $(LAlib) $(MPlib) -lm
  146. #
  147. # - Compile time options -----------------------------------------------
  148. #
  149. # -DHPL_COPY_L           force the copy of the panel L before bcast;
  150. # -DHPL_CALL_CBLAS       call the cblas interface;
  151. # -DHPL_CALL_VSIPL       call the vsip  library;
  152. # -DHPL_DETAILED_TIMING  enable detailed timers;
  153. #
  154. # By default HPL will:
  155. #    *) not copy L before broadcast,
  156. #    *) call the BLAS Fortran 77 interface,
  157. #    *) not display detailed timing information.
  158. #
  159. HPL_OPTS     = -DHPL_CALL_CBLAS
  160. #
  161. # ----------------------------------------------------------------------
  162. #
  163. HPL_DEFS     = $(F2CDEFS) $(HPL_OPTS) $(HPL_INCLUDES)
  164. #
  165. # ----------------------------------------------------------------------
  166. # - Compilers / linkers - Optimization flags ---------------------------
  167. # ----------------------------------------------------------------------
  168. #
  169. CC           = gcc
  170. CCNOOPT      = $(HPL_DEFS)
  171. CCFLAGS      = $(HPL_DEFS) -std=c99 -march=znver2 -fomit-frame-pointer -Ofast -funroll-loops -W -Wall -fopenmp -Wno-misleading-indentation
  172. #
  173. # On some platforms,  it is necessary  to use the Fortran linker to find
  174. # the Fortran internals used in the BLAS library.
  175. #
  176. #LINKER       = /opt/amd/aocc-compiler-2.2.0/bin/clang
  177. #LINKFLAGS    = $(CCFLAGS) -fopenmp=libomp
  178. LINKER       = gcc
  179. LINKFLAGS    = $(CCFLAGS)
  180. #
  181. ARCHIVER     = ar
  182. ARFLAGS      = r
  183. RANLIB       = echo
  184. #
  185. # ----------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement