2 |
# |
# |
3 |
#PBS -q four-twelve |
#PBS -q four-twelve |
4 |
#PBS -N tst_ifc |
#PBS -N tst_ifc |
5 |
#PBS -l nodes=2:ppn=2 |
#PBS -l nodes=3:ppn=2 |
6 |
#PBS -e /home/jmc/test_ACES/output/tst_ifc.stderr |
#PBS -e /home/jmc/test_ACES/output/tst_ifc.stderr |
7 |
#PBS -o /home/jmc/test_ACES/output/tst_ifc.stdout |
#PBS -o /home/jmc/test_ACES/output/tst_ifc.stdout |
8 |
|
|
9 |
# $Header$ |
# $Header$ |
10 |
# $Name$ |
# $Name$ |
11 |
|
|
12 |
umask 0022 |
# ACES-grid PBS-batch script for MPI test using ifort (default=v8) & mpich |
|
TST_DIR="/home/jmc/test_ACES/gcm_tests" |
|
|
HERE='/home/jmc/test_ACES/output' |
|
|
cd $HERE |
|
13 |
|
|
14 |
if test -f /etc/profile.d/modules.sh ; then |
if test -f /etc/profile.d/modules.sh ; then |
15 |
. /etc/profile.d/modules.sh |
. /etc/profile.d/modules.sh |
16 |
fi |
fi |
17 |
|
# Note: added "ulimit -s unlimited" in file "~/.bashrc" |
18 |
|
# to pass big test (the 2 fizhi-cs-* test & adjoint tests) with MPI |
19 |
|
|
20 |
|
umask 0022 |
21 |
|
#- to get case insensitive "ls" (and order of tested experiments) |
22 |
|
export LC_ALL="en_US.UTF-8" |
23 |
|
|
24 |
|
TST_DIR="/home/jmc/test_ACES" |
25 |
|
HERE=$TST_DIR/output |
26 |
|
#cd $HERE |
27 |
|
|
28 |
sfx='ifc' |
sfx='ifc' |
29 |
module add mpich/intel |
module add mpich/intel |
30 |
OPTFILE="../tools/build_options/linux_ia32_ifort+mpi_aces" |
module add netcdf/3.6.1/icc |
31 |
options='-j 2 -mpi -match 10' |
export MPI_INC_DIR='/usr/local/pkg/mpich/mpich-intel/include' |
32 |
|
OPTFILE="../tools/build_options/linux_ia32_ifort" |
33 |
|
#OPTFILE="$HERE/linux_ia32_ifort+mpi_aces" |
34 |
|
options="-j 2 -MPI 6 -mf $PBS_NODEFILE -devel" |
35 |
|
EXE="mpirun -machinefile TR_MFILE -v -np TR_NPROC ./mitgcmuv" |
36 |
|
|
37 |
|
#- keep a copy of MPI_MFILE: |
38 |
|
cp -p $PBS_NODEFILE $HERE"/mf_"$sfx |
39 |
|
|
40 |
checkOut=1 |
checkOut=1 |
41 |
#options="$options -nc" ; checkOut=0 |
#options="$options -nc" ; checkOut=0 |
42 |
#options="$options -q" ; checkOut=0 |
#options="$options -q" ; checkOut=0 |
43 |
|
|
|
MF=$HERE"/mf_"$sfx |
|
|
cat $PBS_NODEFILE | sort | uniq > $MF |
|
|
NCPU=`wc -l $MF | awk '{print $1}'` |
|
|
EXE="mpirun -machinefile $MF -v -np $NCPU ./mitgcmuv" |
|
|
|
|
|
# cat << EOF > $HERE"/.cvspass" |
|
|
# /1 :pserver:cvsanon@mitgcm.org:2401/u/gcmpack Ah<Zy=0= |
|
|
# EOF |
|
44 |
gcmDIR="MITgcm_$sfx" |
gcmDIR="MITgcm_$sfx" |
45 |
cd $TST_DIR |
cd $TST_DIR |
46 |
#- check for disk space: |
#- check for disk space: |
47 |
dsp=`df . | tail -1 | awk '{print $5}' | sed 's/%$//'` |
dsp=`df -P . | tail -1 | awk '{print $5}' | sed 's/%$//'` |
48 |
if [ $dsp -gt 99 ] ; then |
if [ $dsp -gt 99 ] ; then |
49 |
echo 'Not enough space on this disk => do not run testreport.' |
echo 'Not enough space on this disk => do not run testreport.' |
50 |
df . |
df . |
52 |
fi |
fi |
53 |
if [ $checkOut -eq 1 ] ; then |
if [ $checkOut -eq 1 ] ; then |
54 |
if test -d $gcmDIR/CVS ; then |
if test -d $gcmDIR/CVS ; then |
55 |
|
/bin/rm -rf $gcmDIR/verification/??_aces-${sfx}_????????_? |
56 |
|
( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean ) |
57 |
echo "cvs update of dir $gcmDIR :" |
echo "cvs update of dir $gcmDIR :" |
58 |
( cd $gcmDIR ; cvs -q -d :pserver:cvsanon@mitgcm.org:/u/gcmpack update -P -d ) |
( cd $gcmDIR ; cvs -q -d :pserver:cvsanon@mitgcm.org:/u/gcmpack update -P -d ) 2>&1 |
59 |
/bin/rm -rf $gcmDIR/verification/tr_aces-${sfx}_????????_? |
RETVAL=$? |
60 |
|
if test "x$RETVAL" != x0 ; then |
61 |
|
echo "cvs update on '"`hostname`"' fail (return val=$RETVAL) => exit" |
62 |
|
exit |
63 |
|
fi |
64 |
else |
else |
65 |
echo "no dir: $gcmDIR/CVS => try a fresh check-out" |
echo "no dir: $gcmDIR/CVS => try a fresh check-out" |
66 |
checkOut=2 |
checkOut=2 |
70 |
if test -e $gcmDIR ; then |
if test -e $gcmDIR ; then |
71 |
rm -rf $gcmDIR |
rm -rf $gcmDIR |
72 |
fi |
fi |
|
cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co -P -d $gcmDIR MITgcm > /dev/null 2>&1 |
|
73 |
# cvs co MITgcm |
# cvs co MITgcm |
74 |
|
cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co -P -d $gcmDIR MITgcm > /dev/null 2>&1 |
75 |
/usr/bin/find $gcmDIR -type d | xargs chmod g+rxs |
/usr/bin/find $gcmDIR -type d | xargs chmod g+rxs |
76 |
/usr/bin/find $gcmDIR -type f | xargs chmod g+r |
/usr/bin/find $gcmDIR -type f | xargs chmod g+r |
77 |
|
fi |
78 |
|
|
79 |
|
#- change dir to $gcmDIR/verification dir: |
80 |
|
if test -e $gcmDIR/verification ; then |
81 |
|
if [ $checkOut -lt 2 ] ; then |
82 |
|
echo " dir $gcmDIR/verification exist" ; fi |
83 |
|
cd $gcmDIR/verification |
84 |
else |
else |
85 |
if test -e $gcmDIR/verification ; then |
echo "no dir: $gcmDIR/verification => exit" |
86 |
echo "dir $gcmDIR exist" |
exit |
|
else |
|
|
echo "no dir $gcmDIR/verification => exit" |
|
|
exit |
|
|
fi |
|
87 |
fi |
fi |
88 |
|
|
89 |
cd $gcmDIR/verification |
echo ./testreport $options -of $OPTFILE -command \"$EXE\" -odir aces-$sfx |
|
echo ./testreport $options -of $OPTFILE -command "$EXE" -odir aces-$sfx |
|
90 |
./testreport $options -of $OPTFILE -command "$EXE" -odir aces-$sfx |
./testreport $options -of $OPTFILE -command "$EXE" -odir aces-$sfx |
91 |
|
|
92 |
|
echo '' |
93 |
|
echo ../tools/do_tst_2+2 -mpi -mf $PBS_NODEFILE -exe \"$EXE\" -o aces-$sfx -a NONE |
94 |
|
../tools/do_tst_2+2 -mpi -mf $PBS_NODEFILE -exe "$EXE" -o aces-$sfx -a NONE |
95 |
|
|