Repository: ESMCI/cime

Issue:
Fix bug in generic env load
Just skip any leading output that's not associated with any environment variables.

Test suite: by-hand
Test baseline: 
Test namelist changes: 
Test status: bit for bit

Fixes #2263 

User interface changes?: N

Update gh-pages html (Y/N)?: N

Code review: @jedwards4b 

Turn off XML file caching in test scheduler
Turn off XML file caching in test scheduler
    
The implementation is inherently thread-unsafe since the data
structure that does the caching is shared by all GenericXML
objects.

When I first tested a full acme suite without this fix, the result was complete disaster.


Discussion:

Resolving patch:
diff --git a/scripts/lib/CIME/case/case.py b/scripts/lib/CIME/case/case.py
--- a/scripts/lib/CIME/case/case.py
+++ b/scripts/lib/CIME/case/case.py
@@ -1259,7 +1259,7 @@ def get_mpirun_cmd(self, job=None, allow_unresolved_envvars=True):
         if executable is not None and "aprun" in executable and not "theta" in self.get_value("MACH"):
             aprun_args, num_nodes = get_aprun_cmd_for_case(self, run_exe)[0:2]
             expect( (num_nodes + self.spare_nodes) == self.num_nodes, "Not using optimized num nodes")
-            return executable + aprun_args + " " + run_misc_suffix
+            return self.get_resolved_value(executable + aprun_args + " " + run_misc_suffix, allow_unresolved_envvars=allow_unresolved_envvars)
 
         else:
             mpi_arg_string = " ".join(mpi_arg_list)


Test patch:
diff --git a/scripts/lib/CIME/test_scheduler.py b/scripts/lib/CIME/test_scheduler.py
--- a/scripts/lib/CIME/test_scheduler.py
+++ b/scripts/lib/CIME/test_scheduler.py
@@ -384,7 +384,7 @@ def _shell_cmd_for_phase(self, test, cmd, phase, from_dir=None):
             if rc != 0:
                 self._log_output(test,
                                  "{} FAILED for test '{}'.\nCommand: {}\nOutput: {}\n".
-                                 format(phase, test, cmd, 
+                                 format(phase, test, cmd,
                                         output.encode('utf-8') + b"\n" + errput.encode('utf-8')))
                 # Temporary hack to get around odd file descriptor use by
                 # buildnml scripts.
@@ -399,7 +399,7 @@ def _shell_cmd_for_phase(self, test, cmd, phase, from_dir=None):
                 phase = "SUBMIT" if phase == RUN_PHASE else phase
                 self._log_output(test,
                                  "{} PASSED for test '{}'.\nCommand: {}\nOutput: {}\n".
-                                 format(phase, test, cmd, 
+                                 format(phase, test, cmd,
                                         output.encode('utf-8') + b"\n" + errput.encode('utf-8')))
                 return True, errput
 
@@ -430,11 +430,7 @@ def _create_newcase_phase(self, test):
 
         if test_mods is not None:
             files = Files()
-            if self._cime_model == "e3sm":
-                component = "allactive"
-                modspath = test_mods
-            else:
-                (component, modspath) = test_mods.split('/',1)
+            (component, modspath) = test_mods.split('/',1)
 
             testmods_dir = files.get_value("TESTS_MODS_DIR", {"component": component})
             test_mod_file = os.path.join(testmods_dir, component, modspath)
diff --git a/scripts/lib/update_e3sm_tests.py b/scripts/lib/update_e3sm_tests.py
--- a/scripts/lib/update_e3sm_tests.py
+++ b/scripts/lib/update_e3sm_tests.py
@@ -61,26 +61,22 @@
     # ACME tests below
     #
 
-    "e3sm_runoff_developer" : (None, "0:45:00",
-                             ("ERS.f19_f19.IM1850CLM45CN",
-                              "ERS.f19_f19.IMCLM45")
-                             ),
-
-    "e3sm_land_developer" : ("e3sm_runoff_developer", "0:45:00",
-                             ("ERS.f19_f19.I1850CLM45CN",
+    "e3sm_land_developer" : (None, "0:45:00",
+                             ("ERS.f19_f19.ICLM45",
+                              "ERS.f19_f19.I1850CLM45CN",
                               "ERS.f09_g16.I1850CLM45CN",
                               "ERS.f19_f19.I20TRCLM45CN",
                               "SMS_Ld1.hcru_hcru.I1850CRUCLM45CN",
                              ("ERS.f19_g16.I1850CNECACNTBC" ,"clm-eca"),
                              ("ERS.f19_g16.I1850CNECACTCBC" ,"clm-eca"),
-                             ("SMS_Ly2_P1x1.1x1_smallvilleIA.ICLM45CNCROP", "force_netcdf_pio"),
+                             ("SMS_Ly2_P1x1.1x1_smallvilleIA.ICLM45CNCROP", "clm-force_netcdf_pio"),
                              ("ERS_Ld3.f45_f45.ICLM45ED","clm-fates"),
                              ("ERS.f19_g16.I1850CLM45","clm-betr"),
                              ("ERS.f19_g16.I1850CLM45","clm-vst"),
                              ("ERS.f09_g16.I1850CLM45CN","clm-bgcinterface"),
                               "ERS.ne11_oQU240.I20TRCLM45",
                              ("ERS.f19_g16.I1850CNRDCTCBC","clm-rd"),
-                              "ERS.f09_g16.IMCLM45BC")
+                              "ERS.f09_g16.ICLM45BC")
                              ),
 
     "e3sm_atm_developer" : (None, None,
@@ -95,7 +91,7 @@
     "e3sm_atm_integration" : (None, None,
                               ("ERS_Ln9.ne4_ne4.FC5" ,
                                "ERP_Ln9.ne4_ne4.FC5AV1C-L-AQUAP",
-                               ("PET_Ln5.ne4_ne4.FC5AV1C-L","mach-pet"),
+                               ("PET_Ln5.ne4_ne4.FC5AV1C-L","allactive-mach-pet"),
                                "PEM_Ln5.ne4_ne4.FC5AV1C-L",
                                ("SMS_D_Ln5.ne4_ne4.FC5AV1C-L", "cam-cosplite_nhtfrq5"),
                                "REP_Ln5.ne4_ne4.FC5AV1C-L")
@@ -122,15 +118,9 @@
 
     "e3sm_developer" : (("e3sm_land_developer","e3sm_atm_developer"), "0:45:00",
                         ("ERS.f19_g16_rx1.A",
-                         "ERS.f45_g37_rx1.DTEST",
                          "ERS.ne30_g16_rx1.A",
-                         "ERS_IOP.f19_g16_rx1.A",
-                         "ERS_IOP.f45_g37_rx1.DTEST",
-                         "ERS_IOP.ne30_g16_rx1.A",
-                         "ERS_IOP4c.f19_g16_rx1.A",
-                         "ERS_IOP4c.ne30_g16_rx1.A",
-                         "ERS_IOP4p.f19_g16_rx1.A",
-                         "ERS_IOP4p.ne30_g16_rx1.A",
+                         "SEQ.f19_g16.X",
+                         "ERIO.ne30_g16_rx1.A",
                          "HOMME_P24.f19_g16_rx1.A",
                          "NCK.f19_g16_rx1.A",
                          "SMS.ne30_f19_g16_rx1.A",
@@ -138,20 +128,19 @@
                          "ERS.f09_g16_g.MPASLISIA",
                          "SMS.T62_oQU120_ais20.MPAS_LISIO_TEST",
                          "SMS.f09_g16_a.IGCLM45_MLI"
-                        ,("SMS_P12x2.ne4_oQU240.A_WCYCL1850","mach_mods")
+                        ,("SMS_P12x2.ne4_oQU240.A_WCYCL1850","allactive-mach_mods")
                         )),
 
     "e3sm_integration" : (("e3sm_developer", "e3sm_atm_integration"),"03:00:00",
                           ("ERS.ne11_oQU240.A_WCYCL1850",
-		           ("SMS_D_Ld1.ne30_oECv3_ICG.A_WCYCL1850S_CMIP6","v1cmip6"),
+		           ("SMS_D_Ld1.ne30_oECv3_ICG.A_WCYCL1850S_CMIP6","allactive-v1cmip6"),
                            "ERS_Ln9.ne4_ne4.FC5AV1C-L",
                           #"ERT_Ld31.ne16_g37.B1850C5",#add this line back in with the new correct compset
-                           ("PET.f19_g16.X","mach-pet"),
-                           ("PET.f45_g37_rx1.A","mach-pet"),
-                           ("PET_Ln9_PS.ne30_oECv3_ICG.A_WCYCL1850S","mach-pet"),
+                           ("PET.f19_g16.X","allactive-mach-pet"),
+                           ("PET.f45_g37_rx1.A","allactive-mach-pet"),
+                           ("PET_Ln9_PS.ne30_oECv3_ICG.A_WCYCL1850S","allactive-mach-pet"),
                            "PEM_Ln9.ne30_oECv3_ICG.A_WCYCL1850S",
                            "ERP_Ld3.ne30_oECv3_ICG.A_WCYCL1850S",
-                           "SEQ_IOP.f19_g16.X",
                            "SMS.f09_g16_a.MPASLIALB",
                            "SMS_D_Ln5.conusx4v1_conusx4v1.FC5AV1C-L",
 			   ("SMS.ne30_oECv3.BGCEXP_BCRC_CNPRDCTC_1850","clm-bgcexp"),
@@ -179,7 +168,7 @@
     #e3sm tests to mimic production runs
     "e3sm_prod" : (("e3sm_atm_prod",),None,
                      (
-		      ("SMS_Ld2.ne30_oECv3_ICG.A_WCYCL1850S_CMIP6","v1cmip6"),
+		      ("SMS_Ld2.ne30_oECv3_ICG.A_WCYCL1850S_CMIP6","allactive-v1cmip6"),
 		      )),
 
     "fates" : (None, None,