| 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 |
|
|
# $Header: /u/gcmpack/MITgcm/tools/example_scripts/nasa_ames/test_pleiades_ieee,v 1.6 2018/01/05 22:34:07 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 |
|
|
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 |
|
|
|
| 31 |
|
|
cd $TST_DISK ; pwd |
| 32 |
|
|
if test -d $TST_DIR ; then |
| 33 |
|
|
echo "start from TST_DIR='$TST_DIR' at: "`date` |
| 34 |
|
|
else |
| 35 |
|
|
echo "ERROR: missing directory \"$TST_DIR\"" |
| 36 |
|
|
exit 1 |
| 37 |
|
|
fi |
| 38 |
|
|
|
| 39 |
|
|
#sfx='ifc' |
| 40 |
|
|
sfx='ieee' |
| 41 |
|
|
#sfx='fast' |
| 42 |
|
|
|
| 43 |
|
|
typ='' ; addExp='' |
| 44 |
|
|
#addExp='global_ocean.gm_k3d global_ocean.gm_res' |
| 45 |
|
|
module purge |
| 46 |
|
|
module load comp-intel/2016.2.181 mpi-sgi/mpt.2.14r19 |
| 47 |
|
|
module load hdf4/4.2.12 hdf5/1.8.18_mpt netcdf/4.4.1.1_mpt |
| 48 |
|
|
module list |
| 49 |
|
|
|
| 50 |
|
|
OPTFILE="../tools/build_options/linux_amd64_ifort+mpi_ice_nas" |
| 51 |
|
|
options="-j 2 $typ -MPI 6" |
| 52 |
|
|
mpiCMD='mpiexec_mpt -np TR_NPROC ./mitgcmuv' |
| 53 |
|
|
#- need this to get "staf": |
| 54 |
|
|
#export PATH="$PATH:$HOME/bin" |
| 55 |
|
|
|
| 56 |
|
|
dInWeek=`date +%a` |
| 57 |
|
|
#if test "x$dInWeek" = xSun ; then options="$options -fast" ; fi |
| 58 |
|
|
if test $sfx = 'fast' ; then options="$options -fast" ; fi |
| 59 |
|
|
|
| 60 |
|
|
checkOut=2 |
| 61 |
|
|
#options="$options -nc" ; checkOut=1 |
| 62 |
|
|
#options="$options -q" ; checkOut=0 |
| 63 |
|
|
|
| 64 |
|
|
#- keep a copy of MPI_MFILE: |
| 65 |
|
|
#cp -p $PBS_NODEFILE $OUTP"/mf_"$sfx |
| 66 |
|
|
|
| 67 |
|
|
cmdCVS='cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack -q' |
| 68 |
|
|
gcmDIR="MITgcm_$sfx" |
| 69 |
|
|
cd $TST_DIR |
| 70 |
|
|
|
| 71 |
|
|
if [ $checkOut -eq 1 ] ; then |
| 72 |
|
|
if test -d $gcmDIR/CVS ; then |
| 73 |
|
|
#- remove previous output tar files and tar & remove previous output-dir |
| 74 |
|
|
/bin/rm -f $gcmDIR/verification/??_${dNam}-${sfx}_????????_?.tar.gz |
| 75 |
|
|
( cd $gcmDIR/verification |
| 76 |
|
|
listD=`ls -1 -d ??_${dNam}-${sfx}_????????_? 2> /dev/null` |
| 77 |
|
|
for dd in $listD |
| 78 |
|
|
do |
| 79 |
|
|
if test -d $dd ; then |
| 80 |
|
|
tar -cf ${dd}".tar" $dd > /dev/null 2>&1 && gzip ${dd}".tar" && /bin/rm -rf $dd |
| 81 |
|
|
RETVAL=$? |
| 82 |
|
|
if test "x$RETVAL" != x0 ; then |
| 83 |
|
|
echo "ERROR in tar+gzip prev outp-dir: $dd" |
| 84 |
|
|
echo " on '"`hostname`"' (return val=$RETVAL) but continue" |
| 85 |
|
|
fi |
| 86 |
|
|
fi |
| 87 |
|
|
done ) |
| 88 |
|
|
echo "clean tst_2+2 + testreport output (+ Makefile_syntax files)" |
| 89 |
|
|
( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean ) |
| 90 |
|
|
( cd $gcmDIR/verification ; ./testreport $typ -clean ) |
| 91 |
|
|
# ( cd $gcmDIR/verification ; rm -f */build/Makefile_syntax ) |
| 92 |
|
|
# ( cd $gcmDIR/verification ; rm -f */build/port_rand.i */build/ptracers_set_iolabel.i ) |
| 93 |
|
|
echo "cvs update of dir $gcmDIR :" |
| 94 |
|
|
( cd $gcmDIR ; $cmdCVS 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 |
|
|
echo -n "Removing working copy: $gcmDIR ..." |
| 108 |
|
|
rm -rf $gcmDIR |
| 109 |
|
|
echo " done" |
| 110 |
|
|
fi |
| 111 |
|
|
#echo "Downloading using '$cmdCVS co -P -d $gcmDIR MITgcm' ..." |
| 112 |
|
|
#$cmdCVS co -P -d $gcmDIR MITgcm > /dev/null |
| 113 |
|
|
#RETVAL=$? |
| 114 |
|
|
#if test "x$RETVAL" != x0 ; then |
| 115 |
|
|
# echo "cvs co on '"`hostname`"' fail (return val=$RETVAL) => exit" |
| 116 |
|
|
# exit |
| 117 |
|
|
#fi |
| 118 |
|
|
#if test -d $gcmDIR/verification ; then |
| 119 |
|
|
# /usr/bin/find $gcmDIR -type d | xargs chmod g+rxs |
| 120 |
|
|
# /usr/bin/find $gcmDIR -type f | xargs chmod g+r |
| 121 |
|
|
#fi |
| 122 |
|
|
#- make a local copy (instead of using CVS): |
| 123 |
|
|
today=`date +%Y%m%d` |
| 124 |
|
|
nCount=0; updFile='updated_code' |
| 125 |
|
|
updDate=0 ; test -f $updFile && updDate=`cat $updFile` |
| 126 |
|
|
while [ $today -gt $updDate ] ; do |
| 127 |
|
|
nCount=`expr $nCount + 1` |
| 128 |
|
|
if [ $nCount -gt 40 ] ; then |
| 129 |
|
|
echo " waiting too long (nCount=$nCount) for updated code" |
| 130 |
|
|
echo " today=$today , updDate=$updDate " |
| 131 |
|
|
ls -l $updFile |
| 132 |
|
|
exit |
| 133 |
|
|
fi |
| 134 |
|
|
sleep 60 |
| 135 |
|
|
updDate=0 ; test -f $updFile && updDate=`cat $updFile` |
| 136 |
|
|
done |
| 137 |
|
|
ls -l $updFile |
| 138 |
|
|
echo " waited nCount=$nCount for updated code ($updDate) to copy" |
| 139 |
|
|
if test -d MITgcm ; then |
| 140 |
|
|
echo -n "Make local copy of dir 'MITgcm' to: $gcmDIR ..." |
| 141 |
|
|
cp -pra MITgcm $gcmDIR |
| 142 |
|
|
echo " done" |
| 143 |
|
|
else echo " dir: MITgcm missing => exit" ; exit ; fi |
| 144 |
|
|
fi |
| 145 |
|
|
|
| 146 |
|
|
#- change dir to $gcmDIR/verification dir: |
| 147 |
|
|
if test -e $gcmDIR/verification ; then |
| 148 |
|
|
if [ $checkOut -lt 2 ] ; then |
| 149 |
|
|
echo " dir $gcmDIR/verification exist" ; fi |
| 150 |
|
|
cd $gcmDIR/verification |
| 151 |
|
|
#------------ |
| 152 |
|
|
for exp2add in $addExp ; do |
| 153 |
|
|
if test -d ${exp2add}/CVS ; then |
| 154 |
|
|
echo " assumes dir: $exp2add has been updated" |
| 155 |
|
|
else |
| 156 |
|
|
test -r $exp2add && /bin/rm -rf $exp2add |
| 157 |
|
|
echo " add dir: $exp2add (from Contrib:verification_other)" |
| 158 |
|
|
( $cmdCVS co -P -d $exp2add \ |
| 159 |
|
|
MITgcm_contrib/verification_other/$exp2add > /dev/null ) |
| 160 |
|
|
if test $exp2add = 'global_oce_cs32' ; then |
| 161 |
|
|
echo " link dir 'other_input/core2_cnyf' in here" |
| 162 |
|
|
( cd ${exp2add} ; ln -s ../../../other_input/core2_cnyf . ) |
| 163 |
|
|
fi |
| 164 |
|
|
if test $exp2add = 'global_oce_llc90' ; then |
| 165 |
|
|
echo " link dir 'other_input/gael_oce_llc90_input' to 'input_fields'" |
| 166 |
|
|
( cd ${exp2add} ; ln -s ../../../other_input/gael_oce_llc90_input input_fields ) |
| 167 |
|
|
echo " link dirs: 'core2_cnyf' & 'global_oce_input_fields/*' in input_verifs" |
| 168 |
|
|
( test ! -e ${exp2add}/input_verifs && mkdir ${exp2add}/input_verifs |
| 169 |
|
|
cd ${exp2add}/input_verifs |
| 170 |
|
|
ln -s ../../../../other_input/core2_cnyf . |
| 171 |
|
|
ln -s ../../../../other_input/global_oce_input_fields/* . ) |
| 172 |
|
|
fi |
| 173 |
|
|
/usr/bin/find $exp2add -type d | xargs chmod g+rxs |
| 174 |
|
|
/usr/bin/find $exp2add -type f | xargs chmod g+r |
| 175 |
|
|
fi |
| 176 |
|
|
done |
| 177 |
|
|
else |
| 178 |
|
|
echo "no dir: $gcmDIR/verification => exit" |
| 179 |
|
|
exit |
| 180 |
|
|
fi |
| 181 |
|
|
|
| 182 |
|
|
dInWeek='Sun' |
| 183 |
|
|
if test "x$dInWeek" = xSun ; then |
| 184 |
|
|
#options="$options -fast" |
| 185 |
|
|
|
| 186 |
|
|
echo ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx \ |
| 187 |
|
|
-command \"$mpiCMD\" -send \"$SEND\" -sd $SavD -a $ADDR |
| 188 |
|
|
./testreport $options -of $OPTFILE -odir ${dNam}-$sfx \ |
| 189 |
|
|
-command "$mpiCMD" -send "$SEND" -sd $SavD -a $ADDR |
| 190 |
|
|
else |
| 191 |
|
|
options="$options -devel" |
| 192 |
|
|
|
| 193 |
|
|
echo ./testreport $options -of $OPTFILE \ |
| 194 |
|
|
-repl_mk do_make_syntax.sh -obj -dd |
| 195 |
|
|
./testreport $options -of $OPTFILE \ |
| 196 |
|
|
-repl_mk do_make_syntax.sh -obj -dd 2>&1 |
| 197 |
|
|
|
| 198 |
|
|
echo '' |
| 199 |
|
|
echo ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx \ |
| 200 |
|
|
-q -send \"$SEND\" -sd $SavD -a $ADDR |
| 201 |
|
|
./testreport $options -of $OPTFILE -odir ${dNam}-$sfx \ |
| 202 |
|
|
-q -send "$SEND" -sd $SavD -a $ADDR |
| 203 |
|
|
fi |
| 204 |
|
|
|
| 205 |
|
|
echo '' |
| 206 |
|
|
echo ../tools/do_tst_2+2 -mpi -o ${dNam}-$sfx \ |
| 207 |
|
|
-exe \"$mpiCMD\" -send \"$SEND\" -sd $SavD -a $ADDR |
| 208 |
|
|
../tools/do_tst_2+2 -mpi -o ${dNam}-$sfx \ |
| 209 |
|
|
-exe "$mpiCMD" -send "$SEND" -sd $SavD -a $ADDR |