1 |
#!/bin/bash |
2 |
# |
3 |
#PBS -q four-twelve |
4 |
#PBS -N tst_gnu |
5 |
#PBS -l nodes=2:ppn=2 |
6 |
#PBS -e /home/jmc/test_ACES/output/tst_gnu.stderr |
7 |
#PBS -o /home/jmc/test_ACES/output/tst_gnu.stdout |
8 |
|
9 |
# $Header: /u/gcmpack/MITgcm/tools/example_scripts/ACESgrid/aces_test_gnu_mpi,v 1.14 2010/12/14 21:34:45 jmc Exp $ |
10 |
# $Name: $ |
11 |
|
12 |
if test -f /etc/profile.d/modules.sh ; then |
13 |
. /etc/profile.d/modules.sh |
14 |
fi |
15 |
# Note: added "ulimit -s unlimited" in file "~/.bashrc" |
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 |
|
22 |
TST_DIR="/home/jmc/test_ACES" |
23 |
HERE=$TST_DIR/output |
24 |
#cd $HERE |
25 |
|
26 |
sfx='gnu' |
27 |
module add mpich/$sfx |
28 |
OPTFILE="../tools/build_options/linux_ia32_g77+mpi_aces" |
29 |
options="-j 2 -MPI 4 -mf $PBS_NODEFILE" |
30 |
EXE="mpirun -machinefile TR_MFILE -v -np TR_NPROC ./mitgcmuv" |
31 |
|
32 |
#- keep a copy of MPI_MFILE: |
33 |
cp -p $PBS_NODEFILE $HERE"/mf_"$sfx |
34 |
|
35 |
checkOut=1 |
36 |
#options="$options -nc" ; checkOut=0 |
37 |
#options="$options -q" ; checkOut=0 |
38 |
|
39 |
gcmDIR="MITgcm_$sfx" |
40 |
cd $TST_DIR |
41 |
#- check for disk space: |
42 |
dsp=`df -P . | tail -1 | awk '{print $5}' | sed 's/%$//'` |
43 |
if [ $dsp -gt 99 ] ; then |
44 |
echo 'Not enough space on this disk => do not run testreport.' |
45 |
df . |
46 |
exit |
47 |
fi |
48 |
if [ $checkOut -eq 1 ] ; then |
49 |
if test -d $gcmDIR/CVS ; then |
50 |
/bin/rm -rf $gcmDIR/verification/??_aces-${sfx}_????????_? |
51 |
# ( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean ) |
52 |
echo "cvs update of dir $gcmDIR :" |
53 |
( cd $gcmDIR ; cvs -q -d :pserver:cvsanon@mitgcm.org:/u/gcmpack update -P -d ) 2>&1 |
54 |
else |
55 |
echo "no dir: $gcmDIR/CVS => try a fresh check-out" |
56 |
checkOut=2 |
57 |
fi |
58 |
fi |
59 |
if [ $checkOut -eq 2 ] ; then |
60 |
if test -e $gcmDIR ; then |
61 |
rm -rf $gcmDIR |
62 |
fi |
63 |
# cvs co MITgcm |
64 |
cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co -P -d $gcmDIR MITgcm > /dev/null 2>&1 |
65 |
/usr/bin/find $gcmDIR -type d | xargs chmod g+rxs |
66 |
/usr/bin/find $gcmDIR -type f | xargs chmod g+r |
67 |
else |
68 |
if test -e $gcmDIR/verification ; then |
69 |
echo "dir $gcmDIR/verification exist" |
70 |
else |
71 |
echo "no dir $gcmDIR/verification => exit" |
72 |
exit |
73 |
fi |
74 |
fi |
75 |
|
76 |
cd $gcmDIR/verification |
77 |
# avoid hanging in fizhi-cs-32x32x40 (due to I/O problems with g77) |
78 |
echo ./testreport $options -of $OPTFILE -command \"$EXE\" -odir aces-$sfx \ |
79 |
-skd fizhi-cs-32x32x40 |
80 |
./testreport $options -of $OPTFILE -command "$EXE" -odir aces-$sfx \ |
81 |
-skd fizhi-cs-32x32x40 |