|
Revision 147
(checked in by apokayi, 1 year ago)
|
fix some issues in the Makefile and add the clean-up to the the script
|
- Property svn:executable set to
*
|
| Line | |
|---|
| 1 |
#!/bin/sh |
|---|
| 2 |
|
|---|
| 3 |
# GWU-HPCL Unified Testing Suite |
|---|
| 4 |
# UPC Compiler Stress Testing using some NPB kernels |
|---|
| 5 |
# Script by Abdullah Kayi |
|---|
| 6 |
|
|---|
| 7 |
#go to the src directory |
|---|
| 8 |
cd NPB-UPC/MG |
|---|
| 9 |
|
|---|
| 10 |
# COMPILE -- NAS NPB |
|---|
| 11 |
if test $# -ne 2 ; then |
|---|
| 12 |
echo "Usage: ./guts_npb.sh [NP] [CLASS]" |
|---|
| 13 |
echo "for example --> ./guts_npb.sh 2 W" |
|---|
| 14 |
exit |
|---|
| 15 |
else |
|---|
| 16 |
make CLASS=$2 NP=$1 |
|---|
| 17 |
|
|---|
| 18 |
if test $? -eq 0 ; then |
|---|
| 19 |
echo "Compilation was SUCCESSFUL for the kernel MG Class [$2]" |
|---|
| 20 |
echo "Now the kernel will be run for ${NP} threads ..." |
|---|
| 21 |
RUN=`eval echo "upcrun -qn $1 mg.$2.$1"` |
|---|
| 22 |
echo $RUN |
|---|
| 23 |
exe_output=`$RUN` |
|---|
| 24 |
if [ $? -eq 0 ] ; then |
|---|
| 25 |
printf "TEST \033[34m\033[1mPASSED\033[0m for the kernel CLASS [$2]" |
|---|
| 26 |
echo $exe_output |
|---|
| 27 |
else |
|---|
| 28 |
printf "TEST \033[31m\033[1mFAILED\033[0m for the kernel CLASS [$2]" |
|---|
| 29 |
echo $exe_output |
|---|
| 30 |
fi |
|---|
| 31 |
else |
|---|
| 32 |
echo "COMPILER ERROR: The kernel NAS-MG cannot be compiled" |
|---|
| 33 |
echo "The kernel will not be run!!!" |
|---|
| 34 |
fi |
|---|
| 35 |
fi |
|---|
| 36 |
# do some cleanup at the end |
|---|
| 37 |
make clean |
|---|
| 38 |
rm -rf mg.$2.$1 |
|---|
| 39 |
rm -rf ../sys/setparams |
|---|