EC wait_finished needs to wait for FINISHED, FAILED and STOPPED
authorAlina Quereilhac <alina.quereilhac@inria.fr>
Wed, 29 May 2013 13:11:47 +0000 (15:11 +0200)
committerAlina Quereilhac <alina.quereilhac@inria.fr>
Wed, 29 May 2013 13:11:47 +0000 (15:11 +0200)
src/nepi/execution/ec.py
src/nepi/execution/resource.py

index 90cf710..56839b5 100644 (file)
@@ -94,7 +94,9 @@ class ExperimentController(object):
         return self.ecstate in [ECState.FAILED, ECState.TERMINATED]
 
     def wait_finished(self, guids):
-        while not all([self.state(guid) == ResourceState.FINISHED \
+        while not all([self.state(guid) in [ResourceState.FINISHED, 
+            ResourceState.STOPPED, 
+            ResourceState.FAILED] \
                 for guid in guids]) and not self.finished:
             # We keep the sleep as large as possible to 
             # decrese the number of RM state requests
index f41b070..ecd47e4 100644 (file)
@@ -23,7 +23,7 @@ from nepi.execution.trace import TraceAttr
 
 import copy
 import functools
-import inspect
+import logging
 import os
 import pkgutil
 import weakref
@@ -614,6 +614,7 @@ def find_types():
                     types.append(attr)
         except:
             import traceback
+            import logging
             err = traceback.format_exc()
             logger = logging.getLogger("Resource.find_types()")
             logger.error("Error while lading Resource Managers %s" % err)