[Dart-dev] DART/branches Revision: 13113
dart at ucar.edu
dart at ucar.edu
Tue Apr 16 11:49:24 MDT 2019
nancy at ucar.edu
2019-04-16 11:49:24 -0600 (Tue, 16 Apr 2019)
174
enable option to build PMO with mpi.
all other models allow PMO, filter, and
model_mod_check to be built as MPI executables.
make these last two consistent with the others.
Modified: DART/branches/rma_trunk/models/ikeda/work/mkmf_perfect_model_obs
===================================================================
--- DART/branches/rma_trunk/models/ikeda/work/mkmf_perfect_model_obs 2019-04-16 17:32:19 UTC (rev 13112)
+++ DART/branches/rma_trunk/models/ikeda/work/mkmf_perfect_model_obs 2019-04-16 17:49:24 UTC (rev 13113)
@@ -5,9 +5,65 @@
# http://www.image.ucar.edu/DAReS/DART/DART_download
#
# DART $Id$
+#
+# usage: mkmf_perfect_model_obs [ -mpi | -nompi ]
+#
+# without any args, builds perfect_model_obs without mpi libraries, and it will run
+# as a normal executable. if -mpi is given, it will be compiled with the mpi
+# libraries and can run with multiple cooperating processes.
+if ( $#argv > 0 ) then
+ if ("$argv[1]" == "-mpi") then
+ setenv usingmpi 1
+ else if ("$argv[1]" == "-nompi") then
+ setenv usingmpi 0
+ else
+ echo "Unrecognized argument to mkmf_perfect_model_obs: $argv[1]"
+ echo "Usage: mkmf_perfect_model_obs [ -mpi | -nompi ]"
+ echo " default is to generate a Makefile without MPI support."
+ exit -1
+ endif
+else
+ setenv usingmpi 0
+endif
+
+
+# make a backup copy of the path_names file, and then use
+# sed to make sure it includes either the non-mpi subroutines,
+# or the subroutines which really call mpi.
+cp -f path_names_perfect_model_obs path_names_perfect_model_obs.back
+
+if ( $usingmpi ) then
+
+ echo "Making Makefile with MPI"
+ touch using_mpi_for_perfect_model_obs
+ sed -e 's#/null_mpi_util#/mpi_util#' \
+ -e 's#/null_win_mod#/no_cray_win_mod#' path_names_perfect_model_obs.back >! path_names_perfect_model_obs
+
+ setenv wrapper_arg -w
+
+else
+
+ echo "Making Makefile without MPI"
+ rm -f using_mpi_for_perfect_model_obs
+ sed -e 's#/mpi_util#/null_mpi_util#' \
+ -e '\#no_cray_win_mod.f90#d' \
+ -e '\#cray_win_mod.f90#d' path_names_perfect_model_obs.back >! path_names_perfect_model_obs
+
+ set p=`grep null_win_mod.f90 path_names_perfect_model_obs | wc -w`
+ if ( $p == 0) then
+ echo assimilation_code/modules/utilities/null_win_mod.f90 >> path_names_perfect_model_obs
+ endif
+
+ setenv wrapper_arg ""
+
+endif
+
+# remove temp file and now really call mkmf to generate makefile
+rm -f path_names_perfect_model_obs.back
+
../../../build_templates/mkmf -p perfect_model_obs -t ../../../build_templates/mkmf.template \
- -a "../../.." path_names_perfect_model_obs
+ -a "../../.." ${wrapper_arg} path_names_perfect_model_obs
exit $status
Modified: DART/branches/rma_trunk/models/null_model/work/mkmf_perfect_model_obs
===================================================================
--- DART/branches/rma_trunk/models/null_model/work/mkmf_perfect_model_obs 2019-04-16 17:32:19 UTC (rev 13112)
+++ DART/branches/rma_trunk/models/null_model/work/mkmf_perfect_model_obs 2019-04-16 17:49:24 UTC (rev 13113)
@@ -5,9 +5,65 @@
# http://www.image.ucar.edu/DAReS/DART/DART_download
#
# DART $Id$
+#
+# usage: mkmf_perfect_model_obs [ -mpi | -nompi ]
+#
+# without any args, builds perfect_model_obs without mpi libraries, and it will run
+# as a normal executable. if -mpi is given, it will be compiled with the mpi
+# libraries and can run with multiple cooperating processes.
+if ( $#argv > 0 ) then
+ if ("$argv[1]" == "-mpi") then
+ setenv usingmpi 1
+ else if ("$argv[1]" == "-nompi") then
+ setenv usingmpi 0
+ else
+ echo "Unrecognized argument to mkmf_perfect_model_obs: $argv[1]"
+ echo "Usage: mkmf_perfect_model_obs [ -mpi | -nompi ]"
+ echo " default is to generate a Makefile without MPI support."
+ exit -1
+ endif
+else
+ setenv usingmpi 0
+endif
More information about the Dart-dev
mailing list