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

  ViewVC Help
Powered by ViewVC 1.1.22