run_stress_test.svn-base 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. #!/bin/bash
  2. #
  3. # Copyright 2010 Intel Corporation
  4. #
  5. # Licensed under the Apache License, Version 2.0 (the "License");
  6. # you may not use this file except in compliance with the License.
  7. # You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. #
  17. NUMPARS=$#
  18. PID=$$
  19. LOG=`pwd`/log.$PID
  20. SUM=`pwd`/summary.$PID
  21. SCRATCH=.scratch.$PID
  22. SIZE="UNKNOWN"
  23. PWRMGMT=0
  24. # change the tile clock frequency if using a tile clock divider other than 3
  25. GHZ=0.533
  26. PAR=1
  27. while [ $PAR -le $NUMPARS ]; do
  28. eval OPT=\$$PAR
  29. case $OPT in
  30. -S ) if [ $SIZE = "UNKNOWN" ]; then SIZE=SMALL; fi ;;
  31. -M ) if [ $SIZE = "UNKNOWN" ]; then SIZE=MEDIUM; fi ;;
  32. -L ) if [ $SIZE = "UNKNOWN" ]; then SIZE=LARGE; fi ;;
  33. -PWRMGMT ) PWRMGMT=1 ;;
  34. * ) echo Error, wrong option $OPT | tee -a $LOG | tee -a $SUM
  35. exit ;;
  36. esac
  37. PAR=`expr $PAR + 1`
  38. done
  39. if [ $SIZE = "UNKNOWN" ]; then
  40. echo ERROR: No size specified \(-S, -M, or -L\) | tee -a $LOG | tee -a $SUM
  41. exit
  42. else
  43. echo Executing RCCE stress test of size $SIZE | tee -a $LOG | tee -a $SUM
  44. fi
  45. BIN_STRESS=/shared/`whoami`/bin_stress
  46. if [ ! \( -d $BIN_STRESS \) ]; then
  47. echo ERROR: No stress test directory | tee -a $LOG | tee -a $SUM
  48. echo Please create and populate it by invoking \"build_stress_test\" \
  49. | tee -a $LOG | tee -a $SUM
  50. exit
  51. fi
  52. cd $BIN_STRESS
  53. for HXT in 1tile nbr_tiles faraway_tiles; do
  54. case $SIZE in
  55. SMALL ) ITERS=10;;
  56. MEDIUM ) ITERS=1000;;
  57. LARGE ) ITERS=100000;;
  58. esac
  59. echo ./rccerun -nue 2 -f 2hosts_$HXT -clock $GHZ pingpong $ITERS \
  60. | tee -a $LOG | tee -a $SUM
  61. ./rccerun -nue 2 -f 2hosts_$HXT -clock $GHZ pingpong $ITERS \
  62. | tee -a $LOG | tee $SCRATCH
  63. grep -i latency $SCRATCH >> $SUM
  64. done
  65. for EXT in "" "_1b"; do
  66. if [ "$EXT" = "_1b" ]; then
  67. echo Using single bit flags | tee -a $LOG | tee -a $SUM
  68. fi
  69. for HOSTS in allhosts allhosts_reverse; do
  70. case $SIZE in
  71. SMALL ) BTCORES=4; CLASS=S; STCORES=4; STITERS=10;;
  72. MEDIUM ) BTCORES=16; CLASS=W; STCORES=16; STITERS=100;;
  73. LARGE ) BTCORES=36; CLASS=W; STCORES=48; STITERS=1000;;
  74. esac
  75. echo ./rccerun -nue $STCORES -f $HOSTS -clock $GHZ stencil$EXT $STITERS \
  76. | tee -a $LOG | tee -a $SUM
  77. ./rccerun -nue $STCORES -f $HOSTS -clock $GHZ stencil$EXT $STITERS \
  78. | tee -a $LOG | tee $SCRATCH
  79. grep Verification $SCRATCH | grep SUCCESSFUL >> $SUM
  80. echo ./rccerun -nue $BTCORES -f $HOSTS -clock $GHZ bt.$CLASS.$BTCORES$EXT \
  81. | tee -a $LOG | tee -a $SUM
  82. ./rccerun -nue $BTCORES -f $HOSTS -clock $GHZ bt.$CLASS.$BTCORES$EXT \
  83. | tee -a $LOG | tee $SCRATCH
  84. grep Verification $SCRATCH | grep SUCCESSFUL >> $SUM
  85. done
  86. if [ "$EXT" = "_1b" ]; then
  87. echo End using single bit flags | tee -a $LOG | tee -a $SUM
  88. fi
  89. done
  90. if [ $PWRMGMT -eq 1 ]; then
  91. case $SIZE in
  92. SMALL ) NC=1;;
  93. MEDIUM ) NC=8 ;;
  94. LARGE ) NC=48 ;;
  95. esac
  96. echo ./rccerun -nue $NC -f allhosts Fdiv 4 \
  97. | tee -a $LOG | tee -a $SUM
  98. ./rccerun -nue $NC -f allhosts Fdiv 4 \
  99. | tee -a $LOG | tee $SCRATCH
  100. grep Verification $SCRATCH | grep SUCCESSFUL >> $SUM
  101. echo ./rccerun -nue $NC -f allhosts FV 3 \
  102. | tee -a $LOG | tee -a $SUM
  103. ./rccerun -nue $NC -f allhosts FV 3 \
  104. | tee -a $LOG | tee $SCRATCH
  105. grep Verification $SCRATCH | grep SUCCESSFUL >> $SUM
  106. echo ./rccerun -nue $NC -f allhosts power_reset \
  107. | tee -a $LOG | tee -a $SUM
  108. ./rccerun -nue $NC -f allhosts power_reset \
  109. | tee -a $LOG | tee $SCRATCH
  110. grep Verification $SCRATCH | grep SUCCESSFUL >> $SUM
  111. echo ./rccerun -nue $NC -f allhosts pstencil \
  112. | tee -a $LOG | tee -a $SUM
  113. ./rccerun -nue $NC -f allhosts pstencil \
  114. | tee -a $LOG | tee $SCRATCH
  115. grep Verification $SCRATCH | grep SUCCESSFUL >> $SUM
  116. fi
  117. rm $SCRATCH