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

Annotation of /MITgcm_contrib/test_scripts/sx8/mitgcmtestreport_split

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


Revision 1.3 - (hide annotations) (download)
Thu Feb 26 17:52:45 2015 UTC (10 years, 4 months ago) by mlosch
Branch: MAIN
Changes since 1.2: +2 -0 lines
add header and name tags

1 mlosch 1.1 #!/bin/bash -x
2 mlosch 1.2 # new script for running testreport on sx8.awi.de
3     # - split the testreport into 3 steps:
4     # 1/ compiling on head node (tx7.awi.de), with -norun option
5     # 2/ running on compute node (using PBS qsub), with -runonly option
6     # 3/ evaluating result on head node with -runonly option
7     #
8     # Notes:
9     # - step 2 leads to many error messages, because the OS on the compute
10     # nodes does not have the appropriate shell tools, modifying the
11     # - runonly option to skip the evalution step would be nice but not
12     # necessary; you'll just have to live with the error messages
13     # - step 3 assumes that all experiments have been run successfully, i.e.
14     # that the output files are up-to-date.
15     # 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
17     # have a flag that skips everything but the evaluation step to avoid this
18 mlosch 1.3 # $Header: $
19     # $Name: $
20 mlosch 1.1
21     # load latest compiler:
22     module load sxf90/460
23    
24     VENDOR=sxf90
25     RUNIT="runit_"$VENDOR
26     HERE=`pwd`
27     EXE='mpirun -np TR_NPROC ./mitgcmuv'
28     NPROCS=2
29     MPI="-MPI $NPROCS"
30     OUTFILE=/home/sx8/mlosch/out_${VENDOR}
31     MYOUTPUT=/home/sx8/mlosch/testreport_${VENDOR}
32     OUTFILE=out_${VENDOR}
33     JOBNAME=testsx8
34     JOBSCRIPT=job_${VENDOR}
35     #selectexperiment='-t exp2'
36     selectexperiment=''
37     # download code into this directory
38     TDIR=/sx8/scr/mlosch/tmp_$VENDOR
39    
40     OPTFILE=../tools/build_options/SUPER-UX_SX-8_sxf90_awi
41    
42     RUNTESTREPORT="./testreport $MPI -of=${OPTFILE} $selectexperiment"
43     #
44     # create batch script
45     #
46     cat << EOF > $HERE/$JOBSCRIPT
47     #PBS -q sx8-r # job queue not neccesary so far
48     #PBS -N $JOBNAME # give the job a name
49     #PBS -l cpunum_job=$NPROCS # cpus per node
50     #PBS -l cputim_job=2:00:00 # time limit
51     #PBS -l memsz_job=32gb # max accumulated memory, we need this much because of many netcdf files
52     #PBS -j o # join i/o
53     #PBS -S /bin/sh
54     #PBS -o $OUTFILE # o Where to write output
55     #
56    
57     cd \${PBS_O_WORKDIR}
58     $RUNTESTREPORT -runonly -command "$EXE" >> $MYOUTPUT 2>&1
59    
60     EOF
61    
62     # clean up old testreport output
63     if [ -e $MYOUTPUT ]; then
64     rm -rf $MYOUTPUT
65     fi
66     if [ -e $OUTFILE ]; then
67     rm -r $OUTFILE
68     fi
69     if [ 0 = 0 ]; then
70     # create directory and download code
71     if [ -e $TDIR ]; then
72     rm -rf $TDIR
73     fi
74     mkdir $TDIR
75     cd $TDIR
76     # cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co MITgcm_verif_basic >& cvs_co.log
77     cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co MITgcm >& cvs_co.log
78     if [ $status > 0 ]; then
79     cat cvs_co.log
80     fi
81     fi
82    
83     cd $TDIR/MITgcm/verification
84    
85     # make sure that we do not use the cross compiler for testreport
86     unset CC
87     # make sure that do use the cross compiler for testreport
88     #export CC=sxcc
89    
90     $RUNTESTREPORT -j 8 -norun >> $MYOUTPUT 2>&1
91    
92     if [ $status > 0 ]; then
93     echo "something wrong with testreport"
94     echo "keeping the working directory"
95     #else
96     # echo "check restarts"
97     # echo ../tools/do_tst_2+2 -mpi -exe \"$HERE/$RUNIT\" -a NONE
98     # ../tools/do_tst_2+2 -mpi -exe $HERE/$RUNIT -a NONE
99     # everything OK: delete working directory
100     # rm -rf $TDIR
101     fi
102    
103     echo "job script looks like this:" > $MYOUTPUT
104     cat $HERE/$JOBSCRIPT >> $MYOUTPUT
105     echo "end of job script" >> $MYOUTPUT
106     echo " " >> $MYOUTPUT
107    
108     # now submit the job that actually runs all the experiments in one go
109     qsub $HERE/$JOBSCRIPT
110     # keep looking for the job in the job queues and wait until has disappeared
111     jobruns=`qstat -n -u mlosch | grep "$JOBNAME"`
112     while [ "${jobruns}"x != x ]
113     do
114     sleep 20
115     jobruns=`qstat -n -u mlosch | grep "$JOBNAME"`
116     done
117    
118     # after running the experiments on the compute node run testreport
119     # for a third time to evaluate results on the head node again
120     #$RUNTESTREPORT -match 10 -runonly
121     $RUNTESTREPORT -match 10 -runonly \
122     -a "jmc@mitgcm.org, Martin.Losch@awi.de" >> $MYOUTPUT 2>&1
123    
124     echo "end of mitgcmtestreport_split"

  ViewVC Help
Powered by ViewVC 1.1.22