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

Contents of /MITgcm/tools/example_scripts/ACESgrid/test_aces_ifc_mpi

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


Revision 1.13 - (show annotations) (download)
Wed May 17 17:58:56 2017 UTC (7 years ago) by jmc
Branch: MAIN
CVS Tags: HEAD
Changes since 1.12: +1 -1 lines
FILE REMOVED
remove testing scripts for aces-grid (login) & old geo cluster (both retired)

1 #!/bin/bash
2 #
3 #PBS -q one
4 #PBS -N tst_ifc
5 #PBS -l nodes=1:ppn=6
6 #PBS -e /mit/jm_c/test_acesgrid/output/tst_ifc.stderr
7 #PBS -o /mit/jm_c/test_acesgrid/output/tst_ifc.stdout
8
9 # $Header: /u/gcmpack/MITgcm/tools/example_scripts/ACESgrid/test_aces_ifc_mpi,v 1.12 2015/02/25 14:52:47 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 umask 0022
19 #- to get case insensitive "ls" (and order of tested experiments)
20 export LC_ALL="en_US.UTF-8"
21 echo " running on: "`hostname`
22
23 dNam='acesgrid'
24 HERE="$HOME/test_$dNam"
25 OUTP="$HERE/output"; SavD="$HERE/send"
26 SEND="ssh login $SavD/mpack"
27 TST_DIR="/scratch/jm_c/test_$dNam"
28
29 if test -d $TST_DIR ; then
30 echo "start from TST_DIR='$TST_DIR' at: "`date`
31 else
32 if test ! -d /scratch/jm_c ; then mkdir /scratch/jm_c ; fi
33 if test ! -d $TST_DIR ; then mkdir $TST_DIR ; fi
34 if test ! -d $TST_DIR ; then
35 echo "ERROR: Can't create directory \"$TST_DIR\""
36 exit 1
37 fi
38 echo "start in new dir TST_DIR='$TST_DIR' at: "`date`
39 fi
40
41 sfx='ifc'
42 addExp='global_ocean.gm_k3d global_ocean.gm_res'
43 export MODULEPATH="/mit/jahn/usr/modulefiles:${MODULEPATH}"
44 module add intel/2013.0.079
45 OPTFILE="../tools/build_options/linux_amd64_ifort11"
46 options="-j 2 -MPI 6"
47 #- need this to get "staf":
48 export PATH="$PATH:$HOME/bin"
49
50 dInWeek=`date +%a`
51 #if test "x$dInWeek" = xSun ; then options="$options -fast" ; fi
52
53 checkOut=2
54 #options="$options -nc" ; checkOut=1
55 #options="$options -q" ; checkOut=0
56
57 #- keep a copy of MPI_MFILE:
58 cp -p $PBS_NODEFILE $OUTP"/mf_"$sfx
59
60 cvsArg="-d :pserver:cvsanon@mitgcm.org:/u/gcmpack"
61 gcmDIR="MITgcm_$sfx"
62 cd $TST_DIR
63 #- check for disk space: relative space (99%) or absolute (10.G):
64 dsp=`df -P . | tail -1 | awk '{print $5}' | sed 's/%$//'`
65 if [ $dsp -gt 99 ] ; then
66 #dsp=`df -P . | tail -1 | awk '{print $4}'`
67 #if [ $dsp -le 100000000 ] ; then
68 echo 'Not enough space on this disk => do not run testreport.'
69 df .
70 exit
71 fi
72 if [ $checkOut -eq 1 ] ; then
73 if test -d $gcmDIR/CVS ; then
74 #- remove previous output tar files and tar & remove previous output-dir
75 /bin/rm -f $gcmDIR/verification/??_${dNam}-${sfx}_????????_?.tar.gz
76 ( cd $gcmDIR/verification
77 listD=`ls -1 -d ??_${dNam}-${sfx}_????????_? 2> /dev/null`
78 for dd in $listD
79 do
80 if test -d $dd ; then
81 tar -cf ${dd}".tar" $dd > /dev/null 2>&1 && gzip ${dd}".tar" && /bin/rm -rf $dd
82 RETVAL=$?
83 if test "x$RETVAL" != x0 ; then
84 echo "ERROR in tar+gzip prev outp-dir: $dd"
85 echo " on '"`hostname`"' (return val=$RETVAL) but continue"
86 fi
87 fi
88 done )
89 ( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean )
90 echo ' remove all Makefile_syntax and do "cvs update -P -d"'
91 ( cd $gcmDIR/verification ; rm -f */build/Makefile_syntax )
92 # echo "cvs update of dir $gcmDIR :"
93 ( cd $gcmDIR ; cvs -q $cvsArg update -P -d )
94 RETVAL=$?
95 if test "x$RETVAL" != x0 ; then
96 echo "cvs update on '"`hostname`"' fail (return val=$RETVAL) => exit"
97 exit
98 fi
99 else
100 echo "no dir: $gcmDIR/CVS => try a fresh check-out"
101 checkOut=2
102 fi
103 fi
104 if [ $checkOut -eq 2 ] ; then
105 if test -e $gcmDIR ; then
106 rm -rf $gcmDIR
107 fi
108 # cvs co MITgcm
109 cvs $cvsArg co -P -d $gcmDIR MITgcm > /dev/null
110 RETVAL=$?
111 if test "x$RETVAL" != x0 ; then
112 echo "cvs co on '"`hostname`"' fail (return val=$RETVAL) => exit"
113 exit
114 fi
115 if test -d $gcmDIR/verification ; then
116 for exp2add in $addExp ; do
117 echo " add dir: $exp2add (from Contrib:verification_other)"
118 ( cd $gcmDIR/verification ; cvs $cvsArg co -P -d $exp2add \
119 MITgcm_contrib/verification_other/$exp2add > /dev/null )
120 done
121 /usr/bin/find $gcmDIR -type d | xargs chmod g+rxs
122 /usr/bin/find $gcmDIR -type f | xargs chmod g+r
123 fi
124 fi
125
126 #- change dir to $gcmDIR/verification dir:
127 if test -e $gcmDIR/verification ; then
128 if [ $checkOut -lt 2 ] ; then
129 echo " dir $gcmDIR/verification exist" ; fi
130 cd $gcmDIR/verification
131 else
132 echo "no dir: $gcmDIR/verification => exit"
133 exit
134 fi
135
136 if test "x$dInWeek" = xSun ; then
137 options="$options -fast"
138
139 echo ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx \
140 -send \"$SEND\" -sd $SavD -a jmc@mitgcm.org
141 ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx \
142 -send "$SEND" -sd $SavD -a jmc@mitgcm.org
143
144 echo ''
145 echo ../tools/do_tst_2+2 -mpi -o ${dNam}-$sfx \
146 -send \"$SEND\" -sd $SavD -a jmc@mitgcm.org
147 ../tools/do_tst_2+2 -mpi -o ${dNam}-$sfx \
148 -send "$SEND" -sd $SavD -a jmc@mitgcm.org
149
150 else
151 options="$options -devel"
152
153 echo ./testreport $options -of $OPTFILE \
154 -repl_mk do_make_syntax.sh -obj -dd
155 ./testreport $options -of $OPTFILE \
156 -repl_mk do_make_syntax.sh -obj -dd 2>&1
157
158 echo ''
159 echo ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx \
160 -q -send \"$SEND\" -sd $SavD -a jmc@mitgcm.org
161 ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx \
162 -q -send "$SEND" -sd $SavD -a jmc@mitgcm.org
163
164 echo ''
165 echo ../tools/do_tst_2+2 -mpi -o ${dNam}-$sfx \
166 -send \"$SEND\" -sd $SavD -a jmc@mitgcm.org
167 ../tools/do_tst_2+2 -mpi -o ${dNam}-$sfx \
168 -send "$SEND" -sd $SavD -a jmc@mitgcm.org
169
170 fi

  ViewVC Help
Powered by ViewVC 1.1.22