Changeset 6e1e2d0 for doc/theses/mike_brooks_MMath/benchmarks/list/Makefile
- Timestamp:
- May 1, 2023, 4:19:09 PM (3 years ago)
- Branches:
- ADT, ast-experimental, master
- Children:
- c083c3d
- Parents:
- a50fdfb (diff), 985b624 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/mike_brooks_MMath/benchmarks/list/Makefile
ra50fdfb r6e1e2d0 1 1 # For correctness, see test-correctness.sh. 2 2 # For performance: 3 # pushd ~/cfax 4 # ~/setcfa build-fast 5 # popd 6 # make perfprogs CFA=$cfa -j8 MODE=performance 7 # make results-latest.csv RUNARGS=5 RUN_NUM_REPS=5 8 3 # pushd ~/cfax 4 # . ~/setcfa build-fast 5 # popd 6 # make perfprogs CFA=$cfa -j8 MODE=performance 7 # make results-latest.csv RUN_DURATION_SEC=5 RUN_NUM_REPS=5 RUN_DATA_SIZE_MODE=common5 8 # cp results-latest.csv results-baseline.csv 9 # make results-latest.csv OP_MOVEMENTS=stack OP_POLARITIES=insfirst OP_ACCESSORS=allhead RUN_DURATION_SEC=5 RUN_NUM_REPS=5 RUN_DATA_SIZE_MODE=thorough 10 # cp results-latest.csv results-sizing.csv 9 11 10 12 CFA = cfa … … 12 14 UXX = ~/u++/u++-7.0.0/bin/u++ 13 15 14 MODE = performance 15 RUNARGS= 16 MODE=performance 17 EXTRA_COMP_FLAGS= 18 RUN_NUM_REPS=3 19 RUN_DATA_SIZE_MODE=none 20 RUN_DURATION_SEC=5 21 RUN_TASKSET_CPULIST=6 16 22 17 23 ifeq "$(MODE)" "performance" 18 PERFFLAGS_CFA = - nodebug -O324 PERFFLAGS_CFA = -DNDEBUG -O3 -nodebug 19 25 PERFFLAGS_CC = -DNDEBUG -O3 20 26 else ifeq "$(MODE)" "correctness" 21 PERFFLAGS_CFA = - debug -O0 -g22 PERFFLAGS_CC = -O0 -g27 PERFFLAGS_CFA = -O0 -g -debug 28 PERFFLAGS_CC = -O0 -g 23 29 else 24 30 $(error Bad MODE ($(MODE)); should be performance or correctness) … … 26 32 27 33 PERFFLAGS_CXX = $(PERFFLAGS_CC) 28 PERFFLAGS_UXX = $(PERFFLAGS_CC) 34 PERFFLAGS_UXX = $(PERFFLAGS_CFA) 35 36 CFLAGS=$(PERFFLAGS_CC) $(EXTRA_COMP_FLAGS) 29 37 30 38 SHELL = /usr/bin/bash … … 101 109 perfexp--% driver--%.o : COMPILER=NO-COMPILER-FOR-$(FX_COARSE) 102 110 111 # Without this %.d rule, ordinary make runs have noise about the recipe for driver--%.o being ill-formed when called on a *.d. 112 # https://stackoverflow.com/questions/3714041/why-does-this-makefile-execute-a-target-on-make-clean 113 # Whatever you -include gets called as a target first. 114 # One such example is driver--upp-upp--stack-insfirst-allhead.d 115 # Without this %.d rule, `make make driver--upp-upp--stack-insfirst-allhead.d` leads to the rule for driver--%.o firing. 116 # Though my dumb human eyes don't see the pattern as matching. 117 %.d: 118 @touch $@ 119 103 120 perfexp--% : driver--%.o observation.o 104 $(COMPILER) $ ^ -o $@121 $(COMPILER) $(EXTRA_COMP_FLAGS) $^ -o $@ 105 122 106 123 driver--%.o : driver.c 107 $(COMPILER) -c $< $(OP_DEFINES) -include op-$(OP).h -include fx-$(FX).h -o $@ -MMD 108 109 110 111 112 RUN_NUM_REPS=3 124 $(COMPILER) $(EXTRA_COMP_FLAGS) -c $< $(OP_DEFINES) -include op-$(OP).h -include fx-$(FX).h -o $@ -MMD 125 126 sayhi: 127 echo $(PERFPROGS) 128 129 130 ifeq "$(RUN_DATA_SIZE_MODE)" "common5" 131 RUN_DATA_SIZES=\ 132 7-1000000 \ 133 71-100000 \ 134 809-10000 \ 135 9051-1000 \ 136 72421-100 137 else ifeq "$(RUN_DATA_SIZE_MODE)" "thorough" 138 RUN_DATA_SIZES=\ 139 7-1000000 \ 140 11-100000 \ 141 13-100000 \ 142 19-100000 \ 143 29-100000 \ 144 37-100000 \ 145 53-100000 \ 146 71-100000 \ 147 101-10000 \ 148 149-10000 \ 149 211-10000 \ 150 283-10000 \ 151 401-10000 \ 152 569-10000 \ 153 809-10000 \ 154 1151-1000 \ 155 1601-1000 \ 156 2267-1000 \ 157 3203-1000 \ 158 4547-1000 \ 159 6473-1000 \ 160 9051-1000 \ 161 12809-100 \ 162 18119-100 \ 163 25601-100 \ 164 36209-100 \ 165 51203-100 \ 166 72421-100 \ 167 102407-10 \ 168 144817-10 \ 169 204803-10 \ 170 289637-10 \ 171 409609-10 \ 172 579263-10 \ 173 819229-10 \ 174 1158613-1 \ 175 1638431-1 \ 176 2317057-1 \ 177 3276803-1 \ 178 4634111-1 \ 179 6553621-1 \ 180 9268211-1 181 else ifeq "$(RUN_DATA_SIZE_MODE)" "manual" 182 ifeq "$(RUN_DATA_SIZES)" "" 183 $(error RUN_DATA_SIZE_MODE is manual but RUN_DATA_SIZES not given) 184 endif 185 else ifeq "$(RUN_DATA_SIZE_MODE)" "none" 186 # Assume user manages RUN_ARGS; empty RUN_ARGS just means run with compiled-in defaults 187 RUN_DATA_SIZES=none 188 else 189 $(error Bad RUN_DATA_SIZE_MODE ($(RUN_DATA_SIZE_MODE)); should be common5, thorough or manual) 190 endif 191 113 192 RUN_REP_IDS=$(shell echo {1..$(RUN_NUM_REPS)}) # 1 2 3 114 193 RUN_REP_EXTS=$(call cross3,,run,$(RUN_REP_IDS),.1csv) # run1.1csv run2.1cav run3.1csv 115 194 116 RESULT1S=$(call cross,.,$(CORES),$(RUN_REP_EXTS)) # lq-tailq--stack-inslast-allhead.run2.1csv 195 RUN_LAUNCHES=$(call cross,--,$(RUN_DATA_SIZES),$(RUN_REP_EXTS)) 196 197 198 199 RESULT1S=$(call cross,.,$(CORES),$(RUN_LAUNCHES)) # lq-tailq--stack-inslast-allhead.run2.1csv 200 117 201 118 202 RESULT1S_SHUFD=$(shell shuf -e $(RESULT1S)) 119 203 120 204 %.1csv : CORE=$(basename $(basename $@)) 121 %.1csv : REP_ID=$(subst .run,,$(suffix $(basename $@))) 205 %.1csv : LAUNCH=$(subst .,,$(suffix $(basename $@))) 206 %.1csv : SIZING=$(call proj,--,$(LAUNCH),1) 207 %.1csv : NUMNODES=$(call proj,-,$(SIZING),1) 208 %.1csv : CHECKDONE=$(call proj,-,$(SIZING),2) 209 %.1csv : REP_ID=$(subst run,,$(call proj,--,$(LAUNCH),2)) 210 %.1csv : RUN_ARGS=$(if $(filter none,$(SIZING)),,$(RUN_DURATION_SEC) $(CHECKDONE) $(NUMNODES) -1 $(REP_ID)) # use REP_ID as seed 122 211 %.1csv : REP_TIME=$(shell date '+%F %H:%M:%S') 123 212 %.1csv : perfprogs FORCE 124 ./perfexp--$(CORE) $(RUNARGS) | xargs -n 1 printf '%s,%s,%s\n' "$(REP_TIME)" "$(REP_ID)" | tee $@ 213 taskset --cpu-list $(RUN_TASKSET_CPULIST) ./perfexp--$(CORE) $(RUN_ARGS) | xargs -n 1 printf '%s,%s,%s,%s\n' "$(REP_TIME)" "$(REP_ID)" "$(RUN_ARGS)" | tee $@ 214 125 215 126 216 BATCHTIME=$(shell date '+%F--%H-%M-%S') … … 146 236 .PRECIOUS: result--%.1csv driver--%.o perfexp--% %.o 147 237 148 149 238 -include *.d
Note:
See TracChangeset
for help on using the changeset viewer.