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

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4929 - (download) (annotate)
Thu Feb 16 20:17:03 2017 UTC (2 years, 4 months ago) by jhr
File size: 1247 byte(s)
  remove svnexecutable property from files that shouldn't be executable
#!/bin/bash
set -o errexit
set -o nounset
shopt -s expand_aliases
JUNK=""
function junk { JUNK="$JUNK $@"; }
function cleanup { rm -rf $JUNK; }
trap cleanup err exit int term

alias diderotc=@DIDEROTC@
alias unu=@TEEM_BIN@/unu

# NOTE using circle.diderot from existing test, not a new parcircle.diderot
PROG=circle

# Bug exhibited:
# without parallel execution, i.e. compiling with
#   DARGS="--double --exec $PROG.diderot"
# program works fine and exits cleanly.  But with parallel execution, i.e.
#   DARGS="--target=parallel --double --exec $PROG.diderot"
# program seems to stabilize when it should (after 142 iterations),
# but it never exits

DARGS="--target=parallel --double --exec $PROG.diderot"
echo "@DIDEROTC@ $DARGS"
eval diderotc $DARGS

./$PROG -rad 0.5 -l 200 -o parcircle-pos.nrrd ||:

if [[ ! -f parcircle-pos.nrrd ]]; then
  echo "TEST FAIL: parcircle-pos.nrrd output does not exist"
  exit 1
fi

junk parcircle-pos.nrrd

unu jhisto -i parcircle-pos.nrrd -b 300 300 -min -1.05 -1.05 -max 1.05 1.05 |
unu quantize -b 8 -o parcircle.pgm

DIFF=$(unu diff parcircle.pgm parcircle-ref.pgm)
if [[ $DIFF != "unu diff: nrrds are the same" ]]; then
    echo "TEST FAIL: incorrect output: $DIFF"
    exit 1
fi

echo -e "\nTest passed."

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