Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Annotation of /tests/vis15-bugs/parlife_sh.in
ViewVC logotype

Annotation of /tests/vis15-bugs/parlife_sh.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4931 - (view) (download)

1 : glk 4916 #!/bin/bash
2 :     set -o errexit
3 :     set -o nounset
4 :     shopt -s expand_aliases
5 :     JUNK=""
6 :     function junk { JUNK="$JUNK $@"; }
7 :     function cleanup { rm -rf $JUNK; }
8 :     trap cleanup err exit int term
9 :    
10 :     alias diderotc=@DIDEROTC@
11 :     alias unu=@TEEM_BIN@/unu
12 :    
13 :     PROG=parlife
14 :    
15 :     #Two bugs:
16 :     #
17 :     #1) compiling with --target=parallel and --debug results, via
18 :     # DARGS="--target=parallel --snapshot --debug --exec $PROG.diderot"
19 :     # results in a compile failure:
20 :     #parlife.cxx:460:32: error: no member named '_nItems' in 'Diderot::strand_array::worker_cache'
21 :     # assert (ix < this->_nItems);
22 :     # ~~~~ ^
23 :     #/usr/include/assert.h:93:25: note: expanded from macro 'assert'
24 :     # (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
25 :     # ^
26 :     #1 error generated.
27 :     #uncaught exception Fail [Fail: error compiling/linking]
28 :     # raised at common/phase-timer.sml:78.57-78.59
29 :     # raised at common/phase-timer.sml:78.57-78.59
30 :     # raised at cxx-util/run-cc.sml:30.24-30.54
31 :     #
32 :     #2) without debug, compiling via:
33 :     # DARGS="--target=parallel --snapshot --exec $PROG.diderot"
34 :     #creates a program that works, but only saves one snapshot and then exits.
35 :    
36 :     #DARGS="--target=parallel --snapshot --debug --exec $PROG.diderot" # BUG1
37 :     DARGS="--target=parallel --snapshot --exec $PROG.diderot" # BUG2
38 :    
39 :     echo "@DIDEROTC@ $DARGS"
40 :     eval diderotc $DARGS
41 :    
42 :     #valgrind \
43 :     ./$PROG -s 1 -sp parlife-state -l 39 -NN 50 -init parlife-ggg.nrrd ||:
44 :     junk parlife-state-*.nrrd
45 :    
46 :     NUMSNAPS=$(ls -1 parlife-state-*.nrrd | wc -l)
47 :     if [[ $NUMSNAPS -ne 40 ]]; then
48 :     echo "TEST FAIL: got $NUMSNAPS snapshots instead of expected 40"
49 :     exit 1
50 :     fi
51 :    
52 :     unu join -i parlife-state-*.nrrd -a 2 |
53 :     unu quantize -b 8 |
54 :     unu resample -s x3 x3 = -k box -c cell |
55 :     unu tile -a 2 0 1 -s 8 5 -o parlife-states.pgm
56 :     junk parlife-states.pgm
57 :    
58 :     DIFF=$(unu diff parlife-states.pgm parlife-states-ref.pgm)
59 :     if [[ $DIFF != "unu diff: nrrds are the same" ]]; then
60 :     echo "TEST FAIL: incorrect output: $DIFF"
61 :     exit 1
62 :     fi
63 :    
64 :     echo -e "\nTest passed."

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0