[Dart-dev] DART/branches Revision: 11316
dart at ucar.edu
dart at ucar.edu
Tue Mar 14 15:54:40 MDT 2017
nancy at ucar.edu
2017-03-14 15:54:39 -0600 (Tue, 14 Mar 2017)
149
fix the test script to continue to build models
even after failures; fix the tests that were trying
to run workshop_setup if present or PMO if not.
Modified: DART/branches/rma_trunk/models/buildall.csh
===================================================================
--- DART/branches/rma_trunk/models/buildall.csh 2017-03-14 21:40:51 UTC (rev 11315)
+++ DART/branches/rma_trunk/models/buildall.csh 2017-03-14 21:54:39 UTC (rev 11316)
@@ -56,23 +56,25 @@
# set the list of models to include here
set DO_THESE_MODELS = ( \
- lorenz_63 \
- lorenz_84 \
- lorenz_96 \
- lorenz_04 \
- forced_lorenz_96 \
- simple_advection \
9var \
+ POP \
+ ROMS \
bgrid_solo \
cam-fv \
cice \
+ clm \
cm1 \
+ forced_lorenz_96 \
+ lorenz_04 \
+ lorenz_63 \
+ lorenz_84 \
+ lorenz_96 \
mpas_atm \
- POP \
- ROMS \
+ simple_advection \
wrf \
)
+# needed soon: null_model, lorenz_96_2scale
#----------------------------------------------------------------------
# Compile all executables for each model.
@@ -92,9 +94,10 @@
echo
echo
- cd ${modeldir}/${MODEL}/work
+ cd ${modeldir}/${MODEL}/work
+ set FAILURE = 0
- ./quickbuild.csh ${QUICKBUILD_ARG} || exit 3
+ ./quickbuild.csh ${QUICKBUILD_ARG} || set FAILURE = 1
@ modelnum = $modelnum + 1
@@ -102,7 +105,11 @@
echo
echo "=================================================================="
echo "=================================================================="
- echo "End of $MODEL build at "`date`
+ if ( $FAILURE ) then
+ echo "ERROR - unsuccessful build of $MODEL at "`date`
+ else
+ echo "End of succesful build of $MODEL at "`date`
+ endif
echo "=================================================================="
echo "=================================================================="
echo
@@ -134,17 +141,19 @@
echo
cd ${modeldir}/${MODEL}/work
+ set FAILURE = 0
cp input.nml input.nml.$$
+ @ ncdlfiles = `ls *.cdl | wc -l`
+
if ( -f workshop_setup.csh ) then
echo "Trying to run workshop_setup.csh for model $MODEL as a test"
- ./workshop_setup.csh
+ ./workshop_setup.csh || set FAILURE = 1
else
echo "Trying to run pmo for model $MODEL as a test"
echo "Will generate NetCDF files from any .cdl files first."
# try not to error out if no .cdl files found
- @ nfiles = `ls *.cdl | wc -l`
- if ( $nfiles > 0 ) then
+ if ( $ncdlfiles > 0 ) then
foreach i ( *.cdl )
set base = `basename $i .cdl`
if ( -f ${base}.nc ) continue
@@ -151,7 +160,8 @@
ncgen -o ${base}.nc $i
end
endif
- ./perfect_model_obs
+ # assumes the executables from the first pass are still here
+ ./perfect_model_obs || set FAILURE = 1
endif
echo "Removing the newly-built objects and restoring original input.nml"
@@ -161,11 +171,14 @@
set PROG = `echo $TARGET | sed -e 's#mkmf_##'`
${REMOVE} $PROG
end
More information about the Dart-dev
mailing list