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