Esempio n. 1
0
    def configure(self, cfg_params):
        SchedulerLocal.configure(self, cfg_params)
        self.outputDir = cfg_params.get('USER.outputdir' ,common.work_space.resDir())
        self.res = cfg_params.get(self.name().upper()+'.resource','"type==SLC5_64 || type==SLC6_64"')

        self.pool = cfg_params.get('USER.storage_pool',None)
        return
Esempio n. 2
0
    def configure(self, cfg_params):
        """
        Configure the scheduler with the config settings from the user
        """

        SchedulerLocal.configure(self, cfg_params)

        self.proxyValid=0
        self.dontCheckProxy=int(cfg_params.get("GRID.dont_check_proxy",0))
        self.space_token = cfg_params.get("USER.space_token",None)
        self.proxyServer= 'myproxy.cern.ch'
        self.group = cfg_params.get("GRID.group", None)
        self.role = cfg_params.get("GRID.role", None)
        self.VO = cfg_params.get('GRID.virtual_organization','cms')

        try:
            tmp =  cfg_params['CMSSW.datasetpath']
            if tmp.lower() == 'none':
                self.datasetPath = None
                self.selectNoInput = 1
            else:
                self.datasetPath = tmp
                self.selectNoInput = 0
        except KeyError:
            msg = "Error: datasetpath not defined "
            raise CrabException(msg)

        self.checkProxy()

        return
Esempio n. 3
0
    def __init__(self):
        SchedulerLocal.__init__(self,"CONDOR")
        self.datasetPath   = None
        self.selectNoInput = None
        self.OSBsize = None

        self.environment_unique_identifier = None
        return
Esempio n. 4
0
    def __init__(self):
        SchedulerLocal.__init__(self, "CONDOR")
        self.datasetPath = None
        self.selectNoInput = None
        self.OSBsize = None

        self.environment_unique_identifier = None
        return
Esempio n. 5
0
    def configure(self, cfg_params):
        SchedulerLocal.configure(self, cfg_params)
        if "PBS.queue" in cfg_params:
            if len(cfg_params["PBS.queue"]) == 0 or cfg_params["PBS.queue"] == "default":
                common.logger.info(" The default queue of local PBS configuration will be used")
        else:
            common.logger.info(" The default queue of local PBS configuration will be used")

        return
Esempio n. 6
0
    def configure(self, cfg_params):
        SchedulerLocal.configure(self, cfg_params)
        self.outputDir = cfg_params.get('USER.outputdir',
                                        common.work_space.resDir())
        self.res = cfg_params.get(self.name().upper() + '.resource',
                                  '"type==SLC5_64 || type==SLC4_64"')

        self.pool = cfg_params.get('USER.storage_pool', None)
        return
Esempio n. 7
0
    def configure(self, cfg_params):
        SchedulerLocal.configure(self, cfg_params)
        if "PBS.queue" in cfg_params:
            if len(cfg_params["PBS.queue"]
                   ) == 0 or cfg_params["PBS.queue"] == "default":
                common.logger.info(
                    " The default queue of local PBS configuration will be used"
                )
        else:
            common.logger.info(
                " The default queue of local PBS configuration will be used")

        return
Esempio n. 8
0
    def configure(self, cfg_params):
        SchedulerLocal.configure(self, cfg_params)

        try:
            tmp = cfg_params['CMSSW.datasetpath']
            if tmp.lower() == 'none':
                self.datasetPath = None
                self.selectNoInput = 1
            else:
                self.datasetPath = tmp
                self.selectNoInput = 0
        except KeyError:
            msg = "Error: datasetpath not defined "
            raise CrabException(msg)

        self.pool = cfg_params.get('USER.storage_pool', None)
        return
Esempio n. 9
0
    def configure(self, cfg_params):
        self.use_proxy = 0
        SchedulerLocal.configure(self, cfg_params)
        queueConfigName = "%s.queue" % self.name().upper()
        if queueConfigName in cfg_params:
            if len(cfg_params[queueConfigName]
                   ) == 0 or cfg_params[queueConfigName] == "default":
                common.logger.info(
                    " The default queue of local PBS configuration will be used"
                )
        else:
            common.logger.info(
                " The default queue of local PBS configuration will be used")

        self.proxyValid = 0
        self.dontCheckProxy = int(cfg_params.get("GRID.dont_check_proxy", 0))
        self.space_token = cfg_params.get("USER.space_token", None)
        self.proxyServer = 'myproxy.cern.ch'
        self.group = cfg_params.get("GRID.group", None)
        self.role = cfg_params.get("GRID.role", None)
        self.VO = cfg_params.get('GRID.virtual_organization', 'cms')
        self.OSBsize = 0
        try:
            tmp = cfg_params['CMSSW.datasetpath']
            if tmp.lower() == 'none':
                self.datasetPath = None
                self.selectNoInput = 1
            else:
                self.datasetPath = tmp
                self.selectNoInput = 0
        except KeyError:
            msg = "Error: datasetpath not defined "
            raise CrabException(msg)

        if int(cfg_params.get(self.name().upper() + '.use_proxy', 1)):
            common.logger.info("Using a proxy")
            self.use_proxy = 1
            self.dontCheckProxy = 0
        else:
            common.logger.info("Not using a proxy")
            self.dontCheckProxy = 1
            self.use_proxy = 0
            self.dontCheckMyProxy = 1

        if self.use_proxy:
            self.checkProxy()
Esempio n. 10
0
    def configure(self, cfg_params):
        SchedulerLocal.configure(self, cfg_params)

        try:
            tmp =  cfg_params['CMSSW.datasetpath']
            if tmp.lower() == 'none':
                self.datasetPath = None
                self.selectNoInput = 1
            else:
                self.datasetPath = tmp
                self.selectNoInput = 0
        except KeyError:
            msg = "Error: datasetpath not defined "
            raise CrabException(msg)

        self.pool = cfg_params.get('USER.storage_pool',None)
        return
Esempio n. 11
0
 def wsSetupEnvironment(self):
     """
     Returns part of a job script which does scheduler-specific work.
     """
     txt = SchedulerLocal.wsSetupEnvironment(self)
     #this is needed to support slc4->slc5 migration
     txt += 'export RFIO_PORT=5001\n'
     txt += '\n'
     return txt
Esempio n. 12
0
 def wsSetupEnvironment(self):
     """
     Returns part of a job script which does scheduler-specific work.
     """
     txt = SchedulerLocal.wsSetupEnvironment(self)
     #this is needed to support slc4->slc5 migration
     txt += 'export RFIO_PORT=5001\n'
     txt += '\n'
     return txt
Esempio n. 13
0
    def configure(self, cfg_params):
        """
        Configure the scheduler with the config settings from the user
        """

        SchedulerLocal.configure(self, cfg_params)

        self.proxyValid=0
        self.dontCheckProxy=int(cfg_params.get("GRID.dont_check_proxy",0))
        self.space_token = cfg_params.get("USER.space_token",None)
        try:
            self.proxyServer = Downloader("http://cmsdoc.cern.ch/cms/LCG/crab/config/").config("myproxy_server.conf")
            self.proxyServer = self.proxyServer.strip()
            if self.proxyServer is None:
                raise CrabException("myproxy_server.conf retrieved but empty")
        except Exception, e:
            common.logger.info("Problem setting myproxy server endpoint: using myproxy.cern.ch")
            common.logger.debug(e)
            self.proxyServer= 'myproxy.cern.ch'
Esempio n. 14
0
    def configure(self, cfg_params):
        self.use_proxy = 0
        SchedulerLocal.configure(self, cfg_params)
        queueConfigName = "%s.queue" % self.name().upper()
        if queueConfigName in cfg_params:
            if len(cfg_params[queueConfigName]) == 0 or cfg_params[queueConfigName] == "default":
                common.logger.info(" The default queue of local SLURM configuration will be used")
        else:
            common.logger.info(" The default queue of local SLURM configuration will be used")

        self.proxyValid=0
        self.dontCheckProxy=int(cfg_params.get("GRID.dont_check_proxy",0))
        self.space_token = cfg_params.get("USER.space_token",None)
        self.proxyServer= 'myproxy.cern.ch'
        self.group = cfg_params.get("GRID.group", None)
        self.role = cfg_params.get("GRID.role", None)
        self.VO = cfg_params.get('GRID.virtual_organization','cms')
        self.OSBsize = 0
        try:
            tmp =  cfg_params['CMSSW.datasetpath']
            if tmp.lower() == 'none':
                self.datasetPath = None
                self.selectNoInput = 1
            else:
                self.datasetPath = tmp
                self.selectNoInput = 0
        except KeyError:
            msg = "Error: datasetpath not defined "
            raise CrabException(msg)

        if int(cfg_params.get(self.name().upper() + '.use_proxy',1)):
            common.logger.info("Using a proxy")
            self.use_proxy = 1
            self.dontCheckProxy = 0
        else:
            common.logger.info("Not using a proxy")
            self.dontCheckProxy = 1
            self.use_proxy = 0
            self.dontCheckMyProxy = 1

        if self.use_proxy:
            self.checkProxy()
Esempio n. 15
0
    def configure(self, cfg_params):
        SchedulerLocal.configure(self, cfg_params)
        queueConfigName = "%s.queue" % self.name().upper()
        if queueConfigName in cfg_params:
            if len(cfg_params[queueConfigNAme]) == 0 or cfg_params[queueConfigName] == "default":
                common.logger.info(" The default queue of local PBS configuration will be used")
        else:
            common.logger.info(" The default queue of local PBS configuration will be used")

        self.proxyValid = 0
        self.dontCheckProxy = int(cfg_params.get("GRID.dont_check_proxy", 0))
        self.space_token = cfg_params.get("USER.space_token", None)
        try:
            self.proxyServer = Downloader("http://cmsdoc.cern.ch/cms/LCG/crab/config/").config("myproxy_server.conf")
            self.proxyServer = self.proxyServer.strip()
            if self.proxyServer is None:
                raise CrabException("myproxy_server.conf retrieved but empty")
        except Exception, e:
            common.logger.info("Problem setting myproxy server endpoint: using myproxy.cern.ch")
            common.logger.debug(e)
            self.proxyServer = "myproxy.cern.ch"
Esempio n. 16
0
    def configure(self, cfg_params):
        """
        Configure the scheduler with the config settings from the user
        """

        SchedulerLocal.configure(self, cfg_params)

        self.proxyValid = 0
        self.dontCheckProxy = int(cfg_params.get("GRID.dont_check_proxy", 0))
        self.space_token = cfg_params.get("USER.space_token", None)
        try:
            self.proxyServer = Downloader(
                "http://cmsdoc.cern.ch/cms/LCG/crab/config/").config(
                    "myproxy_server.conf")
            self.proxyServer = self.proxyServer.strip()
            if self.proxyServer is None:
                raise CrabException("myproxy_server.conf retrieved but empty")
        except Exception, e:
            common.logger.info(
                "Problem setting myproxy server endpoint: using myproxy.cern.ch"
            )
            common.logger.debug(e)
            self.proxyServer = 'myproxy.cern.ch'
Esempio n. 17
0
    def wsExitFunc(self):
        """
        """
        txt = '\n'

        txt += '#\n'
        txt += '# EXECUTE THIS FUNCTION BEFORE EXIT \n'
        txt += '#\n\n'

        txt += 'func_exit() { \n'
        txt += SchedulerLocal.wsExitFunc_common(self)

        txt += '    cp *.${LSB_BATCH_JID}.out CMSSW_${NJob}.stdout \n'
        txt += '    cp *.${LSB_BATCH_JID}.err CMSSW_${NJob}.stderr \n'
        txt += '    tar zcvf ${out_files}.tgz  ${filesToCheck}\n'
        txt += '    exit $job_exit_code\n'
        txt += '}\n'

        return txt
Esempio n. 18
0
    def wsExitFunc(self):
        """
        """
        txt = '\n'

        txt += '#\n'
        txt += '# EXECUTE THIS FUNCTION BEFORE EXIT \n'
        txt += '#\n\n'

        txt += 'func_exit() { \n'
        txt += SchedulerLocal.wsExitFunc_common(self)

        txt += '    cp *.${LSB_BATCH_JID}.out CMSSW_${NJob}.stdout \n'
        txt += '    cp *.${LSB_BATCH_JID}.err CMSSW_${NJob}.stderr \n'
        txt += '    tar zcvf ${out_files}.tgz  ${filesToCheck}\n'
        txt += '    exit $job_exit_code\n'
        txt += '}\n'

        return txt