/[MITgcm]/MITgcm/tools/example_scripts/ACESgrid/aces_test_pgi_mpi
ViewVC logotype

Contents of /MITgcm/tools/example_scripts/ACESgrid/aces_test_pgi_mpi

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.32 - (show annotations) (download)
Thu May 15 16:32:01 2014 UTC (10 years ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint65, checkpoint65a
Changes since 1.31: +3 -2 lines
switch back to single execution of testreport.

1 #!/bin/bash
2 #
3 #PBS -q four-twelve
4 #PBS -N tst_pgi
5 #PBS -l nodes=3:ppn=2
6 #PBS -e /home/jmc/test_aces/output/tst_pgi.stderr
7 #PBS -o /home/jmc/test_aces/output/tst_pgi.stdout
8
9 # $Header: /u/gcmpack/MITgcm/tools/example_scripts/ACESgrid/aces_test_pgi_mpi,v 1.31 2014/05/08 18:44:03 jmc Exp $
10 # $Name: $
11
12 # ACES-grid PBS-batch script: MPI test using PGI (pgf77) compiler & mpich
13
14 if test -f /etc/profile.d/modules.sh ; then
15 . /etc/profile.d/modules.sh
16 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 echo " running on: "`hostname`
24
25 dNam='aces'
26 HERE="$HOME/test_$dNam"
27 OUTP="$HERE/output"; SavD="$HERE/send"
28 SEND="ssh geo $SavD/mpack"
29 TST_DIR=$HERE
30
31 if test -d $TST_DIR ; then
32 echo "start from TST_DIR='$TST_DIR' at: "`date`
33 else
34 # if test ! -d /scratch/jm_c ; then mkdir /scratch/jm_c ; fi
35 if test ! -d $TST_DIR ; then mkdir $TST_DIR ; fi
36 if test ! -d $TST_DIR ; then
37 echo "ERROR: Can't create directory \"$TST_DIR\""
38 exit 1
39 fi
40 echo "start in new dir TST_DIR='$TST_DIR' at: "`date`
41 fi
42
43 sfx='pgi'
44 addExp=''
45 module add mpich/$sfx
46 export MPI_INC_DIR='/usr/local/pkg/mpich/mpich-pgi/include'
47 export NETCDF_ROOT='/usr/local/pkg/pgi/pgi-5.2/linux86/5.2'
48 OPTFILE="../tools/build_options/linux_ia32_pgf77"
49 options="-MPI 6 -mf $PBS_NODEFILE"
50 #options="$options -skd tutorial_advection_in_gyre"
51 EXE="mpirun -machinefile TR_MFILE -v -np TR_NPROC ./mitgcmuv"
52
53 #checkOut=1 ; dblRun=1 ; options="$options -do" ;
54 checkOut=1 ; dblRun=0 ; options="$options -do" ;
55 #options="$options -nc" ; checkOut=0 ; dblRun=0 ;
56 #options="$options -q" ; checkOut=0 ; dblRun=0 ;
57
58 #- keep a copy of MPI_MFILE:
59 cp -p $PBS_NODEFILE $OUTP"/mf_"$sfx
60
61 cvsArg="-d :pserver:cvsanon@mitgcm.org:/u/gcmpack"
62 gcmDIR="MITgcm_$sfx"
63 cd $TST_DIR
64 #- check for disk space: relative space (99%) or absolute (1.G):
65 #dsp=`df -P . | tail -1 | awk '{print $5}' | sed 's/%$//'`
66 #if [ $dsp -gt 99 ] ; then
67 dsp=`df -P . | tail -1 | awk '{print $4}'`
68 if [ $dsp -le 1000000 ] ; then
69 echo 'Not enough space on this disk => do not run testreport.'
70 df .
71 exit
72 fi
73 if [ $checkOut -eq 1 ] ; then
74 if test -d $gcmDIR/CVS ; then
75 #- remove previous output tar files and tar & remove previous output-dir
76 /bin/rm -f $gcmDIR/verification/??_${dNam}-${sfx}_????????_?.tar.gz
77 ( cd $gcmDIR/verification
78 listD=`ls -1 -d ??_${dNam}-${sfx}_????????_? 2> /dev/null`
79 for dd in $listD
80 do
81 if test -d $dd ; then
82 tar -cf ${dd}".tar" $dd > /dev/null 2>&1 && gzip ${dd}".tar" && /bin/rm -rf $dd
83 RETVAL=$?
84 if test "x$RETVAL" != x0 ; then
85 echo "ERROR in tar+gzip prev outp-dir: $dd"
86 echo " on '"`hostname`"' (return val=$RETVAL) but continue"
87 fi
88 fi
89 done )
90 # ( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean )
91 #- clean-up previous TAF output temp dir (generated on old system like here)
92 # ( cd $gcmDIR/verification ; /bin/rm -rf */build/PaxHeaders.[0-9]* )
93 echo "cvs update of dir $gcmDIR :"
94 ( cd $gcmDIR ; cvs -q $cvsArg update -P -d ) 2>&1
95 RETVAL=$?
96 if test "x$RETVAL" != x0 ; then
97 echo "cvs update on '"`hostname`"' fail (return val=$RETVAL) => exit"
98 exit
99 fi
100 else
101 echo "no dir: $gcmDIR/CVS => try a fresh check-out"
102 checkOut=2
103 fi
104 fi
105 if [ $checkOut -eq 2 ] ; then
106 if test -e $gcmDIR ; then
107 rm -rf $gcmDIR
108 fi
109 # cvs co MITgcm
110 cvs $cvsArg co -P -d $gcmDIR MITgcm > /dev/null 2>&1
111 for exp2add in $addExp ; do
112 echo " add dir: $exp2add (from Contrib:verification_other)"
113 ( cd $gcmDIR/verification ; cvs $cvsArg co -P -d $exp2add \
114 MITgcm_contrib/verification_other/$exp2add > /dev/null 2>&1 )
115 done
116 /usr/bin/find $gcmDIR -type d | xargs chmod g+rxs
117 /usr/bin/find $gcmDIR -type f | xargs chmod g+r
118 fi
119
120 #- change dir to $gcmDIR/verification dir:
121 if test -e $gcmDIR/verification ; then
122 if [ $checkOut -lt 2 ] ; then
123 echo " dir $gcmDIR/verification exist" ; fi
124 cd $gcmDIR/verification
125 else
126 echo "no dir: $gcmDIR/verification => exit"
127 exit
128 fi
129
130 if [ $dblRun -eq 1 ] ; then
131
132 echo ./testreport $options -of $OPTFILE -command \"$EXE\" -odir ${dNam}-$sfx
133 ./testreport $options -of $OPTFILE -command "$EXE" -odir ${dNam}-$sfx
134
135 echo ./testreport $options -of $OPTFILE -command \"$EXE\" -odir ${dNam}-$sfx \
136 -q -send \"$SEND\" -sd $SavD -a jmc@mitgcm.org
137 ./testreport $options -of $OPTFILE -command "$EXE" -odir ${dNam}-$sfx \
138 -q -send "$SEND" -sd $SavD -a jmc@mitgcm.org
139
140 else
141
142 echo ./testreport $options -of $OPTFILE -command \"$EXE\" -odir ${dNam}-$sfx \
143 -send \"$SEND\" -sd $SavD -a jmc@mitgcm.org
144 ./testreport $options -of $OPTFILE -command "$EXE" -odir ${dNam}-$sfx \
145 -send "$SEND" -sd $SavD -a jmc@mitgcm.org
146
147 fi

  ViewVC Help
Powered by ViewVC 1.1.22