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
26 *) die "unknown flavour: $flavour" ;;
30 "N") opts+=( -r42 -R ) ;;
31 *) die "unknown distribution: $distrib" ;;
34 *100*) continue ;; ##### HACK, FIXME #####
35 "1000:1") opts+=( -c1e6,0 -C1.25e2,0 ) ;;
36 "100:1") opts+=( -c1e6,0 -C1.25e3,0 ) ;;
37 "10:1") opts+=( -c1e6,0 -C1.25e4,0 ) ;;
38 "1:1") opts+=( -c1e6,0 -C1.25e5,0 ) ;;
39 "1:10") opts+=( -c1e6,0 -C1.25e6,0 ) ;;
40 "1:100") opts+=( -c1e6,0 -C1.25e7,0 ) ;;
41 "1:1000") opts+=( -c1e6,0 -C1.25e8,0 ) ;;
42 *) die "unknown ratio: $ratio" ;;
44 suffix="${flavour}${distrib}_${ratio}"
45 output="${PREFIX}_${suffix}"
46 more_args="${opts[@]}"
47 results="./results_${suffix}"
48 log "writing file: ${output}"
50 sed -n '/MORE_ARGS/q;p' "$TEMPLATE"
51 printf 'MORE_ARGS=( %s )\n' "${more_args}"
52 sed -n '1,/MORE_ARGS/d;/RESULTS/q;p' "$TEMPLATE"
53 printf 'RESULTS="%s"\n' "${results}"
54 sed '1,/RESULTS/d' "$TEMPLATE"