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

Contents of /MITgcm/tools/example_scripts/ACESgrid/aces_test_all

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


Revision 1.5 - (show annotations) (download)
Fri Dec 14 19:30:35 2007 UTC (16 years, 5 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint59m, checkpoint59l
Changes since 1.4: +3 -3 lines
add a new 1 processor test on ACES which check for un-initialised variable
 (using open64 compiler)

1 #! /usr/bin/env bash
2
3 # $Header: /u/gcmpack/MITgcm/tools/example_scripts/ACESgrid/aces_test_all,v 1.4 2007/12/06 03:39:18 jmc Exp $
4 # $Name: $
5
6 echo -n '-- Starting: '
7 date
8 if test $# = 0
9 then
10 tst_list='gnu ifc pgi mth tuv'
11 else
12 tst_list=$*
13 fi
14
15 . /etc/profile.d/modules.sh
16 module list > ~/tmp/.module_list 2>&1
17
18 cd /home/jmc/test_ACES
19
20 # QSUB="/usr/local/bin/qsub"
21 # QSTAT="/usr/local/bin/qstat"
22 QSUB=qsub
23 QSTAT=qstat
24 MPACK="MITgcm_tools/mpack-1.6/mpack"
25 TST_DIR="/home/jmc/test_ACES/gcm_tests"
26
27 nbtst=0
28 for i in $tst_list
29 do
30 sfx=`echo ${i}"_mpi" | sed 's/mth_mpi/ifc_mth/' | sed 's/tuv_mpi/op64_tuv/'`
31 if test -f MITgcm_tools/example_scripts/ACESgrid/aces_test_$sfx ; then
32 JOB="tst_"$i
33 job_exist=`$QSTAT -a | grep $USER | grep $JOB | wc -l`
34 if test "x_$job_exist" = x_0 ; then
35 $QSUB MITgcm_tools/example_scripts/ACESgrid/aces_test_$sfx
36 eval M_$i='submitted'
37 nbtst=`expr $nbtst + 1`
38 else
39 echo $JOB
40 $QSTAT -a | grep $USER | grep $JOB
41 echo 'job already exist => skip this test'
42 eval M_$i='skipped'
43 fi
44 else
45 echo 'no file:' aces_test_$sfx 'to submit'
46 eval M_$i='skipped'
47 fi
48 done
49
50 #date_str=`date +%Y%m%d`"_0"
51
52 minutes=0
53 count=$nbtst
54 while test $count != 0 ; do
55
56 sleep 600
57 minutes=$(( $minutes + 10 ))
58
59 for i in $tst_list ; do
60
61 eval comm=\$M_$i
62 if test $comm = 'submitted' ; then
63 JOB="tst_"$i
64 ready_to_send=`$QSTAT -a | grep $USER | grep $JOB | wc -l`
65
66 if test "x_$ready_to_send" = x_0 ; then
67 pat="/tmp/tr_aces-$i"'*'
68 rm -rf $pat
69 run_dir=${TST_DIR}"/tmp_"$i"/MITgcm/verification"
70 tdir=`ls -1 $run_dir | grep -v tr_out | grep '^tr_aces' | head -1`
71 if test ! "x$tdir" = x ; then
72 ( cd $run_dir ; tar -czf "/tmp/tr_aces-"$i".tar.gz" ./$tdir )
73 $MPACK -s MITgcm-test -m 3555000 "/tmp/tr_aces-"$i".tar.gz" jmc@mitgcm.org
74 echo "Email sent for $i"
75 else
76 echo "Output not found so no email sent for $i"
77 fi
78 eval M_$i=done
79 count=`expr $count - 1`
80 chmod 644 output/tst_$i.std*
81 fi
82 fi
83 done
84
85 # "long" queue is 24hrs = 24*60min = 1440min
86 if test $minutes -gt 2160 ; then
87 hrs=$(( $minutes / 60 ));
88 echo "Time expired after $minutes minutes ($hrs hours)"
89 echo ' ' $count '/' $nbtst 'tests not yet finished'
90 exit 1
91 fi
92
93 done
94
95 echo "All $nbtst tests completed successfully."
96 echo -n '-- Finished: '
97 date

  ViewVC Help
Powered by ViewVC 1.1.22