[Dart-dev] DART/branches Revision: 11026
dart at ucar.edu
dart at ucar.edu
Wed Feb 8 09:11:16 MST 2017
nancy at ucar.edu
2017-02-08 09:11:13 -0700 (Wed, 08 Feb 2017)
97
this quickbuild has been simplified and after review i'd
like to make all of them look like it.
Modified: DART/branches/rma_single_file/models/ROMS/work/quickbuild.csh
===================================================================
--- DART/branches/rma_single_file/models/ROMS/work/quickbuild.csh 2017-02-08 00:40:59 UTC (rev 11025)
+++ DART/branches/rma_single_file/models/ROMS/work/quickbuild.csh 2017-02-08 16:11:13 UTC (rev 11026)
@@ -1,4 +1,4 @@
-#!/bin/csh
+#!/bin/csh
#
# DART software - Copyright UCAR. This open source software is provided
# by UCAR, "as is", without charge, subject to all terms of use at
@@ -7,94 +7,104 @@
# DART $Id$
#----------------------------------------------------------------------
-# 'preprocess' is a program that culls the appropriate sections of the
-# observation module for the observations types in 'input.nml'; the
-# resulting source file is used by all the remaining programs,
-# so this MUST be run first.
+# compile all programs in the current directory with a mkmf_xxx file.
+#
+# usage: [ -mpi | -nompi ]
+#
#----------------------------------------------------------------------
-# 1 is true, 0 is false
+# this model name:
+set MODEL = "ROMS"
-if ( $#argv == 1 && "$1" == "-mpi" ) then
- set with_mpi = 1
-else if ( $#argv == 1 && "$1" == "-nompi" ) then
- set with_mpi = 0
-else # default
- set with_mpi = 1
-endif
+# programs which have the option of building with MPI:
+set MPI_TARGETS = "filter model_mod_check perfect_model_obs"
-\rm -f preprocess *.o *.mod
-\rm -f ../../../obs_def/obs_def_mod.f90
-\rm -f ../../../obs_kind/obs_kind_mod.f90
+# this model defaults to building filter and other programs WITH mpi
+set with_mpi = 1
-set MODEL = "ROMS"
-@ n = 1
+# ---------------
+# shouldn't have to modify this script below here.
-echo
-echo
-echo "---------------------------------------------------------------"
-echo "${MODEL} build number ${n} is preprocess"
+if ( $#argv >= 1 ) then
+ if ( "$1" == "-mpi" ) then
+ set with_mpi = 1
+ else if ( "$1" == "-nompi" ) then
+ set with_mpi = 0
+ else
+ echo usage: $0 '[ -mpi | -nompi ]'
+ exit 0
+ endif
+endif
-csh mkmf_preprocess
-make || exit $n
+set preprocess_done = 0
+set debug = 0
-./preprocess || exit 99
+# 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
+endif
+
+@ n = 0
+
#----------------------------------------------------------------------
# Build all the single-threaded targets
#----------------------------------------------------------------------
-foreach TARGET ( mkmf_* )
+foreach TARGET ( mkmf_preprocess mkmf_* )
- set PROG = `echo $TARGET | sed -e 's#mkmf_##'`
+ set PROG = `echo $TARGET | sed -e 's/mkmf_//'`
- switch ( $TARGET )
- case mkmf_preprocess:
- breaksw
- case mkmf_filter:
- case mkmf_model_mod_check:
- case mkmf_perfect_model_obs:
- if ( $with_mpi ) then
- breaksw
- endif
- default:
More information about the Dart-dev
mailing list