Changeset 140
- Timestamp:
- 05/30/07 15:52:47
- Files:
-
- guts.sh (modified) (2 diffs)
- guts_io/guts_io.sh (modified) (17 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
guts.sh
r136 r140 10 10 if [ $# -gt 3 -o $# -lt 2 ]; then 11 11 echo "Usage: ./guts.sh [SUITE] [#of threads] [CLASS --> used only for running guts_npb]" 12 exit -112 exit 1 13 13 fi 14 14 15 15 # check the SUITE name and run the specific test bench accordingly 16 16 17 if [ "$SUITE" = ="IO" ] ; then17 if [ "$SUITE" = "IO" ] ; then 18 18 #Run the UPC/IO test bench 19 19 cd guts_io 20 20 ./guts_io.sh $2 21 elif [ "$SUITE" = ="MAIN" ]; then21 elif [ "$SUITE" = "MAIN" ]; then 22 22 #Run the UPC Compiler Main test bench 23 23 cd guts_main 24 24 ./guts_main.sh $2 25 elif [ "$SUITE" = ="COLLECTIVES" ]; then25 elif [ "$SUITE" = "COLLECTIVES" ]; then 26 26 #Run the UPC/Collectives Main test bench 27 27 cd guts_collectives 28 28 ./guts_collectives.sh $2 29 elif [ "$SUITE" = ="NPB" ]; then29 elif [ "$SUITE" = "NPB" ]; then 30 30 #Run the UPC Compiler Stress test bench 31 31 cd guts_npb … … 34 34 echo "Usage: available SUITEs IO, MAIN, COLLECTIVES, NPB" 35 35 echo "Usage: ./guts.sh [SUITE] [#of threads] [CLASS --> used only for running guts_npb]" 36 exit -136 exit 1 37 37 fi guts_io/guts_io.sh
r134 r140 13 13 14 14 # Initial cleanup 15 if [ -e units.passed ]; then15 if test -f units.passed; then 16 16 rm -f units.passed 17 17 fi 18 18 19 if [ -e units.notpassed ]; then19 if test -f units.notpassed; then 20 20 rm -f units.notpassed 21 21 fi 22 22 23 echo -ne"\n\n"24 echo -e"_______________ Script for compiling and running GUTS _______________\n"23 printf "\n\n" 24 printf "_______________ Script for compiling and running GUTS _______________\n" 25 25 26 26 umask 0002 … … 29 29 UNITS_SHARED=units_shared 30 30 echo "Running the testing suite for ${NP} threads" 31 echo -ne"\n"31 printf "\n" 32 32 passed=0 33 33 failed=0 … … 37 37 38 38 for UNIT in `cat ${UNITS}`; do 39 echo -e"--------------> Working on unit -- $UNIT\n"39 printf "--------------> Working on unit -- $UNIT\n" 40 40 41 41 BUILD=`upcio-config -build` 42 build_output=`$UPCC - D__restrict="" -I../include $BUILD $UNIT.upc -o $UNIT >>$UNIT.out 2>$UNIT.errout`43 44 if [ $? -eq 0 ]; then42 build_output=`$UPCC -I../include $BUILD $UNIT.upc -o $UNIT >>$UNIT.out 2>$UNIT.errout` 43 44 if test $? -eq 0; then 45 45 echo $build_output 46 46 echo "Compilation was SUCCESSFUL for the unit [${UNIT}]" … … 49 49 echo $RUN 50 50 exe_output=`$RUN` 51 if [ $? -eq 0 ]; then52 echo -e"TEST \033[34m\033[1mPASSED\033[0m for the unit [$UNIT]"51 if test $? -eq 0; then 52 printf "TEST \033[34m\033[1mPASSED\033[0m for the unit [$UNIT]" 53 53 echo $exe_output 54 54 echo "$UNIT" >>units.passed 55 passed= $((passed+1))55 passed=`expr $passed + 1` 56 56 else 57 echo -e"TEST \033[31m\033[1mFAILED\033[0m for the unit [$UNIT]"57 printf "TEST \033[31m\033[1mFAILED\033[0m for the unit [$UNIT]" 58 58 echo $exe_output 59 59 echo "$UNIT" >>units.notpassed 60 failed= $((failed+1))60 failed=`expr $failed + 1` 61 61 fi 62 62 … … 66 66 cat $UNIT.errout 67 67 echo "$UNIT" >>units.notpassed 68 failed= $((failed+1))69 cmp_failed= $((cmp_failed+1))68 failed=`expr $failed + 1` 69 cmp_failed=`$cmp_failed + 1` 70 70 fi 71 71 72 72 `rm -f *.o ${UNIT} ${UNIT}.*out` 73 73 74 echo -ne"\n"75 echo -e"===============================================================================\n"74 printf "\n" 75 printf "===============================================================================\n" 76 76 done 77 77 … … 90 90 91 91 for SUNIT in `cat ${UNITS_SHARED}`; do 92 echo -e"--------------> Working on unit -- $SUNIT\n"92 printf "--------------> Working on unit -- $SUNIT\n" 93 93 94 94 SBUILD=`upcio-config -build` … … 102 102 `$UPCC -D__restrict="" -DMEMVEC_SIZE=1 -DTYPE=char -DBLOCKSIZE=4 -I../include \ 103 103 $SBUILD $SUNIT.upc -o $SUNIT.char4 >>$SUNIT.char4.out 2>>$SUNIT.errout` 104 if (( $e_memvec == 0)); then104 if test $e_memvec -eq 0; then 105 105 106 106 `$UPCC -D__restrict="" -DMEMVEC_SIZE=1 -DTYPE=int -DBLOCKSIZE=0 -I../include \ … … 114 114 fi 115 115 116 if [ $? -eq 0 ]; then116 if test $? -eq 0; then 117 117 echo "Compilation was SUCCESSFUL for the unit [${SUNIT}]" 118 118 … … 122 122 exe_output=`${RUN_char0}` 123 123 if [ $? -eq 0 ] ; then 124 echo -e"TEST \033[34m\033[1mPASSED\033[0m for the unit [$SUNIT.char0]"124 printf "TEST \033[34m\033[1mPASSED\033[0m for the unit [$SUNIT.char0]" 125 125 echo $exe_output 126 126 echo "${SUNIT}.char0" >>units.passed 127 127 passed=$((passed+1)) 128 128 else 129 echo -e"TEST \033[31m\033[1mFAILED\033[0m for the unit [$SUNIT.char0]"129 printf "TEST \033[31m\033[1mFAILED\033[0m for the unit [$SUNIT.char0]" 130 130 echo $exe_output 131 131 echo "${SUNIT}.char0" >>units.notpassed … … 136 136 echo ${RUN_char1} 137 137 exe_output=`${RUN_char1}` 138 if [ $? -eq 0 ]; then139 echo -e"TEST \033[34m\033[1mPASSED\033[0m for the unit [$SUNIT.char1]"138 if test $? -eq 0; then 139 printf "TEST \033[34m\033[1mPASSED\033[0m for the unit [$SUNIT.char1]" 140 140 echo $exe_output 141 141 echo "${SUNIT}.char1" >>units.passed 142 142 passed=$((passed+1)) 143 143 else 144 echo -e"TEST \033[31m\033[1mFAILED\033[0m for the unit [$SUNIT.char1]"144 printf "TEST \033[31m\033[1mFAILED\033[0m for the unit [$SUNIT.char1]" 145 145 echo $exe_output 146 146 echo "${SUNIT}.char1" >>units.notpassed … … 151 151 echo ${RUN_char4} 152 152 exe_output=`${RUN_char4}` 153 if [ $? -eq 0 ]; then154 echo -e"TEST \033[34m\033[1mPASSED\033[0m for the unit [$SUNIT.char4]"153 if test $? -eq 0; then 154 printf "TEST \033[34m\033[1mPASSED\033[0m for the unit [$SUNIT.char4]" 155 155 echo $exe_output 156 156 echo "${SUNIT}.char4" >>units.passed 157 157 passed=$((passed+1)) 158 158 else 159 echo -e"TEST \033[31m\033[1mFAILED\033[0m for the unit [$SUNIT.char4]"159 printf "TEST \033[31m\033[1mFAILED\033[0m for the unit [$SUNIT.char4]" 160 160 echo $exe_output 161 161 echo "${SUNIT}.char4" >>units.notpassed … … 167 167 echo ${RUN_int0} 168 168 exe_output=`${RUN_int0}` 169 if [ $? -eq 0 ]; then170 echo -e"TEST \033[34m\033[1mPASSED\033[0m for the unit [$SUNIT.int0]"169 if test $? -eq 0; then 170 printf "TEST \033[34m\033[1mPASSED\033[0m for the unit [$SUNIT.int0]" 171 171 echo $exe_output 172 172 echo "${SUNIT}.int0" >>units.passed 173 173 passed=$((passed+1)) 174 174 else 175 echo -e"TEST \033[31m\033[1mFAILED\033[0m for the unit [$SUNIT.int0]"175 printf "TEST \033[31m\033[1mFAILED\033[0m for the unit [$SUNIT.int0]" 176 176 echo $exe_output 177 177 echo "${SUNIT}.int0" >>units.notpassed … … 182 182 echo ${RUN_int1} 183 183 exe_output=`${RUN_int1}` 184 if [ $? -eq 0 ]; then185 echo -e"TEST \033[34m\033[1mPASSED\033[0m for the unit [$SUNIT.int1]"184 if test $? -eq 0; then 185 printf "TEST \033[34m\033[1mPASSED\033[0m for the unit [$SUNIT.int1]" 186 186 echo $exe_output 187 187 echo "${SUNIT}.int1" >>units.passed 188 188 passed=$((passed+1)) 189 189 else 190 echo -e"TEST \033[31m\033[1mFAILED\033[0m for the unit [$SUNIT.int1]"190 printf "TEST \033[31m\033[1mFAILED\033[0m for the unit [$SUNIT.int1]" 191 191 echo $exe_output 192 192 echo "${SUNIT}.int1" >>units.notpassed … … 197 197 echo ${RUN_int4} 198 198 exe_output=`${RUN_int4}` 199 if [ $? -eq 0 ]; then200 echo -e"TEST \033[34m\033[1mPASSED\033[0m for the unit [$SUNIT.int4]"199 if test $? -eq 0; then 200 printf "TEST \033[34m\033[1mPASSED\033[0m for the unit [$SUNIT.int4]" 201 201 echo $exe_output 202 202 echo "${SUNIT}.int4" >>units.passed 203 203 passed=$((passed+1)) 204 204 else 205 echo -e"TEST \033[31m\033[1mFAILED\033[0m for the unit [$SUNIT.int4]"205 printf "TEST \033[31m\033[1mFAILED\033[0m for the unit [$SUNIT.int4]" 206 206 echo $exe_output 207 207 echo "${SUNIT}.int4" >>units.notpassed … … 221 221 rm -f *.o ${SUNIT}.char[0,1,4] ${SUNIT}.int[0,1,4] ${SUNIT}.*out 222 222 223 echo -ne"\n"224 echo -e"===============================================================================\n"223 printf "\n" 224 printf "===============================================================================\n" 225 225 226 226 done … … 230 230 # STATISTICAL OUTPUT 231 231 232 echo -e"________________ GWU-HPCL UPC/IO Testing Summary ________________\n"232 printf "________________ GWU-HPCL UPC/IO Testing Summary ________________\n" 233 233 echo "SUCCESSFUL UNITS --> (units.passed)" 234 echo -ne"\033[34m\033[1m"235 if [ -e units.passed ]; then234 printf "\033[34m\033[1m" 235 if test -f units.passed; then 236 236 cat units.passed|sort|uniq 237 237 fi 238 echo -e"\033[0m"238 printf "\033[0m" 239 239 240 240 echo " FAILED UNITS --> (units.notpassed)" 241 echo -ne"\033[31m\033[1m"242 if [ -e units.notpassed ]; then241 printf "\033[31m\033[1m" 242 if test -f units.notpassed; then 243 243 cat units.notpassed|sort|uniq 244 244 fi 245 echo -e"\033[0m"246 247 echo -e"\033[5m\033[1m\033[35m"245 printf "\033[0m" 246 247 printf "\033[5m\033[1m\033[35m" 248 248 echo " --> Number of units PASSED : $passed" 249 249 echo " --> Number of units FAILED : $failed" … … 251 251 percentage=$(((passed*100) / total)) 252 252 253 echo -e" --> $percentage % of the units have PASSED\n"254 echo -ne"\033[0m"255 echo -e"=========================== TEST END ====================================\n"253 printf " --> $percentage % of the units have PASSED\n" 254 printf "\033[0m" 255 printf "=========================== TEST END ====================================\n"
