5 TEMPLATE=${1:-"ag_parameters"}
17 test -r "$TEMPLATE" || die "file not found: $TEMPLATE"
19 for flavour in "I" "R"; do
20 for distrib in "1" "N"; do
21 for ratio in "1000:1" "100:1" "10:1" "1:1" "1:10" "1:100" "1:1000"; do
22 declare -a opts=( -m1e-4 -M10 )
26 *) die "unknown flavour: $flavour" ;;
30 "N") opts+=( -r42 -R ) ;;
31 *) die "unknown distribution: $distrib" ;;
34 "1000:1") opts+=( -c1e6,0 -C1.25e2,0 ) ;;
35 "100:1") opts+=( -c1e6,0 -C1.25e3,0 ) ;;
36 "10:1") opts+=( -c1e6,0 -C1.25e4,0 ) ;;
37 "1:1") opts+=( -c1e6,0 -C1.25e5,0 ) ;;
38 "1:10") opts+=( -c1e6,0 -C1.25e6,0 ) ;;
39 "1:100") opts+=( -c1e6,0 -C1.25e7,0 ) ;;
40 "1:1000") opts+=( -c1e6,0 -C1.25e8,0 ) ;;
41 *) die "unknown ratio: $ratio" ;;
43 suffix="${flavour}${distrib}_${ratio}"
44 output="${PREFIX}_${suffix}"
45 more_args="${opts[@]}"
46 results="./results_${suffix}"
47 log "writing file: ${output}"
49 sed -n '/MORE_ARGS/q;p' "$TEMPLATE"
50 printf 'MORE_ARGS=( %s )\n' "${more_args}"
51 sed -n '1,/MORE_ARGS/d;/RESULTS/q;p' "$TEMPLATE"
52 printf 'RESULTS="%s"\n' "${results}"
53 sed '1,/RESULTS/d' "$TEMPLATE"