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

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4929 - (view) (download)

1 : glk 4919 #!/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 :     # NOTE using circle.diderot from existing test, not a new parcircle.diderot
14 :     PROG=circle
15 :    
16 :     # Bug exhibited:
17 :     # without parallel execution, i.e. compiling with
18 :     # DARGS="--double --exec $PROG.diderot"
19 :     # program works fine and exits cleanly. But with parallel execution, i.e.
20 :     # DARGS="--target=parallel --double --exec $PROG.diderot"
21 :     # program seems to stabilize when it should (after 142 iterations),
22 :     # but it never exits
23 :    
24 :     DARGS="--target=parallel --double --exec $PROG.diderot"
25 :     echo "@DIDEROTC@ $DARGS"
26 :     eval diderotc $DARGS
27 :    
28 :     ./$PROG -rad 0.5 -l 200 -o parcircle-pos.nrrd ||:
29 :    
30 :     if [[ ! -f parcircle-pos.nrrd ]]; then
31 :     echo "TEST FAIL: parcircle-pos.nrrd output does not exist"
32 :     exit 1
33 :     fi
34 :    
35 :     junk parcircle-pos.nrrd
36 :    
37 :     unu jhisto -i parcircle-pos.nrrd -b 300 300 -min -1.05 -1.05 -max 1.05 1.05 |
38 :     unu quantize -b 8 -o parcircle.pgm
39 :    
40 :     DIFF=$(unu diff parcircle.pgm parcircle-ref.pgm)
41 :     if [[ $DIFF != "unu diff: nrrds are the same" ]]; then
42 :     echo "TEST FAIL: incorrect output: $DIFF"
43 :     exit 1
44 :     fi
45 :    
46 :     echo -e "\nTest passed."

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