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

Annotation of /MITgcm_contrib/test_scripts/nasa_ames/test_pleiades_ieee

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


Revision 1.4 - (hide annotations) (download)
Wed Jan 12 17:58:48 2022 UTC (3 years, 6 months ago) by jmc
Branch: MAIN
Changes since 1.3: +33 -27 lines
- switch to newer version of Intel compiler
- run testreport 2 times (first time just to compile, using "-nr"): this is more
  robust in case of issues accessing Intel compiler license.

1 jmc 1.1 #PBS -S /bin/bash
2     #PBS -N tst_ieee
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_ieee.stderr
7     #PBS -o /u/jcampin/test_pleiades/output/tst_ieee.stdout
8    
9 jmc 1.4 # $Header: /u/gcmpack/MITgcm_contrib/test_scripts/nasa_ames/test_pleiades_ieee,v 1.3 2022/01/01 00:28:08 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 jmc 1.4 dblTr=0 ; typ='' ; addExp='' ; skipExp=''
51 jmc 1.1 #sfx='ifc'
52 jmc 1.4 sfx='ieee'; dblTr=1
53     #sfx='fast'; dblTr=1
54     #addExp='global_ocean.gm_k3d global_ocean.gm_res'
55 jmc 1.1
56     module purge
57 jmc 1.4 #- using older version of Intel Compiler:
58     #module load comp-intel/2016.2.181
59     #- using newer version of Intel Compiler:
60     module load comp-intel/2020.4.304
61     #- for MPI and NetCDF:
62     module load mpi-hpe/mpt.2.25
63 jmc 1.1 module load hdf4/4.2.12 hdf5/1.8.18_mpt netcdf/4.4.1.1_mpt
64     module list
65    
66     OPTFILE="../tools/build_options/linux_amd64_ifort+mpi_ice_nas"
67 jmc 1.4 options="$typ -MPI 6"
68     #options="-j 2 $options"
69 jmc 1.3 #mpiCMD='mpiexec_mpt -np TR_NPROC ./mitgcmuv'
70 jmc 1.1 #- need this to get "staf":
71     #export PATH="$PATH:$HOME/bin"
72    
73     dInWeek=`date +%a`
74     #if test "x$dInWeek" = xSun ; then options="$options -fast" ; fi
75     if test $sfx = 'fast' ; then options="$options -fast" ; fi
76    
77     checkOut=2
78 jmc 1.4 #options="$options -nc" ; checkOut=1 ; dblTr=0
79     #options="$options -q" ; checkOut=0 ; dblTr=0
80 jmc 1.1
81     #- keep a copy of MPI_MFILE:
82     #cp -p $PBS_NODEFILE $OUTP"/mf_"$sfx
83    
84     cmdCVS='cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack -q'
85     gcmDIR="MITgcm_$sfx"
86    
87     if [ $checkOut -eq 1 ] ; then
88     if test -d $gcmDIR/CVS ; then
89     #- remove previous output tar files and tar & remove previous output-dir
90     /bin/rm -f $gcmDIR/verification/??_${dNam}-${sfx}_????????_?.tar.gz
91     ( cd $gcmDIR/verification
92     listD=`ls -1 -d ??_${dNam}-${sfx}_????????_? 2> /dev/null`
93     for dd in $listD
94     do
95     if test -d $dd ; then
96     tar -cf ${dd}".tar" $dd > /dev/null 2>&1 && gzip ${dd}".tar" && /bin/rm -rf $dd
97 jmc 1.2 retVal=$?
98     if test "x$retVal" != x0 ; then
99 jmc 1.1 echo "ERROR in tar+gzip prev outp-dir: $dd"
100 jmc 1.2 echo " on '"`hostname`"' (return val=$retVal) but continue"
101 jmc 1.1 fi
102     fi
103     done )
104     echo "clean tst_2+2 + testreport output (+ Makefile_syntax files)"
105     ( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean )
106     ( cd $gcmDIR/verification ; ./testreport $typ -clean )
107     # ( cd $gcmDIR/verification ; rm -f */build/Makefile_syntax )
108     # ( cd $gcmDIR/verification ; rm -f */build/port_rand.i */build/ptracers_set_iolabel.i )
109     echo "cvs update of dir $gcmDIR :"
110     ( cd $gcmDIR ; $cmdCVS update -P -d ) 2>&1
111 jmc 1.2 retVal=$?
112     if test "x$retVal" != x0 ; then
113     echo "cvs update on '"`hostname`"' fail (return val=$retVal) => exit"
114 jmc 1.1 exit
115     fi
116     else
117     echo "no dir: $gcmDIR/CVS => try a fresh check-out"
118     checkOut=2
119     fi
120     fi
121     if [ $checkOut -eq 2 ] ; then
122     if test -e $gcmDIR ; then
123     echo -n "Removing working copy: $gcmDIR ..."
124     rm -rf $gcmDIR
125     echo " done"
126     fi
127     #echo "Downloading using '$cmdCVS co -P -d $gcmDIR MITgcm' ..."
128     #$cmdCVS co -P -d $gcmDIR MITgcm > /dev/null
129 jmc 1.2 #retVal=$?
130     #if test "x$retVal" != x0 ; then
131     # echo "cvs co on '"`hostname`"' fail (return val=$retVal) => exit"
132 jmc 1.1 # exit
133     #fi
134     #if test -d $gcmDIR/verification ; then
135     # /usr/bin/find $gcmDIR -type d | xargs chmod g+rxs
136     # /usr/bin/find $gcmDIR -type f | xargs chmod g+r
137     #fi
138     #- make a local copy (instead of using CVS):
139     today=`date +%Y%m%d`
140 jmc 1.2 nCount=0; updFile="${srcDIR}/updated_code"
141 jmc 1.1 updDate=0 ; test -f $updFile && updDate=`cat $updFile`
142     while [ $today -gt $updDate ] ; do
143     nCount=`expr $nCount + 1`
144     if [ $nCount -gt 40 ] ; then
145     echo " waiting too long (nCount=$nCount) for updated code"
146     echo " today=$today , updDate=$updDate "
147     ls -l $updFile
148     exit
149     fi
150     sleep 60
151     updDate=0 ; test -f $updFile && updDate=`cat $updFile`
152     done
153     ls -l $updFile
154     echo " waited nCount=$nCount for updated code ($updDate) to copy"
155 jmc 1.2 if test -d $srcDIR/$srcCode ; then
156     echo -n "Make local copy of dir '$srcDIR/$srcCode' to: $gcmDIR ..."
157     cp -pra $srcDIR/$srcCode $gcmDIR
158 jmc 1.1 echo " done"
159 jmc 1.2 else echo " dir: $srcDIR/$srcCode missing => exit" ; exit ; fi
160 jmc 1.1 fi
161    
162     #- change dir to $gcmDIR/verification dir:
163     if test -e $gcmDIR/verification ; then
164     if [ $checkOut -lt 2 ] ; then
165     echo " dir $gcmDIR/verification exist" ; fi
166     cd $gcmDIR/verification
167     #------------
168     for exp2add in $addExp ; do
169     if test -d ${exp2add}/CVS ; then
170     echo " assumes dir: $exp2add has been updated"
171     else
172     test -r $exp2add && /bin/rm -rf $exp2add
173     echo " add dir: $exp2add (from Contrib:verification_other)"
174     ( $cmdCVS co -P -d $exp2add \
175     MITgcm_contrib/verification_other/$exp2add > /dev/null )
176     if test $exp2add = 'global_oce_cs32' ; then
177     echo " link dir 'other_input/core2_cnyf' in here"
178     ( cd ${exp2add} ; ln -s ../../../other_input/core2_cnyf . )
179     fi
180     if test $exp2add = 'global_oce_llc90' ; then
181     echo " link dir 'other_input/gael_oce_llc90_input' to 'input_fields'"
182     ( cd ${exp2add} ; ln -s ../../../other_input/gael_oce_llc90_input input_fields )
183     echo " link dirs: 'core2_cnyf' & 'global_oce_input_fields/*' in input_verifs"
184     ( test ! -e ${exp2add}/input_verifs && mkdir ${exp2add}/input_verifs
185     cd ${exp2add}/input_verifs
186     ln -s ../../../../other_input/core2_cnyf .
187     ln -s ../../../../other_input/global_oce_input_fields/* . )
188     fi
189     /usr/bin/find $exp2add -type d | xargs chmod g+rxs
190     /usr/bin/find $exp2add -type f | xargs chmod g+r
191     fi
192     done
193     else
194     echo "no dir: $gcmDIR/verification => exit"
195     exit
196     fi
197    
198 jmc 1.4 if [ $dblTr -eq 1 ] ; then
199     # echo ''
200     #- 0) just make all module header ( *__genmod.mod files) using modified Makefile
201     # echo ./testreport $options -of $OPTFILE -j 4 \
202     # -repl_mk do_make_syntax.sh -obj -dd
203     # ./testreport $options -of $OPTFILE -j 4 \
204     # -repl_mk do_make_syntax.sh -obj -dd 2>&1
205     # options="$options -q"
206 jmc 1.1
207 jmc 1.4 echo ''
208     #- 1) just compile ("-nr"), using "-j 4" to speed up
209     echo ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx -j 4 -nr
210     ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx -j 4 -nr
211     nFc=`grep -c '^Y . N N ' tr_out.txt`
212     echo " <= fail to compile $nFc experiments"
213     options="$options -q"
214     fi
215    
216     echo ''
217 jmc 1.1 echo ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx \
218 jmc 1.3 -send \"$SEND\" -sd $SavD -a $ADDR
219 jmc 1.1 ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx \
220 jmc 1.3 -send "$SEND" -sd $SavD -a $ADDR
221    
222 jmc 1.1 echo ''
223     echo ../tools/do_tst_2+2 -mpi -o ${dNam}-$sfx \
224 jmc 1.3 -send \"$SEND\" -sd $SavD -a $ADDR
225 jmc 1.1 ../tools/do_tst_2+2 -mpi -o ${dNam}-$sfx \
226 jmc 1.3 -send "$SEND" -sd $SavD -a $ADDR

  ViewVC Help
Powered by ViewVC 1.1.22