40
40
CONFIG := test.yaml
41
41
BENCHMARKDDIR := benchmark
42
42
LOG := False
43
- LIB := "shogun"
44
43
SAVE := ""
45
44
LOGLEVEL := "INFO"
46
45
BLOCK := ""
47
- METHODBLOCK := ""
48
46
UPDATE := False
49
47
BUILD_CORES := 1
50
48
@@ -79,19 +77,12 @@ export PYTHONPATH=$(shell printenv PYTHONPATH):$(shell echo $(ROOTPATH))/librari
79
77
# Set MATLABPATH correctly.
80
78
export MATLABPATH=$(shell printenv MATLABPATH) :$(shell pwd) /methods/matlab
81
79
82
- # Color settings.
83
- NO_COLOR =\033[0m
84
- ERROR_COLOR =\033[0;31m
85
- WARN_COLOR =\033[0;33m
86
-
87
80
.PHONY : help test run memory scripts
88
81
89
82
help : .check .help
90
- test : .check .test
91
83
run : .check .run
92
- memory : .check .check_memory .memory
93
84
scripts : .scripts
94
- setup : .check .setup
85
+ setup : .check .setup .scripts
95
86
datasets : .check .datasets
96
87
checks : .check .checks
97
88
@@ -103,21 +94,17 @@ checks: .check .checks
103
94
@echo " For example, the following will run all scripts and methods defined"
104
95
@echo " in the config.yaml file and the results are shown on the console:"
105
96
@echo " "
106
- @echo " $$ make run CONFIG=config LOG=False "
97
+ @echo " $$ make run CONFIG=config"
107
98
@echo " "
108
99
@echo " Usage: make [option] [parameters]"
109
100
@echo " "
110
101
@echo " Parameters:"
111
102
@echo " CONFIG [string] The path to the configuration file to perform the benchmark on."
112
103
@echo " Default '$( CONFIG) '."
113
- @echo " BLOCK [string] Run only the specified blocks defined in the configuration file."
114
- @echo " Default run all blocks."
115
- @echo " LOG [boolean] If set, the reports will be saved in the database."
116
- @echo " Default '$( LOG) '."
117
- @echo " UPDATE [boolean] If set, the latest reports in the database are updated."
118
- @echo " Default '$( UPDATE) '."
119
- @echo " METHODBLOCK [string] Run only the specified methods defined in the configuration file."
104
+ @echo " METHODS [string] Run only the specified methods defined in the configuration file."
120
105
@echo " Default run all methods."
106
+ @echo " LIB [string] Run only the benchmarks for the specified library defined in the configuration file."
107
+ @echo " Default run all libraries."
121
108
@echo " "
122
109
@echo " Options:"
123
110
@echo " test [parameters] Test the configuration file. Check for correct"
@@ -129,7 +116,6 @@ checks: .check .checks
129
116
@echo " setup Download packages and install into libraries/."
130
117
@echo " datasets Download datasets into datasets/."
131
118
@echo " help Show this info."
132
- @echo " checks Run unit tests for benchmarking scripts."
133
119
@echo " "
134
120
@echo " For further information consult the documentation found at \
135
121
http://www.mlpack.org"
@@ -159,31 +145,26 @@ ifndef NUMPY_INSTALLED
159
145
@exit 1
160
146
endif
161
147
162
- .check_memory :
163
- ifndef VALGRIND_BIN
164
- @echo "$(ERROR_COLOR)[ERROR]$(NO_COLOR) The valgrind executable \
165
- was not found; please install valgrind to run the memory benchmark."
166
- @exit 1
167
- endif
168
-
169
148
ifndef MS_PRINT_BIN
170
149
@echo "$(ERROR_COLOR)[ERROR]$(NO_COLOR) The Massif 'ms_print' command was \
171
150
not found; please install the massif 'ms_print' command to run the memory benchmark."
172
151
@exit 1
173
152
endif
174
153
175
- .test :
176
- $(PYTHON_BIN ) $(BENCHMARKDDIR ) /test_config.py -c $(CONFIG )
177
-
178
154
.run :
179
155
ifndef METHODS
156
+ ifndef LIB
157
+ $(PYTHON_BIN) run.py -c $(CONFIG) -s $(SAVE) -o $(LOGLEVEL)
158
+ else
180
159
$(PYTHON_BIN) run.py -c $(CONFIG) -l $(LIB) -s $(SAVE) -o $(LOGLEVEL)
160
+ endif
161
+ else
162
+ ifndef LIB
163
+ $(PYTHON_BIN) run.py -c $(CONFIG) -m $(METHODS) -s $(SAVE) -o $(LOGLEVEL)
181
164
else
182
165
$(PYTHON_BIN) run.py -c $(CONFIG) -l $(LIB) -m $(METHODS) -s $(SAVE) -o $(LOGLEVEL)
183
166
endif
184
-
185
- .memory :
186
- $(PYTHON_BIN ) $(BENCHMARKDDIR ) /memory_benchmark.py -c $(CONFIG ) -b $(BLOCK ) -l $(LOG ) -u $(UPDATE ) -m $(METHODBLOCK )
167
+ endif
187
168
188
169
.scripts :
189
170
# Compile the java files for the weka methods.
@@ -201,12 +182,8 @@ endif
201
182
g++ -O2 -std=c++11 methods/dlibml/src/ALLKNN.cpp -o methods/dlibml/dlibml_allknn -I" $( INCLUDEPATH) " -L" $( LIBPATH) " -ldlib -lmlpack -lboost_program_options -lblas -llapack
202
183
g++ -O2 -std=c++11 methods/dlibml/src/KMEANS.cpp -o methods/dlibml/dlibml_kmeans -I" $( INCLUDEPATH) " -L" $( LIBPATH) " -ldlib -lmlpack -lboost_program_options -lblas -llapack
203
184
204
-
205
185
.setup :
206
186
cd libraries/ && ./download_packages.sh && ./install_all.sh $(BUILD_CORES )
207
187
208
188
.datasets :
209
189
cd datasets/ && ./download_datasets.sh
210
-
211
- .checks :
212
- $(PYTHON_BIN ) tests/tests.py
0 commit comments