-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.sh
39 lines (35 loc) · 1.29 KB
/
test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
INPUT="../../partage/input"
MAIN="../../partage/derousseaux/main"
FILES="$INPUT/*.mnt"
HOSTFILE="../../partage/derousseaux/hostfile"
make
cp main $MAIN
cp hostfile $HOSTFILE
if [ "$#" -eq 1 ]; then
FILES="$INPUT/$1.mnt"
fi
echo "file;time;index;openmp;nbVms" > res.csv
for i in `seq 0 3`
do
for f in $FILES
do
name=`basename $f`
export OMP_NUM_THREADS=1
echo "Processing $name file with 1 vm... (without openmp) for the $i th time"
time=`mpirun -n 1 --hostfile $HOSTFILE --map-by node --bind-to none $MAIN $INPUT/$name out/$name`
if [ `diff out/${name} samples/${name} | wc -l` -ne 0 ]; then
echo "ERRRRREUUUUUUUUR !! (le résultat est différent de l'exemple)"
fi
echo "$name;$time;$i;0;1" >> res.csv
export OMP_NUM_THREADS=4
for nbMachine in 1 2 6
do
echo "Processing $name file with $nbMachine vm...(with openmp) $i th time"
time=`mpirun -n $nbMachine --hostfile $HOSTFILE --map-by node --bind-to none $MAIN $INPUT/$name out/$name`
if [ `diff out/${name} samples/${name} | wc -l` -ne 0 ]; then
echo "ERRRRREUUUUUUUUR !! (le résultat est différent de l'exemple)"
fi
echo "$name;$time;$i;1;$nbMachine" >> res.csv
done
done
done