Commit 80fafd09 authored by Jean-Baptiste Mouret's avatar Jean-Baptiste Mouret
Browse files

detect libraries at a finer level

parent 34428074
......@@ -71,7 +71,7 @@ def build_bo_benchmarks(bld):
limbo.create_variants(bld,
source = 'limbo/bench.cpp',
uselib_local = 'limbo',
uselib = 'BOOST EIGEN TBB NLOPT LIBCMAES',
uselib = 'BOOST EIGEN TBB NLOPT LIBCMAES MKL_TBB',
variants = ['BAYESOPT_DEF',
'BAYESOPT_DEF_HPOPT',
'LIMBO_DEF',
......
......@@ -56,12 +56,30 @@ except: # not in waf
try:
import numpy as np
numpy_found = True
except:
Logs.pprint('YELLOW', 'WARNING: numpy not found')
try:
import matplotlib
matplotlib.use('Agg') # for headless generation
from pylab import *
pylab_found = True
except:
Logs.pprint('YELLOW', 'WARNING: pylab/matplotlib not found')
try:
import brewer2mpl
bmap = brewer2mpl.get_map('Set2', 'qualitative', 8)
colors = bmap.mpl_colors
plot_ok = True
brewer2mpl_found = True;
except:
Logs.pprint('YELLOW', 'WARNING: brewer2mpl (colors) not found')
if numpy_found and pylab_found and brewer2mpl_found:
plot_ok = True
else:
plot_ok = False
Logs.pprint('YELLOW', 'WARNING: numpy/matplotlib not found: no plot of the BO benchmark results')
......@@ -171,4 +189,4 @@ def plot_all():
plot(k, data)
if __name__ == "__main__":
plot_all()
\ No newline at end of file
plot_all()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment