| 1 |
#! /usr/bin/env bash |
| 2 |
|
| 3 |
# $Header: /u/gcmpack/MITgcm/tools/example_scripts/faulks/test_csail_fc5,v 1.7 2008/09/14 17:14:11 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="/scratch/jmc/test_"`hostname` |
| 15 |
IEEE="-ieee" |
| 16 |
MC=10 |
| 17 |
|
| 18 |
|
| 19 |
# Turn off stack limit for FIZHI |
| 20 |
ulimit -s unlimited |
| 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 |
echo " done" |
| 39 |
cd MITgcm/verification |
| 40 |
|
| 41 |
echo "Running testreport using:" |
| 42 |
comm="./testreport -adm -a jmc@mitgcm.org" |
| 43 |
echo " \"$comm\"" |
| 44 |
echo "======================" |
| 45 |
echo |
| 46 |
$comm > $tdir/output_adm 2>&1 |
| 47 |
tail -100 $tdir/output_adm |
| 48 |
|
| 49 |
|
| 50 |
echo |
| 51 |
echo "======================" |
| 52 |
echo "Cleaning test directories:" |
| 53 |
./testreport -clean > /dev/null 2>&1 |
| 54 |
echo "======================" |
| 55 |
echo |
| 56 |
|
| 57 |
echo "Running testreport using:" |
| 58 |
comm="./testreport -of ../tools/build_options/linux_ia32_g77 -a jmc@mitgcm.org" |
| 59 |
echo " \"$comm\"" |
| 60 |
echo "======================" |
| 61 |
echo |
| 62 |
$comm > $tdir/output_g77 2>&1 |
| 63 |
tail -100 $tdir/output_g77 |
| 64 |
|
| 65 |
echo |
| 66 |
echo "======================" |
| 67 |
echo "Cleaning test directories:" |
| 68 |
./testreport -clean > /dev/null 2>&1 |
| 69 |
echo "======================" |
| 70 |
echo |
| 71 |
|
| 72 |
echo "Running testreport using:" |
| 73 |
export PGI=/usr/local/pkg/pgi/pgi-6.1-5 |
| 74 |
comm="./testreport -match $MC -of ../tools/build_options/linux_ia32_pgf77+authors_fc5 -dd" |
| 75 |
echo " \"$comm\"" |
| 76 |
echo "======================" |
| 77 |
echo |
| 78 |
$comm > $tdir/output_pgi_1 2>&1 |
| 79 |
tail -100 $tdir/output_pgi_1 |
| 80 |
mv -f tr_out.txt tr_out.pgi_1 |
| 81 |
#- run 2 times to increase chances to catch pgi licence |
| 82 |
comm="./testreport -match $MC -of ../tools/build_options/linux_ia32_pgf77+authors_fc5 -a jmc@mitgcm.org -q" |
| 83 |
echo " \"$comm\"" |
| 84 |
echo "======================" |
| 85 |
echo |
| 86 |
$comm > $tdir/output_pgi_2 2>&1 |
| 87 |
tail -100 $tdir/output_pgi_2 |
| 88 |
|
| 89 |
echo |
| 90 |
|
| 91 |
echo |
| 92 |
echo "======================" |
| 93 |
echo "Cleaning test directories:" |
| 94 |
./testreport -clean > /dev/null 2>&1 |
| 95 |
echo "======================" |
| 96 |
echo |
| 97 |
|
| 98 |
echo "Running testreport using:" |
| 99 |
comm="./testreport -match $MC -of ../tools/build_options/linux_ia32_gfortran -a jmc@mitgcm.org" |
| 100 |
echo " \"$comm\"" |
| 101 |
echo "======================" |
| 102 |
echo |
| 103 |
$comm > $tdir/output_gfo 2>&1 |
| 104 |
tail -100 $tdir/output_gfo |
| 105 |
|
| 106 |
echo |
| 107 |
echo "======================" |
| 108 |
echo "Cleaning test directories:" |
| 109 |
./testreport -clean > /dev/null 2>&1 |
| 110 |
echo "======================" |
| 111 |
echo |
| 112 |
|
| 113 |
echo "Running testreport using:" |
| 114 |
comm="./testreport -match $MC -of ../tools/build_options/linux_ia32_ifort+authors_v9 -a jmc@mitgcm.org" |
| 115 |
echo " \"$comm\"" |
| 116 |
echo "======================" |
| 117 |
echo |
| 118 |
$comm > $tdir/output_ifc 2>&1 |
| 119 |
tail -100 $tdir/output_ifc |
| 120 |
|
| 121 |
echo |
| 122 |
echo "======================" |
| 123 |
echo "Cleaning test directories:" |
| 124 |
./testreport -clean > /dev/null 2>&1 |
| 125 |
echo "======================" |
| 126 |
echo |
| 127 |
|
| 128 |
echo "Running testreport using:" |
| 129 |
export OMP_NUM_THREADS=2 |
| 130 |
export KMP_STACKSIZE=400m |
| 131 |
comm="./testreport -mth -match $MC -of ../tools/build_options/linux_ia32_ifort.v9+mth -a jmc@mitgcm.org" |
| 132 |
echo " \"$comm\"" |
| 133 |
echo "======================" |
| 134 |
echo |
| 135 |
$comm > $tdir/output_mth 2>&1 |
| 136 |
tail -100 $tdir/output_mth |
| 137 |
|