- update source.
[platform/framework/web/crosswalk.git] / src / native_client / tests / spec2k / 175.vpr / run.train.sh
1 #!/bin/bash
2 # Copyright (c) 2011 The Native Client Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 set -o nounset
7 set -o errexit
8
9 PREFIX=${PREFIX:-}
10 VERIFY=${VERIFY:-yes}
11 EMU_HACK=${EMU_HACK:-yes}
12
13 python ../prepare_input.py --config $(basename $(pwd)) train
14
15 if [[ "${EMU_HACK}" != "no" ]] ; then
16   touch costs.out place.out route.out
17 fi
18
19 ARGS1="-nodisp -place_only -init_t 5 -exit_t 0.005 -alpha_t 0.9412 -inner_num 2"
20 ARGS2="-nodisp -route_only -route_chan_width 15 -pres_fac_mult 2 -acc_fac 1 -first_iter_pres_fac 4 -initial_pres_fac 8"
21
22
23 ${PREFIX} $1  ${DASHDASH} net.in arch.in place.out dum.out ${ARGS1} \
24   >place_log.out 2>stderr1.out
25
26 ${PREFIX} $1  ${DASHDASH} net.in arch.in place.in route.out ${ARGS2} \
27   >route_log.out 2>stderr2.out
28
29 LIST="place_log.out route_log.out costs.out route.out"
30
31 if [[ "${VERIFY}" != "no" ]] ; then
32    echo "VERIFY"
33    for i in ${LIST} ; do
34      # NOTE: We are a little more conservative than spec with regard to reltol.
35      # (the normal harness uses weaker reltols for some files).
36      ../specdiff.sh -r 0.015 -l 10 $i data/train/output/$i
37    done
38 fi
39 echo "OK"