[Dart-dev] DART/branches Revision: 11275
dart at ucar.edu
dart at ucar.edu
Thu Mar 9 14:53:27 MST 2017
nancy at ucar.edu
2017-03-09 14:53:27 -0700 (Thu, 09 Mar 2017)
185
simplified quickbuild - reviewed by tim.
should be the template for all other quickbuilds
in our system. if there's time before the release,
great. if not, roll these out piecemeal.
Modified: DART/branches/rma_trunk/models/ROMS/work/quickbuild.csh
===================================================================
--- DART/branches/rma_trunk/models/ROMS/work/quickbuild.csh 2017-03-09 21:52:30 UTC (rev 11274)
+++ DART/branches/rma_trunk/models/ROMS/work/quickbuild.csh 2017-03-09 21:53:27 UTC (rev 11275)
@@ -7,10 +7,18 @@
# DART $Id$
#----------------------------------------------------------------------
-# compile all programs in the current directory with a mkmf_xxx file.
#
+# compile all programs in the current directory that have a mkmf_xxx file.
+#
# usage: [ -mpi | -nompi ]
#
+#
+# environment variable options:
+# before running this script, do:
+# "setenv CODE_DEBUG 1" (csh) or "export CODE_DEBUG=1" (bash)
+# to keep the .o and .mod files in the current directory instead of
+# removing them at the end. this usually improves runtime error reports
+# and these files are required by most debuggers.
#----------------------------------------------------------------------
# this model name:
@@ -19,7 +27,8 @@
# programs which have the option of building with MPI:
set MPI_TARGETS = "filter model_mod_check perfect_model_obs"
-# this model defaults to building filter and other programs WITH mpi
+# set default (override with -mpi or -nompi):
+# 0 = build without MPI, 1 = build with MPI
set with_mpi = 1
@@ -38,16 +47,13 @@
endif
set preprocess_done = 0
-set debug = 0
+set cdebug = 0
-# set this to 1 in the environment to have the script remove
-# all .o and module files between executable builds. this helps
-# catch path_names files which are missing required modules.
-
-if ( $?QUICKBUILD_DEBUG ) then
- set debug = $QUICKBUILD_DEBUG
+if ( $?CODE_DEBUG ) then
+ set cdebug = $CODE_DEBUG
endif
+
@ n = 0
#----------------------------------------------------------------------
@@ -74,11 +80,6 @@
csh $TARGET || exit $n
make || exit $n
- if ( $debug ) then
- echo 'removing all files between builds'
- \rm -f *.o *.mod
- endif
-
# preprocess creates module files that are required by
# the rest of the executables, so it must be run in addition
# to being built.
@@ -90,8 +91,14 @@
skip:
end
-\rm -f *.o *.mod input.nml*_default
+if ( $cdebug ) then
+ echo 'preserving .o and .mod files for debugging'
+else
+ \rm -f *.o *.mod
+endif
+\rm -f input.nml*_default
+
echo "Success: All single task DART programs compiled."
if ( $with_mpi ) then
@@ -107,6 +114,8 @@
# build with MPI, add an exit after the 'Success' line.
#----------------------------------------------------------------------
+\rm -f *.o *.mod
+
#----------------------------------------------------------------------
# Build the MPI-enabled target(s)
#----------------------------------------------------------------------
@@ -123,14 +132,14 @@
csh $TARGET -mpi || exit $n
make || exit $n
- if ( $debug ) then
- echo 'removing all files between builds'
- \rm -f *.o *.mod
- endif
-
More information about the Dart-dev
mailing list