/[MITgcm]/MITgcm/tools/example_scripts/ACESgrid/aces_test_ifc_mth
ViewVC logotype

Contents of /MITgcm/tools/example_scripts/ACESgrid/aces_test_ifc_mth

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


Revision 1.30 - (show annotations) (download)
Thu May 8 18:44:03 2014 UTC (9 years, 11 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint65, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e
Changes since 1.29: +13 -11 lines
adjust previous modifications

1 #!/bin/bash
2 #
3 #PBS -q four-twelve
4 #PBS -N tst_mth
5 #PBS -l nodes=1:ppn=2
6 #PBS -e /home/jmc/test_aces/output/tst_mth.stderr
7 #PBS -o /home/jmc/test_aces/output/tst_mth.stdout
8
9 # $Header: /u/gcmpack/MITgcm/tools/example_scripts/ACESgrid/aces_test_ifc_mth,v 1.29 2014/05/07 16:22:24 jmc Exp $
10 # $Name: $
11
12 # ACES-grid PBS-batch script for Multi-Threaded test using ifort (v9)
13
14 if test -f /etc/profile.d/modules.sh ; then
15 . /etc/profile.d/modules.sh
16 fi
17 # Note: added "ulimit -s unlimited" in file "~/.bashrc"
18 # 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='aces'
26 HERE="$HOME/test_$dNam"
27 OUTP="$HERE/output"; SavD="$HERE/send"
28 SEND="ssh geo $SavD/mpack"
29 TST_DIR=$HERE
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 fi
42
43 sfx='mth'
44 addExp=''
45 module add ifc/9.0.021 icc/9.0.021 intel/9.0
46 module add netcdf/3.6.1/icc
47 OPTFILE="../tools/build_options/linux_ia32_ifort"
48 options='-j 2 -mth -devel'
49 export OMP_NUM_THREADS=2
50 export KMP_STACKSIZE=400m
51
52 checkOut=1 ; #options="$options -do"
53 #options="$options -nc" ; checkOut=0
54 #options="$options -q" ; checkOut=0
55
56 #- keep a copy of MPI_MFILE:
57 cp -p $PBS_NODEFILE $OUTP"/mf_"$sfx
58
59 cvsArg="-d :pserver:cvsanon@mitgcm.org:/u/gcmpack"
60 gcmDIR="MITgcm_$sfx"
61 cd $TST_DIR
62 #- check for disk space: relative space (99%) or absolute (1.G):
63 #dsp=`df -P . | tail -1 | awk '{print $5}' | sed 's/%$//'`
64 #if [ $dsp -gt 99 ] ; then
65 dsp=`df -P . | tail -1 | awk '{print $4}'`
66 if [ $dsp -le 1000000 ] ; then
67 echo 'Not enough space on this disk => do not run testreport.'
68 df .
69 exit
70 fi
71 if [ $checkOut -eq 1 ] ; then
72 if test -d $gcmDIR/CVS ; then
73 #- remove previous output tar files and tar & remove previous output-dir
74 /bin/rm -f $gcmDIR/verification/??_${dNam}-${sfx}_????????_?.tar.gz
75 ( cd $gcmDIR/verification
76 listD=`ls -1 -d ??_${dNam}-${sfx}_????????_? 2> /dev/null`
77 for dd in $listD
78 do
79 if test -d $dd ; then
80 tar -cf ${dd}".tar" $dd > /dev/null 2>&1 && gzip ${dd}".tar" && /bin/rm -rf $dd
81 RETVAL=$?
82 if test "x$RETVAL" != x0 ; then
83 echo "ERROR in tar+gzip prev outp-dir: $dd"
84 echo " on '"`hostname`"' (return val=$RETVAL) but continue"
85 fi
86 fi
87 done )
88 ( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean )
89 #- clean-up previous TAF output temp dir (generated on old system like here)
90 # ( cd $gcmDIR/verification ; /bin/rm -rf */build/PaxHeaders.[0-9]* )
91 echo "cvs update of dir $gcmDIR :"
92 ( cd $gcmDIR ; cvs -q $cvsArg update -P -d ) 2>&1
93 RETVAL=$?
94 if test "x$RETVAL" != x0 ; then
95 echo "cvs update on '"`hostname`"' fail (return val=$RETVAL) => exit"
96 exit
97 fi
98 else
99 echo "no dir: $gcmDIR/CVS => try a fresh check-out"
100 checkOut=2
101 fi
102 fi
103 if [ $checkOut -eq 2 ] ; then
104 if test -e $gcmDIR ; then
105 rm -rf $gcmDIR
106 fi
107 # cvs co MITgcm
108 cvs $cvsArg co -P -d $gcmDIR MITgcm > /dev/null 2>&1
109 for exp2add in $addExp ; do
110 echo " add dir: $exp2add (from Contrib:verification_other)"
111 ( cd $gcmDIR/verification ; cvs $cvsArg co -P -d $exp2add \
112 MITgcm_contrib/verification_other/$exp2add > /dev/null 2>&1 )
113 done
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
118 #- change dir to $gcmDIR/verification dir:
119 if test -e $gcmDIR/verification ; then
120 if [ $checkOut -lt 2 ] ; then
121 echo " dir $gcmDIR/verification exist" ; fi
122 cd $gcmDIR/verification
123 else
124 echo "no dir: $gcmDIR/verification => exit"
125 exit
126 fi
127
128 echo ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx \
129 -send \"$SEND\" -sd $SavD -a jmc@mitgcm.org
130 ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx \
131 -send "$SEND" -sd $SavD -a jmc@mitgcm.org
132
133 echo ''
134 #echo ../tools/do_tst_2+2 -o ${dNam}-$sfx -a NONE
135 #../tools/do_tst_2+2 -o ${dNam}-$sfx -a NONE
136 echo ../tools/do_tst_2+2 -o ${dNam}-$sfx -send \"$SEND\" -sd $SavD -a jmc@mitgcm.org
137 ../tools/do_tst_2+2 -o ${dNam}-$sfx -send "$SEND" -sd $SavD -a jmc@mitgcm.org

  ViewVC Help
Powered by ViewVC 1.1.22