/[MITgcm]/MITgcm_contrib/test_scripts/nasa_ames/test_pleiades_fast
ViewVC logotype

Annotation of /MITgcm_contrib/test_scripts/nasa_ames/test_pleiades_fast

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


Revision 1.3 - (hide annotations) (download)
Sat Jan 1 00:28:08 2022 UTC (3 years, 6 months ago) by jmc
Branch: MAIN
Changes since 1.2: +8 -8 lines
update module for MPI after compute-node OS switch to TOSS ;
also use default "mpirun" command (since it seems to work fine).

1 jmc 1.1 #PBS -S /bin/bash
2     #PBS -N tst_fast
3     #PBS -l select=1:ncpus=6:mpiprocs=6:model=san
4     #PBS -l walltime=12:00:00
5     #PBS -V
6     #PBS -e /u/jcampin/test_pleiades/output/tst_fast.stderr
7     #PBS -o /u/jcampin/test_pleiades/output/tst_fast.stdout
8    
9 jmc 1.3 # $Header: /u/gcmpack/MITgcm_contrib/test_scripts/nasa_ames/test_pleiades_fast,v 1.2 2018/02/11 20:02:42 jmc Exp $
10 jmc 1.1 # $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     echo " running on: "`hostname`
22    
23     dNam='pleiades'
24     HERE="$HOME/test_$dNam"
25     OUTP="$HERE/output"; SavD="$HERE/send"
26     SEND="ssh pfe $SavD/mpack"
27     ADDR='jm_c@mitgcm.org'
28     TST_DISK="/nobackupp2/jcampin"
29     TST_DIR="$TST_DISK/test_${dNam}"
30 jmc 1.3 #- where local copy of code is (need to be consistent with "test_submit_pleiades"):
31 jmc 1.2 srcDIR='.'
32     #srcDIR=$HERE
33     srcCode="MITgcm_today"
34 jmc 1.1
35 jmc 1.2 echo "cd $TST_DISK ; pwd (x2)"
36 jmc 1.1 cd $TST_DISK ; pwd
37 jmc 1.2 if test ! -d $TST_DIR ; then
38     echo -n "Creating a working dir: $TST_DIR ..."
39     #/bin/rm -rf $TST_DIR
40     mkdir $TST_DIR
41     retVal=$?
42     if test "x$retVal" != x0 ; then
43     echo "Error: unable to make dir: $TST_DIR (err=$retVal ) --> Exit"
44     exit 1
45     fi
46 jmc 1.1 fi
47 jmc 1.2 echo "start from TST_DIR='$TST_DIR' at: "`date`
48     cd $TST_DIR ; pwd
49 jmc 1.1
50     #sfx='ifc'
51     #sfx='ieee'
52     sfx='fast'
53    
54     typ='' ; addExp=''
55     #addExp='global_ocean.gm_k3d global_ocean.gm_res'
56     module purge
57 jmc 1.3 module load comp-intel/2016.2.181 mpi-hpe/mpt.2.25
58 jmc 1.1 module load hdf4/4.2.12 hdf5/1.8.18_mpt netcdf/4.4.1.1_mpt
59     module list
60    
61     OPTFILE="../tools/build_options/linux_amd64_ifort+mpi_ice_nas"
62     options="-j 2 $typ -MPI 6"
63 jmc 1.3 #mpiCMD='mpiexec_mpt -np TR_NPROC ./mitgcmuv'
64 jmc 1.1 #- need this to get "staf":
65     #export PATH="$PATH:$HOME/bin"
66    
67     dInWeek=`date +%a`
68     #if test "x$dInWeek" = xSun ; then options="$options -fast" ; fi
69     if test $sfx = 'fast' ; then options="$options -fast" ; fi
70    
71     checkOut=2
72     #options="$options -nc" ; checkOut=1
73     #options="$options -q" ; checkOut=0
74    
75     #- keep a copy of MPI_MFILE:
76     #cp -p $PBS_NODEFILE $OUTP"/mf_"$sfx
77    
78     cmdCVS='cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack -q'
79     gcmDIR="MITgcm_$sfx"
80    
81     if [ $checkOut -eq 1 ] ; then
82     if test -d $gcmDIR/CVS ; then
83     #- remove previous output tar files and tar & remove previous output-dir
84     /bin/rm -f $gcmDIR/verification/??_${dNam}-${sfx}_????????_?.tar.gz
85     ( cd $gcmDIR/verification
86     listD=`ls -1 -d ??_${dNam}-${sfx}_????????_? 2> /dev/null`
87     for dd in $listD
88     do
89     if test -d $dd ; then
90     tar -cf ${dd}".tar" $dd > /dev/null 2>&1 && gzip ${dd}".tar" && /bin/rm -rf $dd
91 jmc 1.2 retVal=$?
92     if test "x$retVal" != x0 ; then
93 jmc 1.1 echo "ERROR in tar+gzip prev outp-dir: $dd"
94 jmc 1.2 echo " on '"`hostname`"' (return val=$retVal) but continue"
95 jmc 1.1 fi
96     fi
97     done )
98     echo "clean tst_2+2 + testreport output (+ Makefile_syntax files)"
99     ( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean )
100     ( cd $gcmDIR/verification ; ./testreport $typ -clean )
101     # ( cd $gcmDIR/verification ; rm -f */build/Makefile_syntax )
102     # ( cd $gcmDIR/verification ; rm -f */build/port_rand.i */build/ptracers_set_iolabel.i )
103     echo "cvs update of dir $gcmDIR :"
104     ( cd $gcmDIR ; $cmdCVS update -P -d ) 2>&1
105 jmc 1.2 retVal=$?
106     if test "x$retVal" != x0 ; then
107     echo "cvs update on '"`hostname`"' fail (return val=$retVal) => exit"
108 jmc 1.1 exit
109     fi
110     else
111     echo "no dir: $gcmDIR/CVS => try a fresh check-out"
112     checkOut=2
113     fi
114     fi
115     if [ $checkOut -eq 2 ] ; then
116     if test -e $gcmDIR ; then
117     echo -n "Removing working copy: $gcmDIR ..."
118     rm -rf $gcmDIR
119     echo " done"
120     fi
121     #echo "Downloading using '$cmdCVS co -P -d $gcmDIR MITgcm' ..."
122     #$cmdCVS co -P -d $gcmDIR MITgcm > /dev/null
123 jmc 1.2 #retVal=$?
124     #if test "x$retVal" != x0 ; then
125     # echo "cvs co on '"`hostname`"' fail (return val=$retVal) => exit"
126 jmc 1.1 # exit
127     #fi
128     #if test -d $gcmDIR/verification ; then
129     # /usr/bin/find $gcmDIR -type d | xargs chmod g+rxs
130     # /usr/bin/find $gcmDIR -type f | xargs chmod g+r
131     #fi
132     #- make a local copy (instead of using CVS):
133     today=`date +%Y%m%d`
134 jmc 1.2 nCount=0; updFile="${srcDIR}/updated_code"
135 jmc 1.1 updDate=0 ; test -f $updFile && updDate=`cat $updFile`
136     while [ $today -gt $updDate ] ; do
137     nCount=`expr $nCount + 1`
138     if [ $nCount -gt 40 ] ; then
139     echo " waiting too long (nCount=$nCount) for updated code"
140     echo " today=$today , updDate=$updDate "
141     ls -l $updFile
142     exit
143     fi
144     sleep 60
145     updDate=0 ; test -f $updFile && updDate=`cat $updFile`
146     done
147     ls -l $updFile
148     echo " waited nCount=$nCount for updated code ($updDate) to copy"
149 jmc 1.2 if test -d $srcDIR/$srcCode ; then
150     echo -n "Make local copy of dir '$srcDIR/$srcCode' to: $gcmDIR ..."
151     cp -pra $srcDIR/$srcCode $gcmDIR
152 jmc 1.1 echo " done"
153 jmc 1.2 else echo " dir: $srcDIR/$srcCode missing => exit" ; exit ; fi
154 jmc 1.1 fi
155    
156     #- change dir to $gcmDIR/verification dir:
157     if test -e $gcmDIR/verification ; then
158     if [ $checkOut -lt 2 ] ; then
159     echo " dir $gcmDIR/verification exist" ; fi
160     cd $gcmDIR/verification
161     #------------
162     for exp2add in $addExp ; do
163     if test -d ${exp2add}/CVS ; then
164     echo " assumes dir: $exp2add has been updated"
165     else
166     test -r $exp2add && /bin/rm -rf $exp2add
167     echo " add dir: $exp2add (from Contrib:verification_other)"
168     ( $cmdCVS co -P -d $exp2add \
169     MITgcm_contrib/verification_other/$exp2add > /dev/null )
170     if test $exp2add = 'global_oce_cs32' ; then
171     echo " link dir 'other_input/core2_cnyf' in here"
172     ( cd ${exp2add} ; ln -s ../../../other_input/core2_cnyf . )
173     fi
174     if test $exp2add = 'global_oce_llc90' ; then
175     echo " link dir 'other_input/gael_oce_llc90_input' to 'input_fields'"
176     ( cd ${exp2add} ; ln -s ../../../other_input/gael_oce_llc90_input input_fields )
177     echo " link dirs: 'core2_cnyf' & 'global_oce_input_fields/*' in input_verifs"
178     ( test ! -e ${exp2add}/input_verifs && mkdir ${exp2add}/input_verifs
179     cd ${exp2add}/input_verifs
180     ln -s ../../../../other_input/core2_cnyf .
181     ln -s ../../../../other_input/global_oce_input_fields/* . )
182     fi
183     /usr/bin/find $exp2add -type d | xargs chmod g+rxs
184     /usr/bin/find $exp2add -type f | xargs chmod g+r
185     fi
186     done
187     else
188     echo "no dir: $gcmDIR/verification => exit"
189     exit
190     fi
191    
192     dInWeek='Sun'
193     if test "x$dInWeek" = xSun ; then
194     #options="$options -fast"
195    
196     echo ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx \
197 jmc 1.3 -send \"$SEND\" -sd $SavD -a $ADDR
198 jmc 1.1 ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx \
199 jmc 1.3 -send "$SEND" -sd $SavD -a $ADDR
200 jmc 1.1 else
201     options="$options -devel"
202    
203     echo ./testreport $options -of $OPTFILE \
204     -repl_mk do_make_syntax.sh -obj -dd
205     ./testreport $options -of $OPTFILE \
206     -repl_mk do_make_syntax.sh -obj -dd 2>&1
207    
208     echo ''
209     echo ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx \
210     -q -send \"$SEND\" -sd $SavD -a $ADDR
211     ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx \
212     -q -send "$SEND" -sd $SavD -a $ADDR
213     fi
214    
215     echo ''
216     echo ../tools/do_tst_2+2 -mpi -o ${dNam}-$sfx \
217 jmc 1.3 -send \"$SEND\" -sd $SavD -a $ADDR
218 jmc 1.1 ../tools/do_tst_2+2 -mpi -o ${dNam}-$sfx \
219 jmc 1.3 -send "$SEND" -sd $SavD -a $ADDR

  ViewVC Help
Powered by ViewVC 1.1.22