#!/bin/sh

#COMMON OPTIONS
LAST="12";    #number of machines
FIRST="1";
T=$FIRST;
ITER="30";
NICE="0"
G="0";       #if 1 read an approximation, if 0 - do not
H="1";       #if 1 save inside the cycle, if 0 - do not
B="0";       #if 1 then write the differential, if 0 - do not
L="90";        
Y="0";       #if 1 then read the differential, if 0 - do not

#TAYLOR OPTIONS
K="1";       #number of renormalization
Q="0";       #1 if quads, 0 if taylors 
R="2.266";   #radius of analyticity
O="~/numerics_data/";
F="~/numerics_data/matrix/taylor_2_3";
E="1.0E-10";

for f in `cat ~/.hosts`; do
    echo "starting on $T-th machine";
    ssh $f   ~/Siegel_Numerics/run  -cp ~/Siegel_Numerics/approx_sol  -h $H -g $G -i $ITER -k $K -x $LAST -t $T -b $B -l $L -r $R  -o $O -q $Q  -e $E -y $Y  -f $F;
    T="`expr $T + 1`"
    if test $T -gt $LAST
	then
	exit;
    fi
    echo "starting on $T-th machine";
    ssh $f   ~/Siegel_Numerics/run  -cp ~/Siegel_Numerics/approx_sol  -h $H -g $G -i $ITER -k $K -x $LAST -t $T -b $B -l $L  -r $R -o $O -q $Q -e $E -y $Y -f $F;
    T="`expr $T + 1`"
    if test $T -gt $LAST
	then
	exit;
    fi
done


