/[MITgcm]/MITgcm/tools/example_scripts/ACESgrid/aces_test_all
ViewVC logotype

Diff of /MITgcm/tools/example_scripts/ACESgrid/aces_test_all

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.8 by jmc, Thu Aug 28 03:59:20 2008 UTC revision 1.9 by jmc, Tue Dec 30 16:01:11 2008 UTC
# Line 3  Line 3 
3  # $Header$  # $Header$
4  # $Name$  # $Name$
5    
6    # action =2 : submit test jobs ; =1 : get jobs output ; =3 : do both
7    case $1 in
8     '-subOnly') action=2 ; shift ;;
9     '-getOnly') action=1 ; shift ;;
10     '-sub+get') action=3 ; shift ;;
11              *) action=3 ;;
12    esac
13    #echo "action= $action , Arg= $# "
14    
15  echo -n '-- Starting: '  echo -n '-- Starting: '
16  date  date
17  start=`date +%Y%m%d`  start=`date +%Y%m%d`
18    
19  if test $# = 0  if test $# = 0
20  then  then
21    tst_list='gnu ifc pgi mth tuv'    tst_list='gnu ifc pgi mth tuv'
# Line 32  do Line 42  do
42    if test -f MITgcm_tools/example_scripts/ACESgrid/aces_test_$sfx ; then    if test -f MITgcm_tools/example_scripts/ACESgrid/aces_test_$sfx ; then
43      JOB="tst_"$i      JOB="tst_"$i
44      job_exist=`$QSTAT -a | grep $USER | grep $JOB | wc -l`      job_exist=`$QSTAT -a | grep $USER | grep $JOB | wc -l`
45      if test "x_$job_exist" = x_0 ; then      if [ $action -ge 2 ] ; then
46        $QSUB MITgcm_tools/example_scripts/ACESgrid/aces_test_$sfx      #-- to submit job
47        eval M_$i='submitted'        if test "x_$job_exist" = x_0 ; then
48        nbtst=`expr $nbtst + 1`          $QSUB MITgcm_tools/example_scripts/ACESgrid/aces_test_$sfx
49      else          eval M_$i='submitted'
50        echo $JOB          nbtst=`expr $nbtst + 1`
51        $QSTAT -a | grep $USER | grep $JOB        else
52        echo 'job already exist => skip this test'          echo $JOB
53        eval M_$i='skipped'          $QSTAT -a | grep $USER | grep $JOB
54            echo 'job already exist => skip this test'
55            eval M_$i='skipped'
56          fi
57        else
58        #-- to get outp back:
59          if test "x_$job_exist" = x_0 ; then
60            echo -n 'did not find any job: '
61            echo $JOB
62            eval M_$i='skipped'
63          else
64            echo -n 'found a job: '
65            echo $JOB
66            $QSTAT -a | grep $USER | grep $JOB
67            eval M_$i='submitted'
68            nbtst=`expr $nbtst + 1`
69          fi
70      fi      fi
71    else    else
72      echo 'no file:' aces_test_$sfx 'to submit'      echo 'no file:' aces_test_$sfx 'to submit'
# Line 48  do Line 74  do
74    fi    fi
75  done  done
76    
77    if test $action = 2 ; then
78      count=0
79    else
80  #date_str=`date +%Y%m%d`"_0"  #date_str=`date +%Y%m%d`"_0"
81    
82  MPACKDIR=`dirname $MPACK`    MPACKDIR=`dirname $MPACK`
83  #- build the mpack utility (from build_mpack in testreport):  #- build the mpack utility (from build_mpack in testreport):
84  ( cd $MPACKDIR && ./configure && make ) > TTT.build_mpack.$$ 2>&1    ( cd $MPACKDIR && ./configure && make ) > TTT.build_mpack.$$ 2>&1
85  RETVAL=$?    RETVAL=$?
86  if test "x$RETVAL" != x0 ; then    if test "x$RETVAL" != x0 ; then
87      echo      echo
88      echo "Error building the mpack tools at: $MPACK_DIR"      echo "Error building the mpack tools at: $MPACK_DIR"
89      if test -x $MPACK ; then      if test -x $MPACK ; then
# Line 63  if test "x$RETVAL" != x0 ; then Line 92  if test "x$RETVAL" != x0 ; then
92      else      else
93         HAVE_MPACK=f         HAVE_MPACK=f
94      fi      fi
95  else    else
96      if test -x $MPACK ; then      if test -x $MPACK ; then
97         rm -f TTT.build_mpack.$$         rm -f TTT.build_mpack.$$
98         HAVE_MPACK=t         HAVE_MPACK=t
# Line 72  else Line 101  else
101         echo " $MPACK not executable"         echo " $MPACK not executable"
102         HAVE_MPACK=f         HAVE_MPACK=f
103      fi      fi
104      fi
105      echo
106    
107      count=$nbtst
108  fi  fi
 echo  
109    
110    #- when it's done, retrieve output and send e-mail
111  minutes=0  minutes=0
 count=$nbtst  
112  while test $count != 0 ; do  while test $count != 0 ; do
113    
114      sleep 600      sleep 600

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

  ViewVC Help
Powered by ViewVC 1.1.22