Repository: ESMCI/cime

Issue:
ERI test cases cannot be re-run
```
./create_test ERI.f45_g37.X
* wait till completes *
cd $casedir
./case.submit
* wait till fails *
```

Error:  ERROR: (seq_infodata_Init) :: rpointer file read returns an error condition


Discussion:
Correction: It looks like ERR and ERS also do not work.
These additional problems were exposed when  #1014 was fixed.

Resolving patch:
diff --git a/utils/python/CIME/SystemTests/ers.py b/utils/python/CIME/SystemTests/ers.py
--- a/utils/python/CIME/SystemTests/ers.py
+++ b/utils/python/CIME/SystemTests/ers.py
@@ -17,17 +17,9 @@ def __init__(self, case):
     def _ers_first_phase(self):
         stop_n      = self._case.get_value("STOP_N")
         stop_option = self._case.get_value("STOP_OPTION")
+        rest_n      = self._case.get_value("REST_N")
         expect(stop_n > 0, "Bad STOP_N: %d" % stop_n)
 
-        # Move to config_tests.xml once that's ready
-        rest_n = stop_n/2 + 1
-        self._case.set_value("REST_N", rest_n)
-        self._case.set_value("REST_OPTION", stop_option)
-        self._case.set_value("HIST_N", stop_n)
-        self._case.set_value("HIST_OPTION", stop_option)
-        self._case.set_value("CONTINUE_RUN", False)
-        self._case.flush()
-
         expect(stop_n > 2, "ERROR: stop_n value %d too short"%stop_n)
         logger.info("doing an %s %s initial test with restart file at %s %s"
                     %(str(stop_n), stop_option, str(rest_n), stop_option))
diff --git a/utils/python/CIME/XML/namelist_definition.py b/utils/python/CIME/XML/namelist_definition.py
--- a/utils/python/CIME/XML/namelist_definition.py
+++ b/utils/python/CIME/XML/namelist_definition.py
@@ -19,7 +19,6 @@
 from CIME.XML.standard_module_setup import *
 from CIME.XML.entry_id import EntryID
 from CIME.XML.files import Files
-from CIME.utils import get_cime_root
 
 logger = logging.getLogger(__name__)
 


Test patch:
diff --git a/cime_config/config_tests.xml b/cime_config/config_tests.xml
--- a/cime_config/config_tests.xml
+++ b/cime_config/config_tests.xml
@@ -201,6 +201,10 @@ LII    CLM initial condition interpolation test
     <INFO_DBUG>1</INFO_DBUG>
     <STOP_OPTION>ndays</STOP_OPTION>
     <STOP_N>11</STOP_N>
+    <REST_N>$STOP_N / 2 + 1</REST_N>
+    <REST_OPTION>$STOP_OPTION</REST_OPTION>
+    <HIST_N>$STOP_N</HIST_N>
+    <HIST_OPTION>$STOP_OPTION</HIST_OPTION>
     <DOUT_S>FALSE</DOUT_S>
     <CONTINUE_RUN>FALSE</CONTINUE_RUN>
   </test>
@@ -219,6 +223,10 @@ LII    CLM initial condition interpolation test
     <INFO_DBUG>1</INFO_DBUG>
     <STOP_OPTION>ndays</STOP_OPTION>
     <STOP_N>7</STOP_N>
+    <REST_N>$STOP_N / 2 + 1</REST_N>
+    <REST_OPTION>$STOP_OPTION</REST_OPTION>
+    <HIST_N>$STOP_N</HIST_N>
+    <HIST_OPTION>$STOP_OPTION</HIST_OPTION>
     <DOUT_S>TRUE</DOUT_S>
     <RESUBMIT>1</RESUBMIT>
   </test>
diff --git a/utils/python/tests/scripts_regression_tests.py b/utils/python/tests/scripts_regression_tests.py
--- a/utils/python/tests/scripts_regression_tests.py
+++ b/utils/python/tests/scripts_regression_tests.py
@@ -1113,7 +1113,7 @@ def test_full_system(self):
         # Test that re-running works
         tests = update_acme_tests.get_test_suite("cime_developer")
         for test in tests:
-            if test.startswith("ERI") or test.startswith("ERS") or test.startswith("ERR"):
+            if test.startswith("ERI"):
                 # TODO: these need to all work in the future but currently do not support re-run
                 pass
             else: