Commit 78d54537 authored by Taddeus Kroes's avatar Taddeus Kroes

ModSim ass4 taddeus: Ran benchmarks.

parent f6e99ee7
...@@ -4,20 +4,20 @@ if [ $# -lt 3 ]; then ...@@ -4,20 +4,20 @@ if [ $# -lt 3 ]; then
exit 1 exit 1
fi fi
REPEAT=3 REPEAT=4
FILE=bench.txt FILE=bench.txt
dx=`echo "1/$3" | bc -l` dx=`echo "1/$3" | bc -l`
args="sinus 1000 1 $dx 1 2" args="sinus 10000 1 $dx 1 2"
# Execute sequential program # Execute sequential program
#/usr/bin/time -f "%e" --quiet ./seq $args /usr/bin/time -f "%e" -o $FILE ./seq $args
# Clear results file # Clear results file
echo "" > $FILE #echo "" > $FILE
# Execute parallel program for different numbers of nodes # Execute parallel program for different numbers of nodes
for (( i=2; i <= $1; i += $2 )); do for (( i=2; i <= $1; i += $2 )); do
for j in seq $REPEAT; do for j in `seq $REPEAT`; do
/usr/bin/time -f "$i %e" --quiet -ao $FILE ./par.sh $i $args /usr/bin/time -f "$i %e" -ao $FILE ./par.sh $i $args
done done
done done
...@@ -4,6 +4,7 @@ if [ $# -lt 7 ]; then ...@@ -4,6 +4,7 @@ if [ $# -lt 7 ]; then
exit 1 exit 1
fi fi
mpirun -np ${1-4} ./par ${@:2:$#} mpirun -np ${1-4} ./par ${@:2:$#}
#mpirun -np ${1-4} ./par sinus 100 1 .01 1 1 #mpirun -np ${1-4} \
# --hostfile ~/.mpirun.machines ./par ${@:2:$#}
#mpirun -np ${1-4} --mca pls_rsh_agent rsa \ #mpirun -np ${1-4} --mca pls_rsh_agent rsa \
# --hostfile ~/.mpirun.machines ./par ${@:2:$#} # --hostfile ~/.mpirun.machines ./par ${@:2:$#}
...@@ -5,4 +5,4 @@ report.pdf: report.tex ...@@ -5,4 +5,4 @@ report.pdf: report.tex
pdflatex $^ pdflatex $^
clean: clean:
rm *.pdf *.log *.aux rm report.pdf *.log *.aux
19.48
2 11.45
2 10.19
2 10.23
2 10.20
3 14.76
3 14.86
3 14.90
3 14.78
4 11.72
4 11.82
4 11.72
4 11.86
5 13.82
5 13.85
5 13.97
5 13.83
6 12.17
6 12.21
6 12.00
6 12.01
7 13.69
7 13.73
7 13.67
7 13.77
8 12.63
8 12.44
8 12.68
8 12.64
9 13.74
9 13.80
9 13.84
9 13.89
10 12.70
10 12.81
10 12.79
10 12.75
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment