Repository: ESMCI/cime

Issue:
DAE.ww3a.ADWAV test hangs on anlworkstation using PIO2
This is a confirmed regression caused by PR #3101, which turns off USE_MALLOC in PIO2 build.
While we will try to fix this issue in PIO2, it is recommended to turn on USE_MALLOC by default.


Discussion:
@jayeshkrishna
The test does not hang with NCAR's PIO2, so we need to check E3SM's PIO2 fork.
Maybe this should go as an issue in E3SM fork

Resolving patch:
diff --git a/scripts/lib/CIME/case/case_submit.py b/scripts/lib/CIME/case/case_submit.py
--- a/scripts/lib/CIME/case/case_submit.py
+++ b/scripts/lib/CIME/case/case_submit.py
@@ -56,8 +56,9 @@ def _submit(case, job=None, no_batch=False, prereq=None, allow_fail=False, resub
     # flag will stay in effect for the duration of the RESUBMITs
     env_batch = case.get_env("batch")
     external_workflow = case.get_value("EXTERNAL_WORKFLOW")
-    if resubmit and env_batch.get_batch_system_type() == "none" or external_workflow:
+    if env_batch.get_batch_system_type() == "none" or resubmit and external_workflow:
         no_batch = True
+
     if no_batch:
         batch_system = "none"
     else:


Test patch:
diff --git a/config/e3sm/tests.py b/config/e3sm/tests.py
--- a/config/e3sm/tests.py
+++ b/config/e3sm/tests.py
@@ -43,6 +43,7 @@
             "SMS_R_Ld5.ne4_ne4.FSCM5A97",
             "SMS_D_Ln5.ne4_ne4.FC5AV1C-L",
             "SMS_Ln5.ne4pg2_ne4pg2.FC5AV1C-L",
+            "SMS_Ln5.ne4pg2_ne4pg2.FC5AV1C-L.cam-thetahy_pg2",
             )
         },
 
@@ -67,7 +68,7 @@
             "ERS_Ld31.ne4_ne4.FC5AV1C-L",
             "ERP_Lm3.ne4_ne4.FC5AV1C-L",
             "SMS_D_Ln5.ne30_ne30.FC5AV1C-L",
-            "ERP_Ln5.ne30_ne30.FC5AV1C-L",
+            "ERP_Ln7.ne30_ne30.FC5AV1C-L",
             "SMS_Ly1.ne4_ne4.FC5AV1C-L",
             )
         },
diff --git a/scripts/lib/CIME/SystemTests/system_tests_common.py b/scripts/lib/CIME/SystemTests/system_tests_common.py
--- a/scripts/lib/CIME/SystemTests/system_tests_common.py
+++ b/scripts/lib/CIME/SystemTests/system_tests_common.py
@@ -474,7 +474,7 @@ def _compare_throughput(self):
                         diff = (baseline - current)/baseline
                         tolerance = self._case.get_value("TEST_TPUT_TOLERANCE")
                         if tolerance is None:
-                            tolerance = 0.25
+                            tolerance = 0.1
                         expect(tolerance > 0.0, "Bad value for throughput tolerance in test")
                         if diff < tolerance and self._test_status.get_status(THROUGHPUT_PHASE) is None:
                             self._test_status.set_status(THROUGHPUT_PHASE, TEST_PASS_STATUS)
diff --git a/scripts/lib/CIME/compare_test_results.py b/scripts/lib/CIME/compare_test_results.py
--- a/scripts/lib/CIME/compare_test_results.py
+++ b/scripts/lib/CIME/compare_test_results.py
@@ -58,7 +58,7 @@ def compare_test_results(baseline_name, baseline_root, test_root, compiler, test
     Returns True if all tests generated either PASS or SKIP results, False if
     there was at least one FAIL result.
     """
-    test_id_glob = "*{}*".format(compiler) if test_id is None else "*{}".format(test_id)
+    test_id_glob = "*{}*".format(compiler) if test_id is None else "*{}*".format(test_id)
     test_status_files = glob.glob("{}/{}/{}".format(test_root, test_id_glob, TEST_STATUS_FILENAME))
     expect(test_status_files, "No matching test cases found in for {}/{}/{}".format(test_root, test_id_glob, TEST_STATUS_FILENAME))