/[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.1 - (hide annotations) (download)
Mon Oct 19 18:23:42 2015 UTC (9 years, 9 months ago) by jmc
Branch: MAIN
scripts to run (TAF) AD & TLM testreport on engaging cluster

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

  ViewVC Help
Powered by ViewVC 1.1.22