-
Notifications
You must be signed in to change notification settings - Fork 14
/
Make.top
206 lines (193 loc) · 9.21 KB
/
Make.top
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
#
# -- High Performance Computing Linpack Benchmark (HPL-GPU)
# HPL-GPU - 2.0 - 2015
#
# David Rohr
# Matthias Kretz
# Matthias Bach
# Goethe Universität, Frankfurt am Main
# Frankfurt Institute for Advanced Studies
# (C) Copyright 2010 All Rights Reserved
#
# Antoine P. Petitet
# University of Tennessee, Knoxville
# Innovative Computing Laboratory
# (C) Copyright 2000-2008 All Rights Reserved
#
# -- Copyright notice and Licensing terms:
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# 3. All advertising materials mentioning features or use of this
# software must display the following acknowledgements:
# This product includes software developed at the University of
# Tennessee, Knoxville, Innovative Computing Laboratory.
# This product includes software developed at the Frankfurt Institute
# for Advanced Studies.
#
# 4. The name of the University, the name of the Laboratory, or the
# names of its contributors may not be used to endorse or promote
# products derived from this software without specific written
# permission.
#
# -- Disclaimer:
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY
# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# ======================================================================
arch = UNKNOWN
export HPL_VERSION = 2.0
export TOPdir := $(CURDIR)
# check if we have a non-default setup file
ifeq ($(strip $(wildcard Make.$(arch))),)
export setupmake=$(TOPdir)/setup/Make.$(arch)
else
export setupmake=$(TOPdir)/Make.$(arch)
endif
include $(setupmake)
isenabled = $(if $(findstring $(1), $(HPL_DEFS)),yes, no)
startup_dir :
@$(MKDIR) -p include/$(arch)
@$(MKDIR) -p lib/$(arch)
@$(MKDIR) -p bin/$(arch)
src/%/$(arch)/Makefile: makes/Make.%
@$(MKDIR) -p $(@D)
@$(RM) $@
$(CP) $< $@
testing/%/$(arch)/Makefile: makes/Make.%
@$(MKDIR) -p $(@D)
@$(RM) $@
$(CP) $< $@
refresh_src: src/auxil/$(arch)/Makefile src/blas/$(arch)/Makefile \
src/comm/$(arch)/Makefile src/grid/$(arch)/Makefile \
src/panel/$(arch)/Makefile src/pauxil/$(arch)/Makefile \
src/pfact/$(arch)/Makefile src/pgesv/$(arch)/Makefile
refresh_tst: testing/matgen/$(arch)/Makefile testing/pmatgen/$(arch)/Makefile \
testing/ptimer/$(arch)/Makefile testing/ptest/$(arch)/Makefile \
testing/util/$(arch)/Makefile
build_src: refresh_src
@$(MAKE) -C src/auxil/$(arch)
@$(MAKE) -C src/blas/$(arch)
@$(MAKE) -C src/comm/$(arch)
@$(MAKE) -C src/grid/$(arch)
@$(MAKE) -C src/panel/$(arch)
@$(MAKE) -C src/pauxil/$(arch)
@$(MAKE) -C src/pfact/$(arch)
@$(MAKE) -C src/pgesv/$(arch)
build_tst: refresh_tst
@$(MAKE) -C testing/matgen/$(arch)
@$(MAKE) -C testing/pmatgen/$(arch)
@$(MAKE) -C testing/ptimer/$(arch)
@$(MAKE) -C testing/util/$(arch)
@$(MAKE) -C testing/ptest/$(arch)
@echo "================================================================================"
@echo " HPL-GPU $(HPL_VERSION) build successfully completed."
@echo " You can find the executable in $(TOPdir)/bin/$(arch)/xhpl"
@echo "================================================================================"
# @echo " detailed timers: $(call isenabled,-DHPL_DETAILED_TIMING)"
# @echo " function level tracing for optimization relevant calls: $(call isenabled,-DTRACE_CALLS)"
# @echo " use original laswp implementation: $(call isenabled,-DUSE_ORIGINAL_LASWP)"
# @echo " dump LINDXA(U) in laswp0[16]T: $(call isenabled,-DTRACE_PERMDATA)"
# @echo " Fast initialization of input matrices for tuning runs: $(call isenabled,-DHPL_FASTINIT)"
# @echo " Fast initialization for verification: $(call isenabled,-DHPL_FASTVERIFY)"
# @echo " Allocate the memory pagelocked: $(call isenabled,-DHPL_PAGELOCKED_MEM)"
# @echo " Allocate the memory using huge tables: $(call isenabled,-DHPL_HUGE_TABLES)"
# @echo " force display of CALDGEMM timing data: $(call isenabled,-DHPL_GPU_TIMING)"
# @echo " verbose CALDGEMM (also displays timing): $(call isenabled,-DHPL_GPU_NOT_QUIET)"
# @echo " Transmit the padding of U: $(call isenabled,-DHPL_SEND_U_PADDING)"
# @echo " Verify result of caldgemm calls: $(call isenabled,-DHPL_GPU_VERIFY)"
# @echo " Activate Test Debug Code: $(call isenabled,-DCALDGEMM_TEST)"
# @echo " print intermediate performance results: $(call isenabled,-DHPL_PRINT_INTERMEDIATE)"
# @echo " show average memory usage per node of the matrix: $(call isenabled,-DHPL_PRINT_AVG_MATRIX_SIZE)"
# @echo " MPI calls only from main thread: $(call isenabled,-DHPL_MPI_FUNNELED_THREADING)"
# @echo " Skip MPI thread capabilities check; just call MPI_Init: $(call isenabled,-DHPL_NO_MPI_THREAD_CHECK)"
# @echo " Do not use the hacked ATI lib: $(call isenabled,-DHPL_NO_HACKED_LIB)"
# @echo " Use PREFETCHW instruction (AMD CPUs only): $(call isenabled,-DHPL_HAVE_PREFETCHW)"
# @echo " GPU clock (for throttling detection): $(or $(subst -DHPL_PRINT_THROTTLING_NODES=,,$(filter -DHPL_PRINT_THROTTLING_NODES=%,$(HPL_DEFS))),disabled)"
# @echo " Start the run at: $(or $(subst -DHPL_START_PERCENTAGE=,,$(filter -DHPL_START_PERCENTAGE=%,$(HPL_DEFS))), FullRun)%"
# @echo " MPI disabled: $(call isenabled,-DHPL_NO_MPI_LIB)"
# @echo "================================================================================"
## clean ###############################################################
#
clean_src :
- ( $(CD) src/auxil/$(arch); $(MAKE) clean )
- ( $(CD) src/blas/$(arch); $(MAKE) clean )
- ( $(CD) src/comm/$(arch); $(MAKE) clean )
- ( $(CD) src/grid/$(arch); $(MAKE) clean )
- ( $(CD) src/panel/$(arch); $(MAKE) clean )
- ( $(CD) src/pauxil/$(arch); $(MAKE) clean )
- ( $(CD) src/pfact/$(arch); $(MAKE) clean )
- ( $(CD) src/pgesv/$(arch); $(MAKE) clean )
- $(RM) lib/$(arch)/libhpl.a
#
clean_tst :
- ( $(CD) testing/matgen/$(arch); $(MAKE) clean )
- ( $(CD) testing/pmatgen/$(arch); $(MAKE) clean )
- ( $(CD) testing/ptimer/$(arch); $(MAKE) clean )
- ( $(CD) testing/ptest/$(arch); $(MAKE) clean )
- ( $(CD) testing/util/$(arch); $(MAKE) clean )
#- ( SPMS_make_cd`' testing/test/$(arch); SPMS_make_make`' clean )
#
## clean_arch ##########################################################
#
clean_arch_src :
- $(RM) -r src/auxil/$(arch)
- $(RM) -r src/blas/$(arch)
- $(RM) -r src/comm/$(arch)
- $(RM) -r src/grid/$(arch)
- $(RM) -r src/panel/$(arch)
- $(RM) -r src/pauxil/$(arch)
- $(RM) -r src/pfact/$(arch)
- $(RM) -r src/pgesv/$(arch)
#
clean_arch_tst :
- $(RM) -r testing/matgen/$(arch)
- $(RM) -r testing/pmatgen/$(arch)
- $(RM) -r testing/ptimer/$(arch)
- $(RM) -r testing/ptest/$(arch)
- $(RM) -r testing/util/$(arch)
#- SPMS_make_rm`' -r testing/test/$(arch)
#
## clean_arch_all ######################################################
#
clean_arch_all :
- $(MAKE) -f Make.top clean_arch_src arch=$(arch)
- $(MAKE) -f Make.top clean_arch_tst arch=$(arch)
- $(RM) -r bin/$(arch) include/$(arch) lib/$(arch)
#
## clean_guard #########################################################
#
clean_guard_src :
- ( $(CD) src/auxil/$(arch); $(RM) *.grd )
- ( $(CD) src/blas/$(arch); $(RM) *.grd )
- ( $(CD) src/comm/$(arch); $(RM) *.grd )
- ( $(CD) src/grid/$(arch); $(RM) *.grd )
- ( $(CD) src/panel/$(arch); $(RM) *.grd )
- ( $(CD) src/pauxil/$(arch); $(RM) *.grd )
- ( $(CD) src/pfact/$(arch); $(RM) *.grd )
- ( $(CD) src/pgesv/$(arch); $(RM) *.grd )
#
clean_guard_tst :
- ( $(CD) testing/matgen/$(arch); $(RM) *.grd )
- ( $(CD) testing/pmatgen/$(arch); $(RM) *.grd )
- ( $(CD) testing/ptimer/$(arch); $(RM) *.grd )
- ( $(CD) testing/ptest/$(arch); $(RM) *.grd )
- ( $(CD) testing/util/$(arch); $(RM) *.grd )