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

Annotation of /MITgcm_contrib/test_scripts/engaging/test_engag_op64_adm

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


Revision 1.10 - (hide annotations) (download)
Sat Jan 6 16:05:39 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_o64Adm
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_o64Adm.stderr
9     #SBATCH -o /home/jm_c/test_engaging/output/tst_o64Adm.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_op64_adm,v 1.9 2017/07/28 16:52:01 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='o64Adm'; typ='-adm'
48     module add open64
49     module add mvapich2/open64/64/2.0b
50     export MPI_INC_DIR="$MPI_HOME/include"
51     OPTFILE="../tools/build_options/linux_amd64_open64"
52     #options="-j 2 -devel -gsl"
53     options="$typ -MPI 6"
54     #export OMP_NUM_THREADS=2
55     #export OMP_SLAVE_STACK_SIZE=400m
56     #export GSL_IEEE_MODE=double-precision,mask-underflow,mask-denormalized
57     ulimit -s unlimited
58     #- need this to get "staf":
59     export PATH="$PATH:$HOME/bin"
60    
61     dAlt=`date +%d` ; dAlt=`expr $dAlt % 3`
62     if [ $dAlt -eq 1 ] ; then options="$options -fast"
63     else options="$options -devel" ; fi
64    
65 jmc 1.3 checkOut=1 ; #options="$options -do"
66 jmc 1.1 #options="$options -nc" ; checkOut=1
67     #options="$options -q" ; checkOut=0
68    
69     NSLOTS=$SLURM_NTASKS
70 jmc 1.2 THEDATE=`date`
71 jmc 1.1 echo '********************************************************************************'
72     echo 'Start job '$THEDATE
73     echo 'NSLOTS = '$NSLOTS
74     echo '======= NODELIST ==============================================================='
75     echo $SLURM_NODELIST
76 jmc 1.4 cat /etc/redhat-release
77 jmc 1.1 echo '======= env ===================================================================='
78 jmc 1.2 env | grep SLURM
79     echo '======= modules ================================================================'
80     module list 2>&1
81 jmc 1.1 echo '================================================================================'
82    
83     #- keep a copy of MPI_MFILE:
84     #cp -p $PBS_NODEFILE $OUTP"/mf_"$sfx
85    
86 jmc 1.3 cmdCVS='cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack -q'
87 jmc 1.1 gcmDIR="MITgcm_$sfx"
88     cd $TST_DIR
89     #- check for disk space: relative space (99%) or absolute (10.G):
90     dsp=`df -P . | tail -1 | awk '{print $5}' | sed 's/%$//'`
91     if [ $dsp -gt 99 ] ; then
92     #dsp=`df -P . | tail -1 | awk '{print $4}'`
93     #if [ $dsp -le 100000000 ] ; then
94     echo 'Not enough space on this disk => do not run testreport.'
95     df .
96     exit
97     fi
98     if [ $checkOut -eq 1 ] ; then
99     if test -d $gcmDIR/CVS ; then
100     echo "cleaning output from $gcmDIR/verification :"
101     #- remove previous output tar files and tar & remove previous output-dir
102     /bin/rm -f $gcmDIR/verification/??_${dNam}-${sfx}_????????_?.tar.gz
103     ( cd $gcmDIR/verification
104     listD=`ls -1 -d ??_${dNam}-${sfx}_????????_? 2> /dev/null`
105     for dd in $listD
106     do
107     if test -d $dd ; then
108     tar -cf ${dd}".tar" $dd > /dev/null 2>&1 && gzip ${dd}".tar" && /bin/rm -rf $dd
109     RETVAL=$?
110     if test "x$RETVAL" != x0 ; then
111     echo "ERROR in tar+gzip prev outp-dir: $dd"
112     echo " on '"`hostname`"' (return val=$RETVAL) but continue"
113     fi
114     fi
115     done )
116     # ( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean )
117     ( cd $gcmDIR/verification ; ./testreport $typ -clean )
118     echo "cvs update of dir $gcmDIR :"
119 jmc 1.3 ( cd $gcmDIR ; $cmdCVS update -P -d ) 2>&1
120 jmc 1.1 RETVAL=$?
121     if test "x$RETVAL" != x0 ; then
122     echo "cvs update on '"`hostname`"' fail (return val=$RETVAL) => exit"
123     exit
124     fi
125     else
126     echo "no dir: $gcmDIR/CVS => try a fresh check-out"
127     checkOut=2
128     fi
129     fi
130     if [ $checkOut -eq 2 ] ; then
131     if test -e $gcmDIR ; then
132 jmc 1.3 echo -n "Removing working copy: $gcmDIR ..."
133     rm -rf $gcmDIR
134     echo " done"
135 jmc 1.1 fi
136     # cvs co MITgcm
137 jmc 1.3 echo "Downloading using '$cmdCVS co -P -d $gcmDIR MITgcm' ..."
138     $cmdCVS co -P -d $gcmDIR MITgcm > /dev/null
139 jmc 1.1 RETVAL=$?
140     if test "x$RETVAL" != x0 ; then
141     echo "cvs co on '"`hostname`"' fail (return val=$RETVAL) => exit"
142     exit
143 jmc 1.3 else echo " done" ; fi
144 jmc 1.1 if test -d $gcmDIR/verification ; then
145     /usr/bin/find $gcmDIR -type d | xargs chmod g+rxs
146     /usr/bin/find $gcmDIR -type f | xargs chmod g+r
147     fi
148     fi
149    
150     #- change dir to $gcmDIR/verification dir:
151     if test -e $gcmDIR/verification ; then
152     if [ $checkOut -lt 2 ] ; then
153     echo " dir $gcmDIR/verification exist" ; fi
154     cd $gcmDIR/verification
155 jmc 1.7 for exp2add in $addExp ; do
156     if test -d ${exp2add}/CVS ; then
157     echo " assumes dir: $exp2add has been updated"
158     else
159     test -r $exp2add && /bin/rm -rf $exp2add
160     echo " add dir: $exp2add (from Contrib:verification_other)"
161     ( $cmdCVS co -P -d $exp2add \
162     MITgcm_contrib/verification_other/$exp2add > /dev/null )
163     /usr/bin/find $exp2add -type d | xargs chmod g+rxs
164     /usr/bin/find $exp2add -type f | xargs chmod g+r
165     fi
166     done
167 jmc 1.1 else
168     echo "no dir: $gcmDIR/verification => exit"
169     exit
170     fi
171    
172 jmc 1.8 echo ''
173     echo ./testreport $options -of $OPTFILE \
174 jmc 1.10 -odir ${dNam}-$sfx -send \'$SEND\' -sd $SavD -a jm_c@mitgcm.org
175 jmc 1.8 ./testreport $options -of $OPTFILE \
176 jmc 1.10 -odir ${dNam}-$sfx -send "$SEND" -sd $SavD -a jm_c@mitgcm.org
177 jmc 1.8
178     # echo ''
179     # echo ../tools/do_tst_2+2 -mpi \
180 jmc 1.10 # -o ${dNam}-$sfx -send \'$SEND\' -sd $SavD -a jm_c@mitgcm.org
181 jmc 1.8 # ../tools/do_tst_2+2 -mpi \
182 jmc 1.10 # -o ${dNam}-$sfx -send "$SEND" -sd $SavD -a jm_c@mitgcm.org
183 jmc 1.1

  ViewVC Help
Powered by ViewVC 1.1.22