7 |
# Test script for MITgcm that should work on most of the lcs.mit.edu |
# Test script for MITgcm that should work on most of the lcs.mit.edu |
8 |
# Linux machines. |
# Linux machines. |
9 |
|
|
|
usage() |
|
|
{ |
|
|
cat << EOF |
|
|
|
|
|
Usage: $0 [OPTIONS] |
|
|
|
|
|
where possible OPTIONS are: |
|
|
(-help|-h) print usage |
|
|
(-dir | -d) TDIR specify testing directory |
|
|
(def="$TDIR") |
|
|
(-of | -optfile) FILE specify an OPTFILE |
|
|
(def="$OPTFILE") |
|
|
(-[no]ieee) IEEE math flag |
|
|
(def="$IEEE") |
|
|
|
|
|
EOF |
|
|
exit 1 |
|
|
} |
|
|
|
|
10 |
|
|
11 |
# defaults |
# defaults |
12 |
export PATH='/usr/local/bin:/bin:/usr/bin' |
export PATH='/usr/local/bin:/bin:/usr/bin' |
14 |
TESTDIR="/scratch/edhill/test_"`hostname` |
TESTDIR="/scratch/edhill/test_"`hostname` |
15 |
IEEE="-ieee" |
IEEE="-ieee" |
16 |
|
|
|
# Parse options |
|
|
ac_prev= |
|
|
for ac_option ; do |
|
|
|
|
|
# If the previous option needs an argument, assign it. |
|
|
if test -n "$ac_prev"; then |
|
|
eval "$ac_prev=\$ac_option" |
|
|
ac_prev= |
|
|
continue |
|
|
fi |
|
|
|
|
|
ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` |
|
|
|
|
|
case $ac_option in |
|
|
|
|
|
-help | --help | -h | --h) |
|
|
usage ;; |
|
|
|
|
|
-dir | --dir | -d | --d) |
|
|
ac_prev=TESTDIR ;; |
|
|
-dir=* | --dir=* | -d=* | --d=*) |
|
|
TESTDIR=$ac_optarg ;; |
|
|
|
|
|
-of | --of | -optfile | --optfile) |
|
|
ac_prev=OPTFILE ;; |
|
|
--of=* | -of=* | --optfile=* | -optfile=*) |
|
|
OPTFILE=$ac_optarg ;; |
|
|
|
|
|
-ieee) |
|
|
IEEE="-ieee" ;; |
|
|
-noieee) |
|
|
IEEE= ;; |
|
|
|
|
|
*) |
|
|
echo "Error: don't understand argument \"$ac_option\"" |
|
|
usage |
|
|
;; |
|
|
|
|
|
esac |
|
|
|
|
|
done |
|
17 |
|
|
18 |
# Turn off stack limit for FIZHI |
# Turn off stack limit for FIZHI |
19 |
ulimit -s unlimited |
ulimit -s unlimited |
20 |
|
|
21 |
echo -n "Creating a temp directory ..." |
echo -n "Creating a temp directory ..." |
22 |
mach=`hostname` |
mach=`hostname` |
23 |
file=${OPTFILE##*/} |
tdir=$TESTDIR |
|
tdir=$TESTDIR"_"$file |
|
24 |
test -e $tdir && rm -rf $tdir |
test -e $tdir && rm -rf $tdir |
25 |
mkdir $tdir |
mkdir $tdir |
26 |
echo " done" |
echo " done" |
30 |
export CVSROOT='/u/gcmpack' |
export CVSROOT='/u/gcmpack' |
31 |
cvs co MITgcm > /dev/null 2>&1 |
cvs co MITgcm > /dev/null 2>&1 |
32 |
echo " done" |
echo " done" |
33 |
|
cd MITgcm/verification |
34 |
|
|
35 |
|
|
36 |
echo "Running testreport using:" |
echo "Running testreport using:" |
37 |
cd MITgcm/verification |
comm="./testreport $IEEE -of ../tools/build_options/linux_ia32_g77 -a edhill@mitgcm.org" |
38 |
comm="./testreport $IEEE -a edhill@mitgcm.org" |
echo " \"$comm\"" |
39 |
if test "x$OPTFILE" != x ; then |
echo "======================" |
40 |
comm="$comm -of=$OPTFILE" |
echo |
41 |
fi |
$comm | tail -100 |
42 |
|
|
43 |
|
echo |
44 |
|
echo "======================" |
45 |
|
echo "Cleaning test directories:" |
46 |
|
./testreport -clean > /dev/null 2>&1 |
47 |
|
echo "======================" |
48 |
|
echo |
49 |
|
|
50 |
|
echo "Running testreport using:" |
51 |
|
comm="./testreport $IEEE -of ../tools/build_options/linux_ia32_gfortran -a edhill@mitgcm.org" |
52 |
echo " \"$comm\"" |
echo " \"$comm\"" |
53 |
echo "======================" |
echo "======================" |
54 |
echo |
echo |
62 |
echo |
echo |
63 |
|
|
64 |
echo "Running testreport using:" |
echo "Running testreport using:" |
|
cd MITgcm/verification |
|
65 |
comm="./testreport $IEEE -of ../tools/build_options/linux_ia32_ifort+authors_v9 -a edhill@mitgcm.org" |
comm="./testreport $IEEE -of ../tools/build_options/linux_ia32_ifort+authors_v9 -a edhill@mitgcm.org" |
66 |
echo " \"$comm\"" |
echo " \"$comm\"" |
67 |
echo "======================" |
echo "======================" |
77 |
|
|
78 |
echo "Running testreport using:" |
echo "Running testreport using:" |
79 |
export PGI=/usr/local/pkg/pgi/pgi-6.1-5 |
export PGI=/usr/local/pkg/pgi/pgi-6.1-5 |
|
cd MITgcm/verification |
|
80 |
comm="./testreport $IEEE -of ../tools/build_options/linux_ia32_pgf77+authors_fc5 -a edhill@mitgcm.org" |
comm="./testreport $IEEE -of ../tools/build_options/linux_ia32_pgf77+authors_fc5 -a edhill@mitgcm.org" |
81 |
echo " \"$comm\"" |
echo " \"$comm\"" |
82 |
echo "======================" |
echo "======================" |
91 |
echo |
echo |
92 |
|
|
93 |
echo "Running testreport using:" |
echo "Running testreport using:" |
94 |
comm="./testreport -adm $IEEE -a edhill@mitgcm.org" |
comm="./testreport -adm $IEEE -of ../tools/build_options/linux_ia32_g77 -a edhill@mitgcm.org" |
95 |
if test "x$OPTFILE" != x ; then |
echo " \"$comm\"" |
96 |
comm="$comm -of=$OPTFILE" |
echo "======================" |
97 |
fi |
echo |
98 |
|
$comm | tail -100 |
99 |
|
|
100 |
|
echo |
101 |
|
echo "======================" |
102 |
|
echo "Cleaning test directories:" |
103 |
|
./testreport -clean > /dev/null 2>&1 |
104 |
|
echo "======================" |
105 |
|
echo |
106 |
|
|
107 |
|
echo "Running testreport using:" |
108 |
|
export OMP_NUM_THREADS=2 |
109 |
|
comm="./testreport -mth -of ../tools/build_options/linux_ia32_ifort.v9+mth" |
110 |
echo " \"$comm\"" |
echo " \"$comm\"" |
111 |
echo "======================" |
echo "======================" |
112 |
echo |
echo |