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

Contents of /MITgcm/tools/example_scripts/ACESgrid/aces_test_gnu_mpi

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


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

  ViewVC Help
Powered by ViewVC 1.1.22