/[MITgcm]/MITgcm/tools/example_scripts/nasa_ames/test_pleiades_ieee
ViewVC logotype

Annotation of /MITgcm/tools/example_scripts/nasa_ames/test_pleiades_ieee

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


Revision 1.1 - (hide annotations) (download)
Thu Apr 20 22:14:26 2017 UTC (7 years ago) by jmc
Branch: MAIN
new version of scripts to run testreport on pleiades that now include
 the update of MITgcm code from CVS

1 jmc 1.1 #PBS -S /bin/bash
2     #PBS -N tst_ieee
3     #PBS -l select=1:ncpus=6:mpiprocs=6:model=san
4     #PBS -l walltime=12:00:00
5     #PBS -V
6     #PBS -e /u/jcampin/test_pleiades/output/tst_ieee.stderr
7     #PBS -o /u/jcampin/test_pleiades/output/tst_ieee.stdout
8    
9     if test -f /etc/profile.d/modules.sh ; then
10     . /etc/profile.d/modules.sh
11     fi
12     # Note: added "ulimit -s unlimited" in file "~/.bashrc"
13     # to pass big test (the 2 fizhi-cs-* test & adjoint tests) with MPI
14    
15     umask 0022
16     #- to get case insensitive "ls" (and order of tested experiments)
17     export LC_ALL="en_US.UTF-8"
18     echo " running on: "`hostname`
19    
20     dNam='pleiades'
21     HERE="$HOME/test_$dNam"
22     OUTP="$HERE/output"; SavD="$HERE/send"
23     SEND="ssh pfe $SavD/mpack"
24     TST_DISK="/nobackupp2/jcampin"
25     TST_DIR="$TST_DISK/test_${dNam}"
26    
27     cd $TST_DISK ; pwd
28     if test -d $TST_DIR ; then
29     echo "start from TST_DIR='$TST_DIR' at: "`date`
30     else
31     echo "ERROR: missing directory \"$TST_DIR\""
32     exit 1
33     fi
34    
35     #sfx='ifc'
36     sfx='ieee'
37     #sfx='fast'
38    
39     typ='' ; addExp=''
40     #addExp='global_ocean.gm_k3d global_ocean.gm_res'
41     module purge
42     module load comp-intel/2016.2.181 mpi-sgi/mpt.2.14r19 netcdf/4.0
43     module list
44    
45     OPTFILE="../tools/build_options/linux_amd64_ifort+mpi_ice_nas"
46     options="-j 2 $typ -MPI 6"
47     mpiCMD='mpiexec_mpt -np TR_NPROC ./mitgcmuv'
48     #- need this to get "staf":
49     #export PATH="$PATH:$HOME/bin"
50    
51     dInWeek=`date +%a`
52     #if test "x$dInWeek" = xSun ; then options="$options -fast" ; fi
53     if test $sfx = 'fast' ; then options="$options -fast" ; fi
54    
55     checkOut=2
56     #options="$options -nc" ; checkOut=1
57     #options="$options -q" ; checkOut=0
58    
59     #- keep a copy of MPI_MFILE:
60     #cp -p $PBS_NODEFILE $OUTP"/mf_"$sfx
61    
62     cmdCVS='cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack -q'
63     gcmDIR="MITgcm_$sfx"
64     cd $TST_DIR
65    
66     if [ $checkOut -eq 1 ] ; then
67     if test -d $gcmDIR/CVS ; then
68     #- remove previous output tar files and tar & remove previous output-dir
69     /bin/rm -f $gcmDIR/verification/??_${dNam}-${sfx}_????????_?.tar.gz
70     ( cd $gcmDIR/verification
71     listD=`ls -1 -d ??_${dNam}-${sfx}_????????_? 2> /dev/null`
72     for dd in $listD
73     do
74     if test -d $dd ; then
75     tar -cf ${dd}".tar" $dd > /dev/null 2>&1 && gzip ${dd}".tar" && /bin/rm -rf $dd
76     RETVAL=$?
77     if test "x$RETVAL" != x0 ; then
78     echo "ERROR in tar+gzip prev outp-dir: $dd"
79     echo " on '"`hostname`"' (return val=$RETVAL) but continue"
80     fi
81     fi
82     done )
83     echo "clean tst_2+2 + testreport output (+ Makefile_syntax files)"
84     ( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean )
85     ( cd $gcmDIR/verification ; ./testreport $typ -clean )
86     # ( cd $gcmDIR/verification ; rm -f */build/Makefile_syntax )
87     # ( cd $gcmDIR/verification ; rm -f */build/port_rand.i */build/ptracers_set_iolabel.i )
88     echo "cvs update of dir $gcmDIR :"
89     ( cd $gcmDIR ; $cmdCVS update -P -d ) 2>&1
90     RETVAL=$?
91     if test "x$RETVAL" != x0 ; then
92     echo "cvs update on '"`hostname`"' fail (return val=$RETVAL) => exit"
93     exit
94     fi
95     else
96     echo "no dir: $gcmDIR/CVS => try a fresh check-out"
97     checkOut=2
98     fi
99     fi
100     if [ $checkOut -eq 2 ] ; then
101     if test -e $gcmDIR ; then
102     echo -n "Removing working copy: $gcmDIR ..."
103     rm -rf $gcmDIR
104     echo " done"
105     fi
106     #echo "Downloading using '$cmdCVS co -P -d $gcmDIR MITgcm' ..."
107     #$cmdCVS co -P -d $gcmDIR MITgcm > /dev/null
108     #RETVAL=$?
109     #if test "x$RETVAL" != x0 ; then
110     # echo "cvs co on '"`hostname`"' fail (return val=$RETVAL) => exit"
111     # exit
112     #fi
113     #if test -d $gcmDIR/verification ; then
114     # /usr/bin/find $gcmDIR -type d | xargs chmod g+rxs
115     # /usr/bin/find $gcmDIR -type f | xargs chmod g+r
116     #fi
117     #- make a local copy (instead of using CVS):
118     today=`date +%Y%m%d`
119     nCount=0; updFile='updated_code'
120     updDate=0 ; test -f $updFile && updDate=`cat $updFile`
121     while [ $today -gt $updDate ] ; do
122     nCount=`expr $nCount + 1`
123     if [ $nCount -gt 40 ] ; then
124     echo " waiting too long (nCount=$nCount) for updated code"
125     echo " today=$today , updDate=$updDate "
126     ls -l $updFile
127     exit
128     fi
129     sleep 60
130     updDate=0 ; test -f $updFile && updDate=`cat $updFile`
131     done
132     ls -l $updFile
133     echo " waited nCount=$nCount for updated code ($updDate) to copy"
134     if test -d MITgcm ; then
135     echo -n "Make local copy of dir 'MITgcm' to: $gcmDIR ..."
136     cp -pra MITgcm $gcmDIR
137     echo " done"
138     else echo " dir: MITgcm missing => exit" ; exit ; fi
139     fi
140    
141     #- change dir to $gcmDIR/verification dir:
142     if test -e $gcmDIR/verification ; then
143     if [ $checkOut -lt 2 ] ; then
144     echo " dir $gcmDIR/verification exist" ; fi
145     cd $gcmDIR/verification
146     #------------
147     for exp2add in $addExp ; do
148     if test -d ${exp2add}/CVS ; then
149     echo " assumes dir: $exp2add has been updated"
150     else
151     test -r $exp2add && /bin/rm -rf $exp2add
152     echo " add dir: $exp2add (from Contrib:verification_other)"
153     ( $cmdCVS co -P -d $exp2add \
154     MITgcm_contrib/verification_other/$exp2add > /dev/null )
155     if test $exp2add = 'global_oce_cs32' ; then
156     echo " link dir 'other_input/core2_cnyf' in here"
157     ( cd ${exp2add} ; ln -s ../../../other_input/core2_cnyf . )
158     fi
159     if test $exp2add = 'global_oce_llc90' ; then
160     echo " link dir 'other_input/gael_oce_llc90_input' to 'input_fields'"
161     ( cd ${exp2add} ; ln -s ../../../other_input/gael_oce_llc90_input input_fields )
162     echo " link dirs: 'core2_cnyf' & 'global_oce_input_fields/*' in input_verifs"
163     ( test ! -e ${exp2add}/input_verifs && mkdir ${exp2add}/input_verifs
164     cd ${exp2add}/input_verifs
165     ln -s ../../../../other_input/core2_cnyf .
166     ln -s ../../../../other_input/global_oce_input_fields/* . )
167     fi
168     /usr/bin/find $exp2add -type d | xargs chmod g+rxs
169     /usr/bin/find $exp2add -type f | xargs chmod g+r
170     fi
171     done
172     else
173     echo "no dir: $gcmDIR/verification => exit"
174     exit
175     fi
176    
177     dInWeek='Sun'
178     if test "x$dInWeek" = xSun ; then
179     #options="$options -fast"
180    
181     echo ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx \
182     -command \"$mpiCMD\" -send \"$SEND\" -sd $SavD -a jmc@mitgcm.org
183     ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx \
184     -command "$mpiCMD" -send "$SEND" -sd $SavD -a jmc@mitgcm.org
185    
186     echo ''
187     echo ../tools/do_tst_2+2 -mpi -o ${dNam}-$sfx \
188     -exe \"$mpiCMD\" -send \"$SEND\" -sd $SavD -a jmc@mitgcm.org
189     ../tools/do_tst_2+2 -mpi -o ${dNam}-$sfx \
190     -exe "$mpiCMD" -send "$SEND" -sd $SavD -a jmc@mitgcm.org
191    
192     else
193     options="$options -devel"
194    
195     echo ./testreport $options -of $OPTFILE \
196     -repl_mk do_make_syntax.sh -obj -dd
197     ./testreport $options -of $OPTFILE \
198     -repl_mk do_make_syntax.sh -obj -dd 2>&1
199    
200     echo ''
201     echo ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx \
202     -q -send \"$SEND\" -sd $SavD -a jmc@mitgcm.org
203     ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx \
204     -q -send "$SEND" -sd $SavD -a jmc@mitgcm.org
205    
206     echo ''
207     echo ../tools/do_tst_2+2 -mpi -o ${dNam}-$sfx \
208     -send \"$SEND\" -sd $SavD -a jmc@mitgcm.org
209     ../tools/do_tst_2+2 -mpi -o ${dNam}-$sfx \
210     -send "$SEND" -sd $SavD -a jmc@mitgcm.org
211    
212     fi

  ViewVC Help
Powered by ViewVC 1.1.22