1 |
#!/bin/bash |
2 |
# |
3 |
#PBS -q short |
4 |
#PBS -N run_tst_ifc |
5 |
#PBS -l nodes=1:ppn=6:sandy |
6 |
#PBS -e /home/jm_c/test_svante/output/run_tst_ifc.stderr |
7 |
#PBS -o /home/jm_c/test_svante/output/run_tst_ifc.stdout |
8 |
##PBS -j oe |
9 |
|
10 |
# $Header: /u/gcmpack/MITgcm_contrib/test_scripts/svante/run_tst_ifc.pbs,v 1.6 2017/01/13 22:41:26 jmc Exp $ |
11 |
|
12 |
if test -f /etc/profile.d/modules.sh ; then |
13 |
. /etc/profile.d/modules.sh |
14 |
fi |
15 |
# Note: added "limit stacksize unlimited" in file "~/.tcshrc" |
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 |
headNode='svante' |
23 |
|
24 |
dNam='svante' |
25 |
HERE="$HOME/test_${dNam}" |
26 |
OUTP="$HERE/output"; SavD="$HERE/send" |
27 |
SEND="ssh $headNode $SavD/mpack" |
28 |
TST_DISK="/net/fs09/d0/jm_c" |
29 |
TST_DIR="$TST_DISK/test_${dNam}" |
30 |
|
31 |
cd $TST_DISK ; pwd |
32 |
if test -d $TST_DIR ; then |
33 |
echo "start from TST_DIR='$TST_DIR' at: "`date` |
34 |
else |
35 |
echo "ERROR: missing directory \"$TST_DIR\"" |
36 |
exit 1 |
37 |
fi |
38 |
|
39 |
sfx='ifc' |
40 |
|
41 |
module add intel |
42 |
module add mvapich2 |
43 |
OPTFILE="../tools/build_options/linux_amd64_ifort11" |
44 |
options="-MPI 6" |
45 |
#options="$options -t hs94.cs-32x32x5" |
46 |
#EXE="mpirun -v -all-local -np TR_NPROC ./mitgcmuv" |
47 |
|
48 |
#dInWeek=`date +%a` |
49 |
#if test "x$dInWeek" = xSun ; then options="$options -fast" |
50 |
# #else options="$options -devel" ; fi |
51 |
#fi |
52 |
|
53 |
#- need this to get "staf": |
54 |
#export PATH="$PATH:$HOME/bin" |
55 |
|
56 |
gcmDIR="MITgcm_$sfx" |
57 |
cd $TST_DIR |
58 |
|
59 |
#- change dir to $gcmDIR/verification dir: |
60 |
if test -e $gcmDIR/verification ; then |
61 |
echo " dir $gcmDIR/verification exist" |
62 |
cd $gcmDIR/verification |
63 |
else |
64 |
echo "no dir: $gcmDIR/verification => exit" |
65 |
exit |
66 |
fi |
67 |
|
68 |
#- get option -devel/-fast from head-node testreport output: |
69 |
options="$options -ro" |
70 |
prevName=`grep '^on :' tr_out.txt | awk '{print $4}'` |
71 |
if test "x$prevName" = "x$headNode" ; then |
72 |
dev_Opt=`grep '^run:' tr_out.txt | grep -c ' -devel'` |
73 |
fastOpt=`grep '^run:' tr_out.txt | grep -c ' -fast'` |
74 |
if test $dev_Opt = 1 -a $fastOpt = 0 ; then |
75 |
options="$options -devel" |
76 |
fi |
77 |
if test $dev_Opt = 0 -a $fastOpt = 1 ; then |
78 |
options="$options -fast" |
79 |
fi |
80 |
else |
81 |
echo " missing previous testreport output "tr_out.txt" from $headNode" |
82 |
echo ' skip addition of -devel/-fast to $options' |
83 |
fi |
84 |
|
85 |
echo ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx \ |
86 |
-send \"$SEND\" -sd $SavD -a jmc@mitgcm.org |
87 |
./testreport $options -of $OPTFILE -odir ${dNam}-$sfx \ |
88 |
-send "$SEND" -sd $SavD -a jmc@mitgcm.org |
89 |
|
90 |
|
91 |
echo '' |
92 |
#echo ../tools/do_tst_2+2 -mpi -exe \"$EXE\" -o ${dNam}-$sfx \ |
93 |
#../tools/do_tst_2+2 -mpi -exe "$EXE" -o ${dNam}-$sfx \ |
94 |
echo ../tools/do_tst_2+2 -mpi -o ${dNam}-$sfx \ |
95 |
-send \"$SEND\" -sd $SavD -a jmc@mitgcm.org |
96 |
../tools/do_tst_2+2 -mpi -o ${dNam}-$sfx \ |
97 |
-send "$SEND" -sd $SavD -a jmc@mitgcm.org |
98 |
|
99 |
exit |