#!/bin/bash

sleep $1h


MACHINES="echiquier
fou
mate
pat
roi
reine
pion
tour
berger
cavalier
volvic
evian
perrier
contrex
vichy
vittel
robinet
badoit
plancoet
yorre
estephe
medoc
sauternes
pomerol
emilion
margaux
graves
blaye
fronsac
julien"

for machine in $MACHINES
do
    for j in `seq 1 $3`
    do
        sshpass -p "" ssh pgarcia@$machine LD_LIBRARY_PATH=/home-reseau/pgarcia/Atari2600/ale /home-reseau/pgarcia/Atari2600/src/atari --host raoh -s --duration $2 &
    done
done

for machine in pc1-info pc2-info pc3-info
do
    for i in `seq 1 10`
    do
        for j in `seq 1 $3`
        do
            sshpass -p "" ssh pgarcia@$machine$i LD_LIBRARY_PATH=/home-reseau/pgarcia/Atari2600/ale /home-reseau/pgarcia/Atari2600/src/atari --host raoh -s --duration $2 &
        done
    done
done
