build_stress_test.svn-base 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. PWRMGMT=0
  19. SHARED=/shared/`whoami`
  20. BIN_STRESS=$SHARED/bin_stress
  21. PAR=1
  22. while [ $PAR -le $NUMPARS ]; do
  23. eval OPT=\$$PAR
  24. case $OPT in
  25. -PWRMGMT ) PWRMGMT=1 ;;
  26. -CLEAN ) rm -rf $BIN_STRESS ; exit ;;
  27. * ) echo Error, wrong option $OPT; exit ;;
  28. esac
  29. PAR=`expr $PAR + 1`
  30. done
  31. if [ ! \( -d $SHARED \) ]; then
  32. echo Creating directory $SHARED
  33. mkdir $SHARED
  34. fi
  35. if [ ! \( -d $BIN_STRESS \) ]; then
  36. echo Creating directory $BIN_STRESS
  37. mkdir $BIN_STRESS
  38. fi
  39. cd apps/STENCIL
  40. make stencil_synch; mv stencil_synch $BIN_STRESS/stencil
  41. make SINGLEBITFLAGS=1 stencil_synch; mv stencil_synch $BIN_STRESS/stencil_1b
  42. cd -
  43. cd apps/PINGPONG;
  44. make pingpong; mv pingpong $BIN_STRESS
  45. cd -
  46. cd apps/NPB
  47. make bt CLASS=S NPROCS=4; mv BT/bt.S.4 $BIN_STRESS/bt.S.4
  48. make bt CLASS=W NPROCS=16; mv BT/bt.W.16 $BIN_STRESS/bt.W.16
  49. make bt CLASS=W NPROCS=36; mv BT/bt.W.36 $BIN_STRESS/bt.W.36
  50. make bt SINGLEBITFLAGS=1 CLASS=S NPROCS=4; mv BT/bt.S.4 $BIN_STRESS/bt.S.4_1b
  51. make bt SINGLEBITFLAGS=1 CLASS=W NPROCS=16; mv BT/bt.W.16 $BIN_STRESS/bt.W.16_1b
  52. make bt SINGLEBITFLAGS=1 CLASS=W NPROCS=36; mv BT/bt.W.36 $BIN_STRESS/bt.W.36_1b
  53. cd -
  54. if [ $PWRMGMT -eq 1 ]; then
  55. cd apps/STENCIL
  56. make PWRMGMT=1 pstencil; mv pstencil $BIN_STRESS
  57. make PWRMGMT=1 power_reset; mv power_reset $BIN_STRESS
  58. make PWRMGMT=1 Fdiv; mv Fdiv $BIN_STRESS
  59. make PWRMGMT=1 FV; mv FV $BIN_STRESS
  60. cd -
  61. fi
  62. cp rccerun $BIN_STRESS
  63. cp hosts/rc.hosts $BIN_STRESS/allhosts
  64. cat hosts/rc.hosts | sort -r > $BIN_STRESS/allhosts_reverse
  65. echo 00 > $BIN_STRESS/2hosts_1tile
  66. echo 01 >> $BIN_STRESS/2hosts_1tile
  67. echo 00 > $BIN_STRESS/2hosts_nbr_tiles
  68. echo 02 >> $BIN_STRESS/2hosts_nbr_tiles
  69. echo 00 > $BIN_STRESS/2hosts_faraway_tiles
  70. echo 47 >> $BIN_STRESS/2hosts_faraway_tiles