Exemplo n.º 1
0
    def __init__(self, config, channel=None):
        ''' Initialize the Condor class

        Args:
             - Config (dict): Dictionary with all the config options.

        KWargs:
             - Channel (none): A channel is required for htcondor.
        '''

        self.channel = channel
        if self.channel == None:
            logger.error(
                "Provider:Condor cannot be initialized without a channel")
            raise (ep_error.ChannelRequired(
                self.__class__.__name__,
                "Missing a channel to execute commands"))

        self.config = config
        self.sitename = config['site']
        self.current_blocksize = 0

        self.max_walltime = wtime_to_minutes(
            self.config["execution"]["block"].get("walltime", '01:00:00'))

        if not os.path.exists(self.config["execution"].get(
                "scriptDir", '.scripts')):
            os.makedirs(self.config["execution"]["scriptDir"])

        # Dictionary that keeps track of jobs, keyed on job_id
        self.resources = {}
Exemplo n.º 2
0
    def __init__(self, config, channel=None):
        ''' Here we do initialization that is common across all cluster-style providers

        Args:
             - Config (dict): Dictionary with all the config options.

        KWargs:
             - Channel (None): A channel is required for all cluster-style providers
        '''
        self._scaling_enabled = True
        self._channels_required = True
        self.channel = channel
        if self.channel is None:
            logger.error("Provider: Cannot be initialized without a channel")
            raise (ep_error.ChannelRequired(
                self.__class__.__name__,
                "Missing a channel to execute commands"))
        self.config = config
        self.sitename = config['site']
        self.current_blocksize = 0
        launcher_name = self.config["execution"]["block"].get(
            "launcher", "singleNode")
        self.launcher = Launchers.get(launcher_name, None)
        self.max_walltime = wtime_to_minutes(
            self.config["execution"]["block"].get("walltime", '01:00:00'))

        self.scriptDir = self.config["execution"]["scriptDir"]
        if not os.path.exists(self.scriptDir):
            os.makedirs(self.scriptDir)

        # Dictionary that keeps track of jobs, keyed on job_id
        self.resources = {}
Exemplo n.º 3
0
    def __init__(self, config):
        ''' Initialize the Cobalt class

        Args:
             - Config (dict): Dictionary with all the config options.
        '''

        self.config = config
        self.sitename = config['site']
        self.current_blocksize = 0

        self.max_walltime = wtime_to_minutes(
            self.config["execution"]["options"].get("max_walltime",
                                                    '01:00:00'))

        if not os.path.exists(self.config["execution"]["options"].get(
                "submit_script_dir", '.scripts')):
            os.makedirs(
                self.config["execution"]["options"]["submit_script_dir"])

        # Dictionary that keeps track of jobs, keyed on job_id
        self.resources = {}