#!/bin/sh METHOD=3 EPSILON=3.0 HEIGHT="164 256 512 1024" # 1024 2048 4096" WIDTH="1 2 4 8 16 32 64 128 256 512" # 1024 2048 4096" PROCS="1 2 4 8 16 32 64 96" # 64 128 256 512 1024" echo "$METHOD $EPSILON" echo "Widths $WIDTH" echo "Heights $HEIGHT" echo "Procs $PROCS" echo echo " W H P H/P W/H Time(s) Spd Up %Eff" for w in ${WIDTH}; do for h in ${HEIGHT}; do serial=0 for p in ${PROCS}; do for interation in 1 2 3 4 5; do out=`mpirun -np ${p} ../bin/2dheat.x -t -w ${w} -h ${h} -m ${METHOD} -e ${EPSILON}` # capture serial time if [ 1 -eq ${p} ]; then serial=$out fi # calculate speed up s=`perl -e "print ($serial / $out)"` # calculate efficiency e=`perl -e "print ($s / $p)"` # rows per cpu r=`perl -e "print ($h / $p)"` # w / h c=`perl -e "print ($w / $p)"` printf "%5d %5d %3d %10.5f %10.5f %15.9f %15.9f %15.9f\n" $w $h $p $r $c $out $s $e done done done done