[Dart-dev] DART/branches Revision: 13154

dart at ucar.edu dart at ucar.edu
Thu May 2 17:08:09 MDT 2019


thoar at ucar.edu
2019-05-02 17:08:09 -0600 (Thu, 02 May 2019)
459
Removing extra build mechanism for mpi-specific targets.

All mkmf* and quickbuild.csh files have the expected look, feel, and behavior
as the rest of the DART project.

Running  quickbuild.csh  with no arguments will build serial versions 
of the serial code and mpi versions of the MPI versions.

If you want to run the mkmf_* scripts manually for the MPI versions,
simply  ./mkmf_perturb_chem_emiss_CORR_RT_MA_MPI -mpi 
The executables have unique names.




Modified: DART/branches/mizzi/models/wrf_chem/run_scripts/RUN_PERT_CHEM/EMISS_PERT/work/mkmf_perturb_chem_emiss_CORR_RT_CONST
===================================================================
--- DART/branches/mizzi/models/wrf_chem/run_scripts/RUN_PERT_CHEM/EMISS_PERT/work/mkmf_perturb_chem_emiss_CORR_RT_CONST	2019-05-02 22:10:08 UTC (rev 13153)
+++ DART/branches/mizzi/models/wrf_chem/run_scripts/RUN_PERT_CHEM/EMISS_PERT/work/mkmf_perturb_chem_emiss_CORR_RT_CONST	2019-05-02 23:08:09 UTC (rev 13154)
@@ -1,7 +1,7 @@
 #!/bin/csh
 #
-# DART software - Copyright © 2004 - 2010 UCAR. This open source software is
-# provided by UCAR, "as is", without charge, subject to all terms of use at
+# DART software - Copyright UCAR. This open source software is provided
+# by UCAR, "as is", without charge, subject to all terms of use at
 # http://www.image.ucar.edu/DAReS/DART/DART_download
 #
 # DART $Id$

Modified: DART/branches/mizzi/models/wrf_chem/run_scripts/RUN_PERT_CHEM/EMISS_PERT/work/mkmf_perturb_chem_emiss_CORR_RT_MA
===================================================================
--- DART/branches/mizzi/models/wrf_chem/run_scripts/RUN_PERT_CHEM/EMISS_PERT/work/mkmf_perturb_chem_emiss_CORR_RT_MA	2019-05-02 22:10:08 UTC (rev 13153)
+++ DART/branches/mizzi/models/wrf_chem/run_scripts/RUN_PERT_CHEM/EMISS_PERT/work/mkmf_perturb_chem_emiss_CORR_RT_MA	2019-05-02 23:08:09 UTC (rev 13154)
@@ -1,14 +1,63 @@
 #!/bin/csh
 #
-# DART software - Copyright © 2004 - 2010 UCAR. This open source software is
-# provided by UCAR, "as is", without charge, subject to all terms of use at
+# DART software - Copyright UCAR. This open source software is provided
+# by UCAR, "as is", without charge, subject to all terms of use at
 # http://www.image.ucar.edu/DAReS/DART/DART_download
 #
 # DART $Id$
+#
+# usage: mkmf_perturb_chem_emiss_CORR_RT_MA [ -mpi | -nompi ]
+#
+# without any args (or with -nompi), builds without mpi libraries, and it will run
+# as a serial executable. if -mpi is given, it will be compiled with the mpi
+# libraries and can run with multiple cooperating processes.
 
-../../../../../../mkmf/mkmf -p perturb_chem_emiss_CORR_RT_MA.exe -t ../../../../../../mkmf/mkmf.template \
- -a "../../../../../.." path_names_perturb_chem_emiss_CORR_RT_MA
+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_perturb_chem_emiss_CORR_RT_MA: $argv[1]"
+    echo "Usage: mkmf_perturb_chem_emiss_CORR_RT_MA [ -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.
+
+set pathFile = path_names_perturb_chem_emiss_CORR_RT_MA
+
+cp -f ${pathFile} ${pathFile}.back
+
+if ( $usingmpi ) then
+
+  echo "Makefile uses MPI version of code."
+  sed -e 's;/perturb_chem_emiss_CORR_RT_MA;/perturb_chem_emiss_CORR_RT_MA_MPI;' ${pathFile}.back >! ${pathFile}
+  setenv wrapper_arg -w
+  set EXENAME = perturb_chem_emiss_CORR_RT_MA_MPI.exe
+
+else
+
+  echo "Makefile uses serial version of code."
+  sed -e 's;/perturb_chem_emiss_CORR_RT_MA_MPI;/perturb_chem_emiss_CORR_RT_MA;' ${pathFile}.back >! ${pathFile}
+  setenv wrapper_arg ""
+  set EXENAME = perturb_chem_emiss_CORR_RT_MA.exe
+
+endif
+
+# remove temp file and now really call mkmf to generate makefile
+rm -f ${pathFile}.back
+
+    ../../../../../../mkmf/mkmf -p ${EXENAME} \
+-t  ../../../../../../mkmf/mkmf.template \
+-a "../../../../../.." ${wrapper_arg} ${pathFile}
+
 exit $status
 
 # <next few lines under version control, do not edit>

Deleted: DART/branches/mizzi/models/wrf_chem/run_scripts/RUN_PERT_CHEM/EMISS_PERT/work/mpi_mkmf_perturb_chem_emiss_CORR_RT_MA_MPI
===================================================================
--- DART/branches/mizzi/models/wrf_chem/run_scripts/RUN_PERT_CHEM/EMISS_PERT/work/mpi_mkmf_perturb_chem_emiss_CORR_RT_MA_MPI	2019-05-02 22:10:08 UTC (rev 13153)
+++ DART/branches/mizzi/models/wrf_chem/run_scripts/RUN_PERT_CHEM/EMISS_PERT/work/mpi_mkmf_perturb_chem_emiss_CORR_RT_MA_MPI	2019-05-02 23:08:09 UTC (rev 13154)
@@ -1,24 +0,0 @@
-#!/bin/csh
-#
-# DART software - Copyright © 2004 - 2010 UCAR. This open source software is
-# provided by UCAR, "as is", without charge, subject to all terms of use at
-# http://www.image.ucar.edu/DAReS/DART/DART_download
-#
-# DART $Id$
-


More information about the Dart-dev mailing list