#!/bin/bash
# Valgrind on long circuit

trap "/usr/bin/killall -q -u $USER ./Heatmap 2>/dev/null" 0 1 2 3 9 15
trap "/bin/rm -f $STDERR" 0 1 2 3 9 15
if [ ! -x ./Heatmap ]; then
  echo './Heatmap is missing or not executable'
  echo './Heatmap is missing or not executable' 1>&2
  exit 1
fi


$BIN/run -stdout=/dev/null -stderr=/dev/null /usr/bin/valgrind --tool=memcheck --leak-check=yes -q  --log-file=valgrind.out ./Heatmap 0.003 0.002 .:xX# 10 < $WHERE/east_rock.in
cat valgrind.out
