5 cli_tool =
"../../build/bin/gaussian" 7 gammas = [1.7,1.6,1.5,1.4,1.3,1.2,1.1]
9 n_fields_max =
int(sys.argv[1])
11 header =
"#gamma, lambda, n_fields, alpha, action" 14 for n_fields
in range(n_fields_max):
15 n_fields = n_fields + 1
19 output = subprocess.check_output(
20 [cli_tool,
"--gamma", str(gamma),
"--lambda",
21 str(lambda_),
"--n_fields", str(n_fields)]).splitlines()
27 if entry.startswith(
"Action"):
28 action = entry.split(
" ")[1]
29 elif entry.startswith(
"Alpha"):
30 alpha = entry.split(
" ")[1]
32 print "Error: unknown output" 35 print "{}, {}, {}, {}, {}".format(
36 str(gamma), str(lambda_), str(n_fields), alpha, action
39 except subprocess.CalledProcessError
as err:
40 output = err.output.splitlines()
45 if entry.startswith(
"Alpha"):
46 alpha = entry.split(
" ")[1]
48 print "{}, {}, {}, {}, {}".format(
49 str(gamma), str(lambda_), str(n_fields), alpha,
"profiler_failed"