#!/bin/bash
HGID=$1
RAWFILE=$2
RETURNFILE=$3
P=$4
W=$5
I=$6
J=$7

control_c()
{
  echo "= Interrupted and caught in lorenz_wrapper" >> $RAWFILE
  exit $?
}
trap control_c SIGINT

echo "= lorenz_wrapper started at `date`" > $RAWFILE
./$HGID/lorenz_mpi $P $W $I $J 2> $RAWFILE.err 1>> $RAWFILE
echo "= lorenz_wrapper stopped at `date`" >> $RAWFILE
python $HGID/block.py

