1 |
jmc |
1.1 |
#!/bin/bash |
2 |
|
|
# |
3 |
|
|
#PBS -q four-twelve |
4 |
|
|
#PBS -N tst_adm |
5 |
|
|
#PBS -l nodes=2:ppn=2 |
6 |
|
|
#PBS -e /home/jmc/test_ACES/output/tst_adm.stderr |
7 |
|
|
#PBS -o /home/jmc/test_ACES/output/tst_adm.stdout |
8 |
|
|
|
9 |
jmc |
1.2 |
# $Header: /u/gcmpack/MITgcm/tools/example_scripts/ACESgrid/aces_test_adm_mpi,v 1.1 2009/05/30 18:03:02 jmc Exp $ |
10 |
jmc |
1.1 |
# $Name: $ |
11 |
|
|
|
12 |
|
|
umask 0022 |
13 |
|
|
TST_DIR="/home/jmc/test_ACES/gcm_tests" |
14 |
|
|
HERE='/home/jmc/test_ACES/output' |
15 |
|
|
#cd $HERE |
16 |
|
|
|
17 |
|
|
if test -f /etc/profile.d/modules.sh ; then |
18 |
|
|
. /etc/profile.d/modules.sh |
19 |
|
|
fi |
20 |
|
|
# Note: added "ulimit -s unlimited" in file "~/.bashrc" |
21 |
|
|
# to pass big test (the 2 fizhi-cs-* test) with MPI |
22 |
|
|
|
23 |
|
|
sfx='adm' |
24 |
|
|
module add mpich/gnu |
25 |
|
|
OPTFILE="../tools/build_options/linux_ia32_g77+mpi_aces" |
26 |
|
|
options='-adm -mpi' |
27 |
|
|
#- need this to get "staf": |
28 |
jmc |
1.2 |
export PATH="$PATH:$HOME/bin" |
29 |
jmc |
1.1 |
|
30 |
|
|
checkOut=1 |
31 |
|
|
#options="$options -nc" ; checkOut=0 |
32 |
|
|
#options="$options -q" ; checkOut=0 |
33 |
|
|
|
34 |
|
|
MF=$HERE"/mf_"$sfx |
35 |
|
|
cat $PBS_NODEFILE | sort | uniq > $MF |
36 |
|
|
NCPU=`wc -l $MF | awk '{print $1}'` |
37 |
|
|
EXE="mpirun -machinefile $MF -v -np $NCPU ./mitgcmuv_ad" |
38 |
|
|
|
39 |
|
|
# cat << EOF > $HERE"/.cvspass" |
40 |
|
|
# /1 :pserver:cvsanon@mitgcm.org:2401/u/gcmpack Ah<Zy=0= |
41 |
|
|
# EOF |
42 |
|
|
gcmDIR="MITgcm_$sfx" |
43 |
|
|
cd $TST_DIR |
44 |
|
|
#- check for disk space: |
45 |
|
|
dsp=`df . | tail -1 | awk '{print $5}' | sed 's/%$//'` |
46 |
|
|
if [ $dsp -gt 99 ] ; then |
47 |
|
|
echo 'Not enough space on this disk => do not run testreport.' |
48 |
|
|
df . |
49 |
|
|
exit |
50 |
|
|
fi |
51 |
|
|
if [ $checkOut -eq 1 ] ; then |
52 |
|
|
if test -d $gcmDIR/CVS ; then |
53 |
|
|
echo "cvs update of dir $gcmDIR :" |
54 |
|
|
( cd $gcmDIR ; cvs -q -d :pserver:cvsanon@mitgcm.org:/u/gcmpack update -P -d ) |
55 |
|
|
/bin/rm -rf $gcmDIR/verification/tr_aces-${sfx}_????????_? |
56 |
|
|
else |
57 |
|
|
echo "no dir: $gcmDIR/CVS => try a fresh check-out" |
58 |
|
|
checkOut=2 |
59 |
|
|
fi |
60 |
|
|
fi |
61 |
|
|
if [ $checkOut -eq 2 ] ; then |
62 |
|
|
if test -e $gcmDIR ; then |
63 |
|
|
rm -rf $gcmDIR |
64 |
|
|
fi |
65 |
|
|
cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co -P -d $gcmDIR MITgcm > /dev/null 2>&1 |
66 |
|
|
# cvs co MITgcm |
67 |
|
|
/usr/bin/find $gcmDIR -type d | xargs chmod g+rxs |
68 |
|
|
/usr/bin/find $gcmDIR -type f | xargs chmod g+r |
69 |
|
|
else |
70 |
|
|
if test -e $gcmDIR/verification ; then |
71 |
|
|
echo "dir $gcmDIR/verification exist" |
72 |
|
|
else |
73 |
|
|
echo "no dir $gcmDIR/verification => exit" |
74 |
|
|
exit |
75 |
|
|
fi |
76 |
|
|
fi |
77 |
|
|
|
78 |
|
|
cd $gcmDIR/verification |
79 |
|
|
# avoid hanging in fizhi-cs-32x32x40 (due to I/O problems with g77) |
80 |
|
|
echo ./testreport $options -of $OPTFILE -command \"$EXE\" -odir aces-$sfx |
81 |
|
|
./testreport $options -of $OPTFILE -command "$EXE" -odir aces-$sfx |
82 |
|
|
|