Repository: ESMCI/cime

Issue:
scripts_regression_tests smoke test error
On the new master on Hobart (919aee366a64d9e169ffc9755107bd8f9568d943)
` /scratch/cluster/goldy/scripts_regression_test.20170731_182937/SMS_D_Ln9.f19_g16_rx1.A.hobart_intel.fake_testing_only_20170731_190827/TestStatus.log`
```
 Invalid PIO rearranger comm max pend req (comp2io),            0
 Resetting PIO rearranger comm max pend req (comp2io) to           64
 PIO rearranger options:
   comm type     =
 p2p                                                                            
  
   comm fcd      =
 2denable                                                                       
  
   max pend req (comp2io)  =           0
   enable_hs (comp2io)     = T
   enable_isend (comp2io)  = F
   max pend req (io2comp)  =          64
   enable_hs (io2comp)    = F
   enable_isend (io2comp)  = T
forrtl: severe (194): Run-Time Check Failure. The variable 'shr_pio_mod_mp_shr_p
io_init1_$PIO_NETCDF_IOFORMAT' is being used in '/home/goldy/Projects/cime/src/s
hare/util/shr_pio_mod.F90(109,8)' without being defined
Image              PC                Routine            Line        Source      
       
cesm.exe           0000000000CD283B  shr_pio_mod_mp_sh         109  shr_pio_mod.
F90
cesm.exe           000000000040C1E9  cime_comp_mod_mp_         606  cime_comp_mo
d.F90
cesm.exe           000000000044C9EB  MAIN__                     37  cime_driver.
F90
cesm.exe           000000000040BFCE  Unknown               Unknown  Unknown
libc.so.6          00007FDF3393BB15  Unknown               Unknown  Unknown
cesm.exe           000000000040BED9  Unknown               Unknown  Unknown
```


Discussion:

Resolving patch:
diff --git a/scripts/lib/CIME/XML/env_batch.py b/scripts/lib/CIME/XML/env_batch.py
--- a/scripts/lib/CIME/XML/env_batch.py
+++ b/scripts/lib/CIME/XML/env_batch.py
@@ -572,8 +572,8 @@ def get_status(self, jobid):
 
             cmd += jobid
 
-            stat, out, err = run_cmd(cmd)
-            if stat != 0:
+            status, out, err = run_cmd(cmd)
+            if status != 0:
                 logger.warning("Batch query command '{}' failed with error '{}'".format(cmd, err))
             else:
                 return out.strip()


Test patch:
diff --git a/src/drivers/mct/unit_test/check_fields_test/test_check_fields.pf b/src/drivers/mct/unit_test/check_fields_test/test_check_fields.pf
--- a/src/drivers/mct/unit_test/check_fields_test/test_check_fields.pf
+++ b/src/drivers/mct/unit_test/check_fields_test/test_check_fields.pf
@@ -59,7 +59,7 @@ contains
     call create_gsmap(this%comp%gsmap_cc, lsize)
 
     call check_fields(this%comp, 1)
-    @assertExceptionRaised('ABORTED:  component_mod:check_fields NaN found in pfunittest instance:            1  field foo 1d global index:            3')
+    @assertExceptionRaised('ABORTED: component_mod:check_fields NaN found in pfunittest instance:    1 field foo 1d global index:        3')
 
   end subroutine createAVectWithoutData_1Field_checkField
 
@@ -93,7 +93,7 @@ contains
 
     call check_fields(this%comp, 1)
 
-    @assertExceptionRaised('ABORTED:  component_mod:check_fields NaN found in pfunittest instance:            1  field foo2 1d global index:            3')
+    @assertExceptionRaised('ABORTED: component_mod:check_fields NaN found in pfunittest instance:    1 field foo2 1d global index:        3')
   end subroutine createAVectWithoutData_3Field_checkFields
 
 end module test_check_fields