/[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.2 by mlosch, Thu Feb 26 17:51:56 2015 UTC revision 1.4 by mlosch, Fri Feb 27 14:14:40 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 15  Line 15 
15  #   if not, testreport will try to run the sx8-code on the tx7 frontend  #   if not, testreport will try to run the sx8-code on the tx7 frontend
16  #   which will fail inevitably and produce more errors, maybe we can  #   which will fail inevitably and produce more errors, maybe we can
17  #   have a flag that skips everything but the evaluation step to avoid this  #   have a flag that skips everything but the evaluation step to avoid this
18    # $Header$
19    # $Name$
20    
21  # load latest compiler:  # load latest compiler:
22  module load sxf90/460  module load sxf90/460
# Line 71  if [ 0 = 0 ]; then Line 73  if [ 0 = 0 ]; then
73      fi      fi
74      mkdir $TDIR      mkdir $TDIR
75      cd $TDIR      cd $TDIR
76  #   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
77      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
78        if [ $status > 0 ]; then
79            cat cvs_co.log
80        fi
81    else
82        cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack -q update >> cvs_co.log 2>&1
83      if [ $status > 0 ]; then      if [ $status > 0 ]; then
84          cat cvs_co.log          cat cvs_co.log
85      fi      fi
# Line 85  unset CC Line 92  unset CC
92  # make sure that do use the cross compiler for testreport  # make sure that do use the cross compiler for testreport
93  #export CC=sxcc  #export CC=sxcc
94    
95  $RUNTESTREPORT  -j 8 -norun >> $MYOUTPUT 2>&1  $RUNTESTREPORT  -j 8 -norun > $MYOUTPUT 2>&1
96    
97  if [ $status > 0 ]; then  if [ $status > 0 ]
98    echo "something wrong with testreport"      then
99    echo "keeping the working directory"      echo "something wrong with testreport"
100        echo "keeping the working directory"
101  #else  #else
102  #  echo "check restarts"  #  echo "check restarts"
103  #  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 98  if [ $status > 0 ]; then Line 106  if [ $status > 0 ]; then
106  #  rm -rf $TDIR  #  rm -rf $TDIR
107  fi  fi
108    
109  echo "job script looks like this:" > $MYOUTPUT  if [ ! -e $MYOUTPUT ]
110        then
111        touch $MYOUTPUT
112    fi
113    
114    echo " " >> $MYOUTPUT
115    echo "***********************************************************" >> $MYOUTPUT
116    echo "Submitting this job script:" >> $MYOUTPUT
117    echo "***********************************************************" >> $MYOUTPUT
118  cat $HERE/$JOBSCRIPT >> $MYOUTPUT  cat $HERE/$JOBSCRIPT >> $MYOUTPUT
119    echo "***********************************************************" >> $MYOUTPUT
120  echo "end of job script" >> $MYOUTPUT  echo "end of job script" >> $MYOUTPUT
121    echo "***********************************************************" >> $MYOUTPUT
122  echo " " >> $MYOUTPUT  echo " " >> $MYOUTPUT
123    
124  # 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  while [ "${jobruns}"x != x ] Line 129  while [ "${jobruns}"x != x ]
129  do  do
130    sleep 20    sleep 20
131    jobruns=`qstat -n -u mlosch | grep "$JOBNAME"`    jobruns=`qstat -n -u mlosch | grep "$JOBNAME"`
132      echo "waiting for job ${jobruns%% *} ($JOBNAME) to complete"
133      currentexp=`grep Experiment $MYOUTPUT | tail -1`
134      echo "currently running $currentexp"
135  done  done
136    
137  # after running the experiments on the compute node run testreport  # after running the experiments on the compute node run testreport
138  # for a third time to evaluate results on the head node again  # for a third time to evaluate results on the head node again
139  #$RUNTESTREPORT -match 10 -runonly  echo " " >> $MYOUTPUT
140    echo "now run testreport for a final time to evaluate results:" >> $MYOUTPUT
141    echo "$RUNTESTREPORT -match 10 -runonly" >> $MYOUTPUT
142    #$RUNTESTREPORT -match 10 -runonly >> $MYOUTPUT 2>&1
143  $RUNTESTREPORT -match 10 -runonly \  $RUNTESTREPORT -match 10 -runonly \
144      -a "jmc@mitgcm.org, Martin.Losch@awi.de" >> $MYOUTPUT 2>&1      -a "jmc@mitgcm.org, Martin.Losch@awi.de" >> $MYOUTPUT 2>&1
145    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.22