/[MITgcm]/MITgcm_contrib/test_scripts/sx8/mitgcmtestreport_split
ViewVC logotype

Diff of /MITgcm_contrib/test_scripts/sx8/mitgcmtestreport_split

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

revision 1.3 by mlosch, Thu Feb 26 17:52:45 2015 UTC revision 1.6 by mlosch, Mon Mar 2 14:21:31 2015 UTC
# Line 1  Line 1 
1  #!/bin/bash -x  #!/bin/bash
2  # new script for running testreport on sx8.awi.de  # new script for running testreport on sx8.awi.de
3  # - split the testreport into 3 steps:  # - split the testreport into 3 steps:
4  # 1/ compiling on head node (tx7.awi.de), with -norun option  # 1/ compiling on head node (tx7.awi.de), with -norun option
# Line 18  Line 18 
18  # $Header$  # $Header$
19  # $Name$  # $Name$
20    
21    # for some reason the module command is not available in a bash script on
22    # this computer so we have to create it here
23    module () { eval `/usr/bin/modulecmd bash $*` ; }
24    module use --append /sx8/user2/awisoft/modulefiles
25  # load latest compiler:  # load latest compiler:
26  module load sxf90/460  module load sxf90/460
27    module load netcdf
28    #
29  VENDOR=sxf90  VENDOR=sxf90
30  RUNIT="runit_"$VENDOR  RUNIT="runit_"$VENDOR
31  HERE=`pwd`  HERE=`pwd`
# Line 73  if [ 0 = 0 ]; then Line 78  if [ 0 = 0 ]; then
78      fi      fi
79      mkdir $TDIR      mkdir $TDIR
80      cd $TDIR      cd $TDIR
81  #   cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co MITgcm_verif_basic >& cvs_co.log  #   cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co MITgcm_verif_basic > cvs_co.log 2>&1
82      cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co MITgcm >& cvs_co.log      cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co MITgcm > cvs_co.log 2>&1
83      if [ $status > 0 ]; then      if [ "$?" != "0" ]; then
84            cat cvs_co.log
85        fi
86    else
87        cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack -q update >> cvs_co.log 2>&1
88        if [ "$?" != "0" ]; then
89          cat cvs_co.log          cat cvs_co.log
90      fi      fi
91  fi  fi
# Line 87  unset CC Line 97  unset CC
97  # make sure that do use the cross compiler for testreport  # make sure that do use the cross compiler for testreport
98  #export CC=sxcc  #export CC=sxcc
99    
100  $RUNTESTREPORT  -j 8 -norun >> $MYOUTPUT 2>&1  $RUNTESTREPORT  -j 8 -norun > $MYOUTPUT 2>&1
101    
102  if [ $status > 0 ]; then  if [ "$?" != "0" ]
103    echo "something wrong with testreport"      then
104    echo "keeping the working directory"      echo "something wrong with testreport"
105        echo "keeping the working directory"
106  #else  #else
107  #  echo "check restarts"  #  echo "check restarts"
108  #  echo ../tools/do_tst_2+2 -mpi -exe \"$HERE/$RUNIT\" -a NONE  #  echo ../tools/do_tst_2+2 -mpi -exe \"$HERE/$RUNIT\" -a NONE
# Line 100  if [ $status > 0 ]; then Line 111  if [ $status > 0 ]; then
111  #  rm -rf $TDIR  #  rm -rf $TDIR
112  fi  fi
113    
114  echo "job script looks like this:" > $MYOUTPUT  if [ ! -e $MYOUTPUT ]
115        then
116        touch $MYOUTPUT
117    fi
118    
119    echo " " >> $MYOUTPUT
120    echo "***********************************************************" >> $MYOUTPUT
121    echo "Submitting this job script:" >> $MYOUTPUT
122    echo "***********************************************************" >> $MYOUTPUT
123  cat $HERE/$JOBSCRIPT >> $MYOUTPUT  cat $HERE/$JOBSCRIPT >> $MYOUTPUT
124    echo "***********************************************************" >> $MYOUTPUT
125  echo "end of job script" >> $MYOUTPUT  echo "end of job script" >> $MYOUTPUT
126    echo "***********************************************************" >> $MYOUTPUT
127  echo " " >> $MYOUTPUT  echo " " >> $MYOUTPUT
128    
129  # now submit the job that actually runs all the experiments in one go  # now submit the job that actually runs all the experiments in one go
# Line 111  qsub $HERE/$JOBSCRIPT Line 132  qsub $HERE/$JOBSCRIPT
132  jobruns=`qstat -n -u mlosch | grep "$JOBNAME"`  jobruns=`qstat -n -u mlosch | grep "$JOBNAME"`
133  while [ "${jobruns}"x != x ]  while [ "${jobruns}"x != x ]
134  do  do
135    sleep 20    sleep 200
136    jobruns=`qstat -n -u mlosch | grep "$JOBNAME"`    jobruns=`qstat -n -u mlosch | grep "$JOBNAME"`
137      echo "waiting for job ${jobruns%% *} ($JOBNAME) to complete"
138      currentexp=`grep Experiment $MYOUTPUT | tail -1`
139      echo "currently running $currentexp"
140  done  done
141    
142  # after running the experiments on the compute node run testreport  # after running the experiments on the compute node run testreport
143  # for a third time to evaluate results on the head node again  # for a third time to evaluate results on the head node again
144  #$RUNTESTREPORT -match 10 -runonly  echo " " >> $MYOUTPUT
145    echo "now run testreport for a final time to evaluate results:" >> $MYOUTPUT
146    echo "$RUNTESTREPORT -match 10 -runonly" >> $MYOUTPUT
147    #$RUNTESTREPORT -match 10 -runonly >> $MYOUTPUT 2>&1
148  $RUNTESTREPORT -match 10 -runonly \  $RUNTESTREPORT -match 10 -runonly \
149      -a "jmc@mitgcm.org, Martin.Losch@awi.de" >> $MYOUTPUT 2>&1      -a "jmc@mitgcm.org, Martin.Losch@awi.de" >> $MYOUTPUT 2>&1
150    

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.22