4040CONFIG := test.yaml
4141BENCHMARKDDIR := benchmark
4242LOG := False
43- LIB := "shogun"
4443SAVE := ""
4544LOGLEVEL := "INFO"
4645BLOCK := ""
47- METHODBLOCK := ""
4846UPDATE := False
4947BUILD_CORES := 1
5048
@@ -79,19 +77,12 @@ export PYTHONPATH=$(shell printenv PYTHONPATH):$(shell echo $(ROOTPATH))/librari
7977# Set MATLABPATH correctly.
8078export MATLABPATH=$(shell printenv MATLABPATH) :$(shell pwd) /methods/matlab
8179
82- # Color settings.
83- NO_COLOR =\033[0m
84- ERROR_COLOR =\033[0;31m
85- WARN_COLOR =\033[0;33m
86-
8780.PHONY : help test run memory scripts
8881
8982help : .check .help
90- test : .check .test
9183run : .check .run
92- memory : .check .check_memory .memory
9384scripts : .scripts
94- setup : .check .setup
85+ setup : .check .setup .scripts
9586datasets : .check .datasets
9687checks : .check .checks
9788
@@ -103,21 +94,17 @@ checks: .check .checks
10394 @echo " For example, the following will run all scripts and methods defined"
10495 @echo " in the config.yaml file and the results are shown on the console:"
10596 @echo " "
106- @echo " $$ make run CONFIG=config LOG=False "
97+ @echo " $$ make run CONFIG=config"
10798 @echo " "
10899 @echo " Usage: make [option] [parameters]"
109100 @echo " "
110101 @echo " Parameters:"
111102 @echo " CONFIG [string] The path to the configuration file to perform the benchmark on."
112103 @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."
120105 @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."
121108 @echo " "
122109 @echo " Options:"
123110 @echo " test [parameters] Test the configuration file. Check for correct"
@@ -129,7 +116,6 @@ checks: .check .checks
129116 @echo " setup Download packages and install into libraries/."
130117 @echo " datasets Download datasets into datasets/."
131118 @echo " help Show this info."
132- @echo " checks Run unit tests for benchmarking scripts."
133119 @echo " "
134120 @echo " For further information consult the documentation found at \
135121 http://www.mlpack.org"
@@ -159,31 +145,26 @@ ifndef NUMPY_INSTALLED
159145 @exit 1
160146endif
161147
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-
169148ifndef MS_PRINT_BIN
170149 @echo "$(ERROR_COLOR)[ERROR]$(NO_COLOR) The Massif 'ms_print' command was \
171150 not found; please install the massif 'ms_print' command to run the memory benchmark."
172151 @exit 1
173152endif
174153
175- .test :
176- $(PYTHON_BIN ) $(BENCHMARKDDIR ) /test_config.py -c $(CONFIG )
177-
178154.run :
179155ifndef METHODS
156+ ifndef LIB
157+ $(PYTHON_BIN) run.py -c $(CONFIG) -s $(SAVE) -o $(LOGLEVEL)
158+ else
180159 $(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)
181164else
182165 $(PYTHON_BIN) run.py -c $(CONFIG) -l $(LIB) -m $(METHODS) -s $(SAVE) -o $(LOGLEVEL)
183166endif
184-
185- .memory :
186- $(PYTHON_BIN ) $(BENCHMARKDDIR ) /memory_benchmark.py -c $(CONFIG ) -b $(BLOCK ) -l $(LOG ) -u $(UPDATE ) -m $(METHODBLOCK )
167+ endif
187168
188169.scripts :
189170 # Compile the java files for the weka methods.
@@ -201,12 +182,8 @@ endif
201182 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
202183 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
203184
204-
205185.setup :
206186 cd libraries/ && ./download_packages.sh && ./install_all.sh $(BUILD_CORES )
207187
208188.datasets :
209189 cd datasets/ && ./download_datasets.sh
210-
211- .checks :
212- $(PYTHON_BIN ) tests/tests.py
0 commit comments