def __setstate__(self, state): try: self.logger.log(1, "restart: initializing base system class") BGBaseSystem.__setstate__(self, state) self.process_groups.item_cls = BGSimProcessGroup self.node_card_cache = dict() try: self.failed_components = state['failed_components'] except KeyError: self.failed_components = set() try: self.config_file = state['config_file'] except KeyError: self.config_file = os.path.expandvars(get_config_option('system', 'def_file', "")) if self.config_file: self.logger.log(1, "restart: loading machine configuration") self.configure(self.config_file) self.logger.log(1, "restart: restoring partition state") self._restore_partition_state(state) self.logger.log(1, "restart: recomputing partition state") self._recompute_partition_state() except: self.logger.error("A fatal error occurred while restarting the system component", exc_info=True) print "A fatal error occurred while restarting the system component. Terminating." sys.exit(1)
def __init__(self, *args, **kwargs): BGBaseSystem.__init__(self, *args, **kwargs) self.process_groups.item_cls = BGSimProcessGroup self.config_file = kwargs.get("config_file", None) self.failed_components = sets.Set() if self.config_file is not None: self.configure(self.config_file)
def __setstate__(self, state): try: self.logger.log(1, "restart: initializing base system class") BGBaseSystem.__setstate__(self, state) self.process_groups.item_cls = BGSimProcessGroup self.node_card_cache = dict() try: self.failed_components = state['failed_components'] except KeyError: self.failed_components = set() try: self.config_file = state['config_file'] except KeyError: self.config_file = os.path.expandvars( get_config_option('system', 'def_file', "")) if self.config_file: self.logger.log(1, "restart: loading machine configuration") self.configure(self.config_file) self.logger.log(1, "restart: restoring partition state") self._restore_partition_state(state) self.logger.log(1, "restart: recomputing partition state") self._recompute_partition_state() except: self.logger.error( "A fatal error occurred while restarting the system component", exc_info=True) print "A fatal error occurred while restarting the system component. Terminating." sys.exit(1)
def __init__ (self, *args, **kwargs): BGBaseSystem.__init__(self, *args, **kwargs) self.process_groups.item_cls = BGSimProcessGroup self.config_file = kwargs.get("config_file", None) self.failed_components = sets.Set() if self.config_file is not None: self.configure(self.config_file)
def __init__(self, *args, **kwargs): BGBaseSystem.__init__(self, *args, **kwargs) sys.setrecursionlimit(5000) self.process_groups.item_cls = BGProcessGroup self.diag_pids = dict() self.configure() # initiate the process before starting any threads thread.start_new_thread(self.update_partition_state, tuple())
def __setstate__(self, state): BGBaseSystem.__setstate__(self, state) self.config_file = state['config_file'] self.process_groups.item_cls = BGSimProcessGroup if self.config_file is not None: self.configure(self.config_file) self.update_relatives() self._restore_partition_state(state)
def __init__ (self, *args, **kwargs): BGBaseSystem.__init__(self, *args, **kwargs) sys.setrecursionlimit(5000) #why this magic number? self.process_groups.item_cls = BGSimProcessGroup self.config_file = kwargs.get("config_file", None) self.failed_components = set() if self.config_file is not None: self.configure(self.config_file)
def __init__ (self, *args, **kwargs): BGBaseSystem.__init__(self, *args, **kwargs) sys.setrecursionlimit(5000) self.process_groups.item_cls = BGProcessGroup self.diag_pids = dict() self.configure() # initiate the process before starting any threads thread.start_new_thread(self.update_partition_state, tuple())
def __init__(self, *args, **kwargs): BGBaseSystem.__init__(self, *args, **kwargs) sys.setrecursionlimit(5000) #why this magic number? self.process_groups.item_cls = BGSimProcessGroup self.config_file = kwargs.get("config_file", None) self.failed_components = set() if self.config_file is not None: self.configure(self.config_file)
def __setstate__(self, state): BGBaseSystem.__setstate__(self, state) self.process_groups.item_cls = BGProcessGroup self.configure() self.update_relatives() self._restore_partition_state(state) # initiate the process before starting any threads thread.start_new_thread(self.update_partition_state, tuple())
def __init__ (self, *args, **kwargs): BGBaseSystem.__init__(self, *args, **kwargs) sys.setrecursionlimit(5000) #why this magic number? self.process_groups.item_cls = BGSimProcessGroup self.node_card_cache = dict() self.failed_components = set() self.config_file = kwargs.get("config_file", get_config_option('bgsystem', 'system_def_file', None)) if self.config_file is not None: self.logger.log(1, "init: loading machine configuration") self.configure(self.config_file) self.logger.log(1, "init: recomputing partition state") self._recompute_partition_state()
def __init__(self, *args, **kwargs): BGBaseSystem.__init__(self, *args, **kwargs) sys.setrecursionlimit(5000) #why this magic number? self.process_groups.item_cls = BGSimProcessGroup self.node_card_cache = dict() self.failed_components = set() self.config_file = kwargs.get( "config_file", get_config_option('bgsystem', 'system_def_file', None)) if self.config_file is not None: self.logger.log(1, "init: loading machine configuration") self.configure(self.config_file) self.logger.log(1, "init: recomputing partition state") self._recompute_partition_state()
def __getstate__(self): state = {} state.update(BGBaseSystem.__getstate__(self)) state.update({ 'simulator_version':3, 'config_file':self.config_file}) return state
def __init__ (self, *args, **kwargs): BGBaseSystem.__init__(self, *args, **kwargs) sys.setrecursionlimit(5000) self.process_groups.item_cls = BGProcessGroup self.bp_cache = dict() self.node_card_cache = dict() self.wire_cache = dict() self.busted_switches = set() self.busted_wires = set() self.logger.debug("init: loading machine configuration") self.configure() self.logger.debug("init: recomputing partition state") self._recompute_partition_state() # initiate the process before starting any threads thread.start_new_thread(self.update_partition_state, tuple())
def __getstate__(self): state = {} state.update(BGBaseSystem.__getstate__(self)) state.update({ 'simulator_version':4, 'config_file':self.config_file, 'failed_components': self.failed_components}) return state
def __getstate__(self): state = {} state.update(BGBaseSystem.__getstate__(self)) state.update({ 'simulator_version': 4, 'config_file': self.config_file, 'failed_components': self.failed_components }) return state
def validate_job(self, spec): """validate a job for submission Arguments: spec -- job specification dictionary """ spec = BGBaseSystem.validate_job(self, spec) if not self._validate_kernel(spec['kernel']): raise JobValidationError("kernel does not exist") return spec
def __setstate__(self, state): try: BGBaseSystem.__setstate__(self, state) self.process_groups.item_cls = BGProcessGroup self.bp_cache = dict() self.node_card_cache = dict() self.wire_cache = dict() self.busted_switches = set() self.busted_wires = set() self.logger.debug("restart: loading machine configuration") self.configure() self.logger.debug("restart: restoring partition state") self._restore_partition_state(state) self.logger.debug("restart: recomputing partition state") self._recompute_partition_state() except: self.logger.error("A fatal error occurred while restarting the system component", exc_info=True) print "A fatal error occurred while restarting the system component. Terminating." sys.exit(1) # initiate the process before starting any threads thread.start_new_thread(self.update_partition_state, tuple())
def __getstate__(self): state = {} state.update(BGBaseSystem.__getstate__(self)) state.update({ 'bgsystem_version':3}) return state
def __getstate__(self): state = {} state.update(BGBaseSystem.__getstate__(self)) state.update({'bgsystem_version': 3}) return state
def __getstate__(self): state = {} state.update(BGBaseSystem.__getstate__(self)) state.update({'simulator_version': 3, 'config_file': self.config_file}) return state