Professional Documents
Culture Documents
Par Reconstruct Par
Par Reconstruct Par
/bin/bash
if [ -z "$1" ]; then
echo ""
echo " K. Wardle 5/18/09"
echo " bash script to run reconstructPar in pseudo-parallel mode"
echo " by breaking time directories into multiple ranges"
echo ""
echo " USAGE: $0 <NP> <outputfile> [output file is optional] "
echo ""
exit
fi
appname="reconstructPar"
appflag="-noZero"
tstart=$tmin
p=p
let nn=$nn+1
tstart=`ls processor0 | sed -n $nn$p`
done
#sleep until jobs finish
#if number of jobs > njobs, hold loop until job finishes
until [ `ps -C $appname | wc -l` -eq 1 ];
do
n1=`ps -C $appname | wc -l`
n2=`echo $n1-1 | bc`
echo "$n2 running..."
sleep 10
done
rm -rf $tempdir
echo "finished"