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

Annotation 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.24 - (hide annotations) (download)
Fri Jan 25 23:26:00 2013 UTC (11 years, 4 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64e, checkpoint64d
Changes since 1.23: +2 -2 lines
minor improvement

1 jmc 1.1 #!/bin/bash
2     #
3 jmc 1.4 #PBS -q four-twelve
4 jmc 1.1 #PBS -N tst_mth
5     #PBS -l nodes=1:ppn=2
6 jmc 1.19 #PBS -e /home/jmc/test_aces/output/tst_mth.stderr
7     #PBS -o /home/jmc/test_aces/output/tst_mth.stdout
8 jmc 1.22
9 jmc 1.24 # $Header: /u/gcmpack/MITgcm/tools/example_scripts/ACESgrid/aces_test_ifc_mth,v 1.23 2012/08/17 17:15:30 jmc Exp $
10 jmc 1.1 # $Name: $
11    
12 jmc 1.10 if test -f /etc/profile.d/modules.sh ; then
13     . /etc/profile.d/modules.sh
14     fi
15 jmc 1.18 # 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 jmc 1.10
22 jmc 1.5 umask 0022
23 jmc 1.10 #- to get case insensitive "ls" (and order of tested experiments)
24     export LC_ALL="en_US.UTF-8"
25    
26 jmc 1.12 HERE=$TST_DIR/output
27 jmc 1.5 sfx='mth'
28 jmc 1.16 module add ifc/9.0.021 icc/9.0.021 intel/9.0
29 jmc 1.17 module add netcdf/3.6.1/icc
30     OPTFILE="../tools/build_options/linux_ia32_ifort"
31     options='-j 2 -mth -devel'
32 jmc 1.16 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 jmc 1.1
38 jmc 1.23 checkOut=1 ; #options="$options -do"
39 jmc 1.6 #options="$options -nc" ; checkOut=0
40     #options="$options -q" ; checkOut=0
41    
42 jmc 1.5 gcmDIR="MITgcm_$sfx"
43     cd $TST_DIR
44 jmc 1.7 #- check for disk space:
45 jmc 1.18 #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 jmc 1.19 if [ $dsp -le 1000000 ] ; then
49 jmc 1.7 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 jmc 1.22 #- 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 jmc 1.24 listD=`ls -1 -d ??_${dNam}-${sfx}_????????_? 2> /dev/null`
59 jmc 1.22 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 jmc 1.20 ( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean )
71 jmc 1.7 echo "cvs update of dir $gcmDIR :"
72 jmc 1.13 ( cd $gcmDIR ; cvs -q -d :pserver:cvsanon@mitgcm.org:/u/gcmpack update -P -d ) 2>&1
73 jmc 1.15 RETVAL=$?
74     if test "x$RETVAL" != x0 ; then
75 jmc 1.16 echo "cvs update on '"`hostname`"' fail (return val=$RETVAL) => exit"
76 jmc 1.15 exit
77     fi
78 jmc 1.7 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 jmc 1.6 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 jmc 1.15 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 jmc 1.6 else
99 jmc 1.16 echo "no dir: $gcmDIR/verification => exit"
100 jmc 1.15 exit
101 jmc 1.1 fi
102    
103 jmc 1.18 echo ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx
104     ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx
105 jmc 1.1
106 jmc 1.20 echo ''
107     echo ../tools/do_tst_2+2 -o ${dNam}-$sfx -a NONE
108     ../tools/do_tst_2+2 -o ${dNam}-$sfx -a NONE
109    

  ViewVC Help
Powered by ViewVC 1.1.22