/[MITgcm]/MITgcm_contrib/test_scripts/engaging/test_engag_gfo_tlm
ViewVC logotype

Annotation of /MITgcm_contrib/test_scripts/engaging/test_engag_gfo_tlm

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


Revision 1.10 - (hide annotations) (download)
Sat Jan 6 16:05:38 2018 UTC (7 years, 6 months ago) by jmc
Branch: MAIN
Changes since 1.9: +6 -5 lines
- exclude some nodes ;
- to send testreport output, use new email address: jm_c@mitgcm.org
 (replacing jmc@dev.mitgcm.org).

1 jmc 1.1 #!/bin/bash
2     #SBATCH -J tst_gfoTlm
3     #SBATCH -p sched_mit_hill
4     #SBATCH --mem-per-cpu 4000
5     #SBATCH -n 6
6     #SBATCH -N 2
7 jmc 1.10 #SBATCH -x node[016,030,031,073,125,198,332]
8 jmc 1.1 #SBATCH -e /home/jm_c/test_engaging/output/tst_gfoTlm.stderr
9     #SBATCH -o /home/jm_c/test_engaging/output/tst_gfoTlm.stdout
10 jmc 1.6 #SBATCH --no-requeue --constraint=centos6
11 jmc 1.1
12 jmc 1.10 # $Header: /u/gcmpack/MITgcm_contrib/test_scripts/engaging/test_engag_gfo_tlm,v 1.9 2017/07/28 16:52:02 jmc Exp $
13 jmc 1.1 # $Name: $
14    
15     if test -f /etc/profile.d/modules.sh ; then
16     . /etc/profile.d/modules.sh
17     fi
18 jmc 1.3 # Note: added "ulimit -s unlimited" in file "~/.bashrc"
19 jmc 1.1 # to pass big test (the 2 fizhi-cs-* test & adjoint tests) with MPI
20    
21     umask 0022
22     #- to get case insensitive "ls" (and order of tested experiments)
23     export LC_ALL="en_US.UTF-8"
24     echo " running on: "`hostname`
25    
26     dNam='engaging'
27     HERE="$HOME/test_$dNam"
28     OUTP="$HERE/output"; SavD="$HERE/send"
29     SEND="ssh eofe4 $SavD/mpack"
30     TST_DIR="/pool001/jm_c/test_$dNam"
31    
32     if test -d $TST_DIR ; then
33     echo "start from TST_DIR='$TST_DIR' at: "`date`
34     else
35     #if test ! -d /scratch/jm_c ; then mkdir /scratch/jm_c ; fi
36     #if test ! -d $TST_DIR ; then mkdir $TST_DIR ; fi
37     #if test ! -d $TST_DIR ; then
38     # echo "ERROR: Can't create directory \"$TST_DIR\""
39     # exit 1
40     #fi
41     #echo "start in new dir TST_DIR='$TST_DIR' at: "`date`
42     echo "ERROR: missing directory \"$TST_DIR\""
43     exit 1
44     fi
45    
46 jmc 1.8 typ='' ; addExp='' ; skipExp=''
47 jmc 1.1 sfx='gfoTlm'; typ='-tlm'
48 jmc 1.7 module add slurm
49 jmc 1.1 module add gcc
50 jmc 1.7 module add mvapich2/gcc/64/2.0b
51     #module add openmpi/gcc
52 jmc 1.1 export MPI_INC_DIR="$MPI_HOME/include"
53 jmc 1.2 #- for NetCDF:
54     module add harvard/centos6/hdf5-1.8.11_gcc-4.4.7
55     module add harvard/centos6/netcdf-4.3.0_gcc-4.4.7
56 jmc 1.1 OPTFILE="../tools/build_options/linux_amd64_gfortran"
57     options="$typ -MPI 6"
58     ulimit -s unlimited
59     #- need this to get "staf":
60     export PATH="$PATH:$HOME/bin"
61    
62     dAlt=`date +%d` ; dAlt=`expr $dAlt % 3`
63     if [ $dAlt -eq 1 ] ; then options="$options -fast"
64     else options="$options -devel" ; fi
65    
66 jmc 1.3 checkOut=1 ; #options="$options -do"
67 jmc 1.1 #options="$options -nc" ; checkOut=1
68     #options="$options -q" ; checkOut=0
69    
70     NSLOTS=$SLURM_NTASKS
71 jmc 1.2 THEDATE=`date`
72 jmc 1.1 echo '********************************************************************************'
73     echo 'Start job '$THEDATE
74     echo 'NSLOTS = '$NSLOTS
75     echo '======= NODELIST ==============================================================='
76     echo $SLURM_NODELIST
77 jmc 1.4 cat /etc/redhat-release
78 jmc 1.1 echo '======= env ===================================================================='
79 jmc 1.2 env | grep SLURM
80     echo '======= modules ================================================================'
81     module list 2>&1
82 jmc 1.1 echo '================================================================================'
83    
84     #- keep a copy of MPI_MFILE:
85     #cp -p $PBS_NODEFILE $OUTP"/mf_"$sfx
86    
87 jmc 1.3 cmdCVS='cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack -q'
88 jmc 1.1 gcmDIR="MITgcm_$sfx"
89     cd $TST_DIR
90     #- check for disk space: relative space (99%) or absolute (10.G):
91     dsp=`df -P . | tail -1 | awk '{print $5}' | sed 's/%$//'`
92     if [ $dsp -gt 99 ] ; then
93     #dsp=`df -P . | tail -1 | awk '{print $4}'`
94     #if [ $dsp -le 100000000 ] ; then
95     echo 'Not enough space on this disk => do not run testreport.'
96     df .
97     exit
98     fi
99     if [ $checkOut -eq 1 ] ; then
100     if test -d $gcmDIR/CVS ; then
101     echo "cleaning output from $gcmDIR/verification :"
102     #- remove previous output tar files and tar & remove previous output-dir
103     /bin/rm -f $gcmDIR/verification/??_${dNam}-${sfx}_????????_?.tar.gz
104     ( cd $gcmDIR/verification
105     listD=`ls -1 -d ??_${dNam}-${sfx}_????????_? 2> /dev/null`
106     for dd in $listD
107     do
108     if test -d $dd ; then
109     tar -cf ${dd}".tar" $dd > /dev/null 2>&1 && gzip ${dd}".tar" && /bin/rm -rf $dd
110     RETVAL=$?
111     if test "x$RETVAL" != x0 ; then
112     echo "ERROR in tar+gzip prev outp-dir: $dd"
113     echo " on '"`hostname`"' (return val=$RETVAL) but continue"
114     fi
115     fi
116     done )
117     # ( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean )
118     ( cd $gcmDIR/verification ; ./testreport $typ -clean )
119     echo "cvs update of dir $gcmDIR :"
120 jmc 1.3 ( cd $gcmDIR ; $cmdCVS update -P -d ) 2>&1
121 jmc 1.1 RETVAL=$?
122     if test "x$RETVAL" != x0 ; then
123     echo "cvs update on '"`hostname`"' fail (return val=$RETVAL) => exit"
124     exit
125     fi
126     else
127     echo "no dir: $gcmDIR/CVS => try a fresh check-out"
128     checkOut=2
129     fi
130     fi
131     if [ $checkOut -eq 2 ] ; then
132     if test -e $gcmDIR ; then
133 jmc 1.3 echo -n "Removing working copy: $gcmDIR ..."
134     rm -rf $gcmDIR
135     echo " done"
136 jmc 1.1 fi
137     # cvs co MITgcm
138 jmc 1.3 echo "Downloading using '$cmdCVS co -P -d $gcmDIR MITgcm' ..."
139     $cmdCVS co -P -d $gcmDIR MITgcm > /dev/null
140 jmc 1.1 RETVAL=$?
141     if test "x$RETVAL" != x0 ; then
142     echo "cvs co on '"`hostname`"' fail (return val=$RETVAL) => exit"
143     exit
144 jmc 1.3 else echo " done" ; fi
145 jmc 1.1 if test -d $gcmDIR/verification ; then
146     /usr/bin/find $gcmDIR -type d | xargs chmod g+rxs
147     /usr/bin/find $gcmDIR -type f | xargs chmod g+r
148     fi
149     fi
150    
151 jmc 1.7 # -change dir to $gcmDIR/verification dir + add additional experiments:
152 jmc 1.1 if test -e $gcmDIR/verification ; then
153     if [ $checkOut -lt 2 ] ; then
154     echo " dir $gcmDIR/verification exist" ; fi
155     cd $gcmDIR/verification
156 jmc 1.7 for exp2add in $addExp ; do
157     if test -d ${exp2add}/CVS ; then
158     echo " assumes dir: $exp2add has been updated"
159     else
160     test -r $exp2add && /bin/rm -rf $exp2add
161     echo " add dir: $exp2add (from Contrib:verification_other)"
162     ( $cmdCVS co -P -d $exp2add \
163     MITgcm_contrib/verification_other/$exp2add > /dev/null )
164     /usr/bin/find $exp2add -type d | xargs chmod g+rxs
165     /usr/bin/find $exp2add -type f | xargs chmod g+r
166     fi
167     done
168 jmc 1.1 else
169     echo "no dir: $gcmDIR/verification => exit"
170     exit
171     fi
172    
173 jmc 1.8 echo ''
174     echo ./testreport $options -of $OPTFILE \
175 jmc 1.10 -odir ${dNam}-$sfx -send \'$SEND\' -sd $SavD -a jm_c@mitgcm.org
176 jmc 1.8 ./testreport $options -of $OPTFILE \
177 jmc 1.10 -odir ${dNam}-$sfx -send "$SEND" -sd $SavD -a jm_c@mitgcm.org
178 jmc 1.8
179     # echo ''
180     # echo ../tools/do_tst_2+2 -mpi \
181 jmc 1.10 # -o ${dNam}-$sfx -send \'$SEND\' -sd $SavD -a jm_c@mitgcm.org
182 jmc 1.8 # ../tools/do_tst_2+2 -mpi \
183 jmc 1.10 # -o ${dNam}-$sfx -send "$SEND" -sd $SavD -a jm_c@mitgcm.org
184 jmc 1.1

  ViewVC Help
Powered by ViewVC 1.1.22