/[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.25 - (show annotations) (download)
Tue Mar 5 16:47:21 2013 UTC (11 years, 2 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64h, checkpoint64g, checkpoint64f
Changes since 1.24: +2 -2 lines
adjust test for enough disk-space

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.24 2013/01/25 23:26:00 jmc Exp $
10 # $Name: $
11
12 if test -f /etc/profile.d/modules.sh ; then
13 . /etc/profile.d/modules.sh
14 fi
15 # Note: added "ulimit -s unlimited" in file "~/.bashrc"
16 # to pass big test (the 2 fizhi-cs-* test & adjoint tests) with MPI
17
18 dNam='aces'
19 TST_DIR="$HOME/test_$dNam"
20 echo "start from TST_DIR='$TST_DIR' at: "`date`
21
22 umask 0022
23 #- to get case insensitive "ls" (and order of tested experiments)
24 export LC_ALL="en_US.UTF-8"
25
26 HERE=$TST_DIR/output
27 sfx='mth'
28 module add ifc/9.0.021 icc/9.0.021 intel/9.0
29 module add netcdf/3.6.1/icc
30 OPTFILE="../tools/build_options/linux_ia32_ifort"
31 options='-j 2 -mth -devel'
32 export OMP_NUM_THREADS=2
33 export KMP_STACKSIZE=400m
34
35 #- keep a copy of MPI_MFILE:
36 cp -p $PBS_NODEFILE $HERE"/mf_"$sfx
37
38 checkOut=1 ; #options="$options -do"
39 #options="$options -nc" ; checkOut=0
40 #options="$options -q" ; checkOut=0
41
42 gcmDIR="MITgcm_$sfx"
43 cd $TST_DIR
44 #- check for disk space: relative space (99%) or absolute (1.G):
45 #dsp=`df -P . | tail -1 | awk '{print $5}' | sed 's/%$//'`
46 #if [ $dsp -gt 99 ] ; then
47 dsp=`df -P . | tail -1 | awk '{print $4}'`
48 if [ $dsp -le 1000000 ] ; then
49 echo 'Not enough space on this disk => do not run testreport.'
50 df .
51 exit
52 fi
53 if [ $checkOut -eq 1 ] ; then
54 if test -d $gcmDIR/CVS ; then
55 #- remove previous output tar files and tar & remove previous output-dir
56 /bin/rm -f $gcmDIR/verification/??_${dNam}-${sfx}_????????_?.tar.gz
57 ( cd $gcmDIR/verification
58 listD=`ls -1 -d ??_${dNam}-${sfx}_????????_? 2> /dev/null`
59 for dd in $listD
60 do
61 if test -d $dd ; then
62 tar -cf ${dd}".tar" $dd > /dev/null 2>&1 && gzip ${dd}".tar" && /bin/rm -rf $dd
63 RETVAL=$?
64 if test "x$RETVAL" != x0 ; then
65 echo "ERROR in tar+gzip prev outp-dir: $dd"
66 echo " on '"`hostname`"' (return val=$RETVAL) but continue"
67 fi
68 fi
69 done )
70 ( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean )
71 echo "cvs update of dir $gcmDIR :"
72 ( cd $gcmDIR ; cvs -q -d :pserver:cvsanon@mitgcm.org:/u/gcmpack update -P -d ) 2>&1
73 RETVAL=$?
74 if test "x$RETVAL" != x0 ; then
75 echo "cvs update on '"`hostname`"' fail (return val=$RETVAL) => exit"
76 exit
77 fi
78 else
79 echo "no dir: $gcmDIR/CVS => try a fresh check-out"
80 checkOut=2
81 fi
82 fi
83 if [ $checkOut -eq 2 ] ; then
84 if test -e $gcmDIR ; then
85 rm -rf $gcmDIR
86 fi
87 cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co -P -d $gcmDIR MITgcm > /dev/null 2>&1
88 # cvs co MITgcm
89 /usr/bin/find $gcmDIR -type d | xargs chmod g+rxs
90 /usr/bin/find $gcmDIR -type f | xargs chmod g+r
91 fi
92
93 #- change dir to $gcmDIR/verification dir:
94 if test -e $gcmDIR/verification ; then
95 if [ $checkOut -lt 2 ] ; then
96 echo " dir $gcmDIR/verification exist" ; fi
97 cd $gcmDIR/verification
98 else
99 echo "no dir: $gcmDIR/verification => exit"
100 exit
101 fi
102
103 echo ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx
104 ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx
105
106 echo ''
107 echo ../tools/do_tst_2+2 -o ${dNam}-$sfx -a NONE
108 ../tools/do_tst_2+2 -o ${dNam}-$sfx -a NONE

  ViewVC Help
Powered by ViewVC 1.1.22