forked from urbach/schwinger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run-benchmarks.php
101 lines (93 loc) · 3.06 KB
/
run-benchmarks.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<?php
function callExecutableWithArguments($executable, $arguments)
{
$commandLine = "$executable $arguments > 'logs/$executable $arguments.log'";
echo "Executing \"$commandLine\"...";
$start = microtime(true);
system($commandLine);
$runtime = round(microtime(true) - $start, 3);
echo " done (runtime: $runtime seconds).\n";
}
function buildArguments(&$argumentsList, $parameters, $parameterNames, $arguments)
{
if (!count($parameterNames))
{
array_push($argumentsList, trim($arguments));
return;
}
$curParameterName = array_shift($parameterNames);
foreach ($parameters[$curParameterName] as $curParameter)
buildArguments($argumentsList, $parameters, $parameterNames, $arguments . ' --' . $curParameterName . ' ' . $curParameter);
}
$parameters = array(
'beta' => array(
'1.0 --mass -0.31000',
//'1.0 --mass -0.30000',
//'1.0 --mass -0.29500',
//'1.0 --mass -0.29000',
//'1.0 --mass -0.28000',
//'1.0 --mass -0.25000',
//'1.0 --mass -0.24500',
//'1.0 --mass -0.24000',
//'1.0 --mass -0.23500',
//'1.0 --mass -0.23125',
//'1.0 --mass -0.22750',
//'1.0 --mass -0.06000',
/*'1.0 --mass -0.05750',
'1.0 --mass -0.05500',
'1.0 --mass 0.53750',
'1.0 --mass 0.55000',
'2.0 --mass -0.13250',
'2.0 --mass -0.13125',
'2.0 --mass -0.01250',
'2.0 --mass -0.00750',
'2.0 --mass 0.40000',
'2.0 --mass 0.40625',
'3.0 --mass -0.08250',
'3.0 --mass -0.08188',
'3.0 --mass -0.08125',
'3.0 --mass 0.01875',
'3.0 --mass 0.02000',
'3.0 --mass 0.02125',
'3.0 --mass 0.35000',
'3.0 --mass 0.35625',
'4.0 --mass -0.06000',
'4.0 --mass -0.05600',
'4.0 --mass 0.02750',
'4.0 --mass 0.03000',
'4.0 --mass 0.03125',
'4.0 --mass 0.31250',
'4.0 --mass 0.31500',
'5.0 --mass -0.04375',
'5.0 --mass -0.04250',
'5.0 --mass 0.03250',
'5.0 --mass 0.03500',
'5.0 --mass 0.03750',
'5.0 --mass 0.28500',
'5.0 --mass 0.29000',
'6.0 --mass -0.03505',
'6.0 --mass -0.03250',
'6.0 --mass 0.03000',
'6.0 --mass 0.03750',
'6.0 --mass 0.03775',
'6.0 --mass 0.26000',
'6.0 --mass 0.26250',
'6.0 --mass 0.26500',*/
),
'n_steps_2' => array(6),//array(2, 4, 8, 12, 16),
'n_steps_1' => array(5),//array(1, 2, 4, 8),
//'no_timescales' => array(2),
//'musqr' => array(0.08, 0.5),//array(0.1, 0.21, 0.4, 0.8),//array(0.01, 0.05, 0.1, 0.2, 0.3, 0.4, 0.6, 0.8, '1.0'),
);
$argumentsList = array();
buildArguments($argumentsList, $parameters, array_keys($parameters), '');
echo 'Total number of commands to execute: ' . count($argumentsList) . "\n";
putenv('PATH=' . getenv('PATH'). ':~/Library/Developer/Xcode/DerivedData/qed-blwhrkwjolhqasfcwocujlitrtcl/Build/Products/Release');
array_shift($argv);
$defaultCommandLine = implode($argv, ' ');
foreach ($argumentsList as $curArguments)
{
$args = (strlen($defaultCommandLine) ? $curArguments . ' ' . $defaultCommandLine : $curArguments);
callExecutableWithArguments('qed', $args);
}
?>