1 |
jmc |
1.1 |
#! /usr/bin/env bash |
2 |
|
|
|
3 |
|
|
# $Header: /u/gcmpack/MITgcm/tools/example_scripts/faulks/test_csail_fc5,v 1.5 2007/11/30 17:05:50 jmc Exp $ |
4 |
|
|
|
5 |
|
|
# Ed Hill |
6 |
|
|
|
7 |
|
|
# Test script for MITgcm that should work on most of the csail.mit.edu |
8 |
|
|
# Linux machines. |
9 |
|
|
|
10 |
|
|
|
11 |
|
|
# defaults |
12 |
|
|
export PATH='/usr/local/bin:/bin:/usr/bin' |
13 |
|
|
OPTFILE= |
14 |
|
|
TESTDIR="/scratch2/jmc/test_"`hostname` |
15 |
|
|
# IEEE="-ieee" <- this is the default |
16 |
|
|
MC=10 |
17 |
|
|
|
18 |
|
|
|
19 |
|
|
# Turn off stack limit for FIZHI |
20 |
|
|
#ulimit -s unlimited <- this is the default |
21 |
|
|
|
22 |
|
|
echo -n "Creating a temp directory ..." |
23 |
|
|
mach=`hostname` |
24 |
|
|
tdir=$TESTDIR |
25 |
|
|
if test -e $tdir |
26 |
|
|
then test -e $tdir/MITgcm && rm -rf $tdir/MITgcm |
27 |
|
|
else mkdir $tdir |
28 |
|
|
fi |
29 |
|
|
echo " done" |
30 |
|
|
|
31 |
|
|
#- clean-up old output files |
32 |
|
|
rm -f $tdir/output_* |
33 |
|
|
|
34 |
|
|
echo -n "Downloading the MITgcm code from CVS pserver..." |
35 |
|
|
cd $tdir |
36 |
|
|
#export CVSROOT='/u/gcmpack' |
37 |
|
|
#cvs co -P MITgcm > /dev/null 2>&1 |
38 |
|
|
cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co -P MITgcm > /dev/null |
39 |
|
|
echo " done" |
40 |
|
|
cd MITgcm/verification |
41 |
|
|
|
42 |
|
|
echo "Running testreport using:" |
43 |
|
|
# comm="./testreport -adm -a jmc@mitgcm.org" |
44 |
|
|
comm="./testreport -adm -of ../tools/build_options/linux_ia32_gfortran -a jmc@mitgcm.org" |
45 |
|
|
echo " \"$comm\"" |
46 |
|
|
echo "======================" |
47 |
|
|
echo |
48 |
|
|
$comm > $tdir/output_adm 2>&1 |
49 |
|
|
tail -100 $tdir/output_adm |
50 |
|
|
|
51 |
|
|
|
52 |
|
|
echo |
53 |
|
|
echo "======================" |
54 |
|
|
echo "Cleaning test directories:" |
55 |
|
|
./testreport -clean > /dev/null 2>&1 |
56 |
|
|
echo "======================" |
57 |
|
|
echo |
58 |
|
|
|
59 |
|
|
echo "Running testreport using:" |
60 |
|
|
comm="./testreport -of ../tools/build_options/linux_ia32_g77 -a jmc@mitgcm.org" |
61 |
|
|
echo " \"$comm\"" |
62 |
|
|
echo "======================" |
63 |
|
|
echo |
64 |
|
|
$comm > $tdir/output_g77 2>&1 |
65 |
|
|
tail -100 $tdir/output_g77 |
66 |
|
|
|
67 |
|
|
echo |
68 |
|
|
echo "======================" |
69 |
|
|
echo "Cleaning test directories:" |
70 |
|
|
./testreport -clean > /dev/null 2>&1 |
71 |
|
|
echo "======================" |
72 |
|
|
echo |
73 |
|
|
|
74 |
|
|
echo "Running testreport using:" |
75 |
|
|
comm="./testreport -match $MC -of ../tools/build_options/linux_ia32_gfortran -a jmc@mitgcm.org" |
76 |
|
|
echo " \"$comm\"" |
77 |
|
|
echo "======================" |
78 |
|
|
echo |
79 |
|
|
$comm > $tdir/output_gfo 2>&1 |
80 |
|
|
tail -100 $tdir/output_gfo |
81 |
|
|
echo |
82 |
|
|
#-- also test restart (test 2+2=4) |
83 |
|
|
echo "testing restart using:" |
84 |
|
|
comm="../tools/do_tst_2+2 -a jmc@mitgcm.org" |
85 |
|
|
echo " \"$comm\"" |
86 |
|
|
echo "======================" |
87 |
|
|
$comm > $tdir/output_2+2 2>&1 |
88 |
|
|
#tail -100 $tdir/output_2+2 |
89 |
|
|
echo ; cat tst_2+2_out.txt |
90 |
|
|
echo |
91 |
|
|
|
92 |
|
|
# echo |
93 |
|
|
# echo "======================" |
94 |
|
|
# echo "Cleaning test directories:" |
95 |
|
|
# ./testreport -clean > /dev/null 2>&1 |
96 |
|
|
# echo "======================" |
97 |
|
|
# echo |
98 |
|
|
|
99 |
|
|
# echo "Running testreport using:" |
100 |
|
|
# comm="./testreport -match $MC -of ../tools/build_options/linux_ia32_ifort+authors_v9 -a jmc@mitgcm.org" |
101 |
|
|
# echo " \"$comm\"" |
102 |
|
|
# echo "======================" |
103 |
|
|
# echo |
104 |
|
|
# $comm > $tdir/output_ifc 2>&1 |
105 |
|
|
# tail -100 $tdir/output_ifc |
106 |
|
|
|
107 |
|
|
# echo |
108 |
|
|
# echo "======================" |
109 |
|
|
# echo "Cleaning test directories:" |
110 |
|
|
# ./testreport -clean > /dev/null 2>&1 |
111 |
|
|
# echo "======================" |
112 |
|
|
# echo |
113 |
|
|
# |
114 |
|
|
# echo "Running testreport using:" |
115 |
|
|
# export OMP_NUM_THREADS=2 |
116 |
|
|
# export KMP_STACKSIZE=400m |
117 |
|
|
# comm="./testreport -mth -match $MC -of ../tools/build_options/linux_ia32_ifort.v9+mth -a jmc@mitgcm.org" |
118 |
|
|
# echo " \"$comm\"" |
119 |
|
|
# echo "======================" |
120 |
|
|
# echo |
121 |
|
|
# $comm > $tdir/output_mth 2>&1 |
122 |
|
|
# tail -100 $tdir/output_mth |
123 |
|
|
|