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

Contents of /MITgcm/tools/example_scripts/ACESgrid/aces_test_adm_mpi

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


Revision 1.23 - (show annotations) (download)
Tue Aug 20 18:53:11 2013 UTC (10 years, 9 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64o, checkpoint64n
Changes since 1.22: +8 -3 lines
send directly result-email from the batch job using new testreport options

1 #!/bin/bash
2 #
3 #PBS -q four-twelve
4 #PBS -N tst_adm
5 #PBS -l nodes=2:ppn=2
6 #PBS -e /home/jmc/test_aces/output/tst_adm.stderr
7 #PBS -o /home/jmc/test_aces/output/tst_adm.stdout
8
9 # $Header: /u/gcmpack/MITgcm/tools/example_scripts/ACESgrid/aces_test_adm_mpi,v 1.22 2013/08/12 19:29:12 jmc Exp $
10 # $Name: $
11
12 # ACES-grid PBS-batch script for Adjoint MPI test using ifort (default=v8) & mpich
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 dNam='aces'
21 TST_DIR="$HOME/test_$dNam"
22 echo "start from TST_DIR='$TST_DIR' at: "`date`
23
24 umask 0022
25 #- to get case insensitive "ls" (and order of tested experiments)
26 export LC_ALL="en_US.UTF-8"
27
28 HERE=$TST_DIR/output
29 sfx='adm'
30 module add mpich/intel
31 module add netcdf/3.6.1/icc
32 export MPI_INC_DIR='/usr/local/pkg/mpich/mpich-intel/include'
33 OPTFILE="../tools/build_options/linux_ia32_ifort"
34 #OPTFILE="$HERE/linux_ia32_ifort+mpi_aces"
35 options="-adm -MPI 4 -mf $PBS_NODEFILE -devel"
36 EXE="mpirun -machinefile TR_MFILE -v -np TR_NPROC ./mitgcmuv_ad"
37 #- need this to get "staf":
38 export PATH="$PATH:$HOME/bin"
39
40 #- keep a copy of MPI_MFILE:
41 cp -p $PBS_NODEFILE $HERE"/mf_"$sfx
42
43 checkOut=1 ; options="$options -do"
44 #options="$options -nc" ; checkOut=0
45 #options="$options -q" ; checkOut=0
46
47 addExp=0
48 cvsArg="-d :pserver:cvsanon@mitgcm.org:/u/gcmpack"
49 gcmDIR="MITgcm_$sfx"
50 cd $TST_DIR
51 #- check for disk space: relative space (99%) or absolute (1.G):
52 #dsp=`df -P . | tail -1 | awk '{print $5}' | sed 's/%$//'`
53 #if [ $dsp -gt 99 ] ; then
54 dsp=`df -P . | tail -1 | awk '{print $4}'`
55 if [ $dsp -le 1000000 ] ; then
56 echo 'Not enough space on this disk => do not run testreport.'
57 df .
58 exit
59 fi
60 if [ $checkOut -eq 1 ] ; then
61 if test -d $gcmDIR/CVS ; then
62 #- remove previous output tar files and tar & remove previous output-dir
63 /bin/rm -f $gcmDIR/verification/??_${dNam}-${sfx}_????????_?.tar.gz
64 ( cd $gcmDIR/verification
65 listD=`ls -1 -d ??_${dNam}-${sfx}_????????_? 2> /dev/null`
66 for dd in $listD
67 do
68 if test -d $dd ; then
69 tar -cf ${dd}".tar" $dd > /dev/null 2>&1 && gzip ${dd}".tar" && /bin/rm -rf $dd
70 RETVAL=$?
71 if test "x$RETVAL" != x0 ; then
72 echo "ERROR in tar+gzip prev outp-dir: $dd"
73 echo " on '"`hostname`"' (return val=$RETVAL) but continue"
74 fi
75 fi
76 done )
77 # ( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean )
78 #- clean-up previous TAF output temp dir (generated on old system like here)
79 ( cd $gcmDIR/verification ; /bin/rm -rf */build/PaxHeaders.[0-9]* )
80 echo "cvs update of dir $gcmDIR :"
81 ( cd $gcmDIR ; cvs -q $cvsArg update -P -d ) 2>&1
82 RETVAL=$?
83 if test "x$RETVAL" != x0 ; then
84 echo "cvs update on '"`hostname`"' fail (return val=$RETVAL) => exit"
85 exit
86 fi
87 else
88 echo "no dir: $gcmDIR/CVS => try a fresh check-out"
89 checkOut=2
90 fi
91 fi
92 if [ $checkOut -eq 2 ] ; then
93 if test -e $gcmDIR ; then
94 rm -rf $gcmDIR
95 fi
96 # cvs co MITgcm
97 cvs $cvsArg co -P -d $gcmDIR MITgcm > /dev/null 2>&1
98 if [ $addExp -ge 1 ]; then
99 echo " add dir: offline_cheapaml (from Contrib:verification_other)"
100 ( cd $gcmDIR/verification ; cvs $cvsArg co -P -d offline_cheapaml \
101 MITgcm_contrib/verification_other/offline_cheapaml > /dev/null 2>&1 )
102 fi
103 /usr/bin/find $gcmDIR -type d | xargs chmod g+rxs
104 /usr/bin/find $gcmDIR -type f | xargs chmod g+r
105 fi
106
107 #- change dir to $gcmDIR/verification dir:
108 if test -e $gcmDIR/verification ; then
109 if [ $checkOut -lt 2 ] ; then
110 echo " dir $gcmDIR/verification exist" ; fi
111 cd $gcmDIR/verification
112 else
113 echo "no dir: $gcmDIR/verification => exit"
114 exit
115 fi
116
117 SavD="$HOME/test_$dNam/send"
118 SEND="ssh geo $SavD/mpack"
119
120 echo ./testreport $options -of $OPTFILE -command \"$EXE\" -odir ${dNam}-$sfx \
121 -send \"$SEND\" -sd $SavD -a jmc@mitgcm.org
122 ./testreport $options -of $OPTFILE -command "$EXE" -odir ${dNam}-$sfx \
123 -send "$SEND" -sd $SavD -a jmc@mitgcm.org

  ViewVC Help
Powered by ViewVC 1.1.22