[Dart-dev] DART/branches Revision: 12277
dart at ucar.edu
dart at ucar.edu
Thu Jan 4 10:14:52 MST 2018
nancy at ucar.edu
2018-01-04 10:14:52 -0700 (Thu, 04 Jan 2018)
284
possible way to pass in the flag to 'make' to
have it run multiple compiles in parallel.
this might speed up our test_dart script, but
it does require a minor update to every quickbuild
script in the system. this is going in on our
branch - discuss before trying to propagate this.
Modified: DART/branches/recam/models/lorenz_96/work/quickbuild.csh
===================================================================
--- DART/branches/recam/models/lorenz_96/work/quickbuild.csh 2018-01-04 17:01:11 UTC (rev 12276)
+++ DART/branches/recam/models/lorenz_96/work/quickbuild.csh 2018-01-04 17:14:52 UTC (rev 12277)
@@ -18,6 +18,10 @@
# 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.
+#
+# to pass any flags to the 'make' program, set DART_MFLAGS in your environment.
+# e.g. to build faster by running 4 (or your choice) compiles at once:
+# "setenv DART_MFLAGS '-j 4' " (csh) or "export DART_MFLAGS='-j 4' " (bash)
#----------------------------------------------------------------------
# this model name:
@@ -48,7 +52,9 @@
set preprocess_done = 0
set tdebug = 0
set cdebug = 0
+set mflags = ''
+# environment vars this script looks for
if ( $?CODE_DEBUG ) then
set cdebug = $CODE_DEBUG
endif
@@ -55,7 +61,11 @@
if ( $?DART_TEST ) then
set tdebug = $DART_TEST
endif
+if ( $?DART_MFLAGS ) then
+ set mflags = "$DART_MFLAGS"
+endif
+
\rm -f *.o *.mod
#----------------------------------------------------------------------
@@ -107,8 +117,8 @@
echo "---------------------------------------------------"
echo "$BUILDING build number $n is $PROG"
\rm -f $PROG
- csh $TARGET || exit $n
- make || exit $n
+ csh $TARGET || exit $n
+ make $mflags || exit $n
if ( $tdebug ) then
echo 'removing all files between builds'
@@ -159,7 +169,7 @@
echo "$BUILDING with MPI build number $n is $PROG"
\rm -f $PROG
csh $TARGET -mpi || exit $n
- make || exit $n
+ make $mflags || exit $n
if ( $tdebug ) then
echo 'removing all files between builds'
More information about the Dart-dev
mailing list