コード例 #1
0
ファイル: Executable.py プロジェクト: milliams/ganga
    def prepare(self, app, appconfig, appmasterconfig, jobmasterconfig):
        from Ganga.Lib.gLite import gLiteJobConfig

        prepared_exe = app.exe
        if app.is_prepared is not None:
            shared_path = os.path.join(expandfilename(getConfig('Configuration')['gangadir']),
                                       'shared', getConfig('Configuration')['user'])
            if isinstance(app.exe, str):
                # we have a file. is it an absolute path?
                if os.path.abspath(app.exe) == app.exe:
                    logger.info("Submitting a prepared application; taking any input files from %s" % (
                        app.is_prepared.name))
                    prepared_exe = File(os.path.join(os.path.join(
                        shared_path, app.is_prepared.name), os.path.basename(File(app.exe).name)))
                # else assume it's a system binary, so we don't need to
                # transport anything to the sharedir
                else:
                    prepared_exe = app.exe
            elif isinstance(app.exe, File):
                logger.info("Submitting a prepared application; taking any input files from %s" % (
                    app.is_prepared.name))
                prepared_exe = File(os.path.join(os.path.join(
                    shared_path, app.is_prepared.name), os.path.basename(File(app.exe).name)))

        return gLiteJobConfig(prepared_exe, app._getParent().inputsandbox, convertIntToStringArgs(app.args), app._getParent().outputsandbox, app.env)
コード例 #2
0
ファイル: Executable.py プロジェクト: pseyfert/ganga
    def prepare(self, app, appconfig, appmasterconfig, jobmasterconfig):
        from Ganga.Lib.gLite import gLiteJobConfig

        prepared_exe = app.exe
        if app.is_prepared is not None:
            shared_path = os.path.join(expandfilename(getConfig('Configuration')['gangadir']),
                                       'shared', getConfig('Configuration')['user'])
            if isinstance(app.exe, str):
                # we have a file. is it an absolute path?
                if os.path.abspath(app.exe) == app.exe:
                    logger.info("Submitting a prepared application; taking any input files from %s" % (
                        app.is_prepared.name))
                    prepared_exe = File(os.path.join(os.path.join(
                        shared_path, app.is_prepared.name), os.path.basename(File(app.exe).name)))
                # else assume it's a system binary, so we don't need to
                # transport anything to the sharedir
                else:
                    prepared_exe = app.exe
            elif isinstance(app.exe, File):
                logger.info("Submitting a prepared application; taking any input files from %s" % (
                    app.is_prepared.name))
                prepared_exe = File(os.path.join(os.path.join(
                    shared_path, app.is_prepared.name), os.path.basename(File(app.exe).name)))

        return gLiteJobConfig(prepared_exe, app._getParent().inputsandbox, convertIntToStringArgs(app.args), app._getParent().outputsandbox, app.env)
コード例 #3
0
    def prepare(self, app, appconfig, appmasterconfig, jobmasterconfig):
        logger.debug('gLiteRTHandler prepare called.')

        from Ganga.Lib.gLite import gLiteJobConfig
        return gLiteJobConfig(app.exe,
                              app._getParent().inputsandbox,
                              convertIntToStringArgs(app.args),
                              app._getParent().outputsandbox, app.env)
コード例 #4
0
ファイル: SBApp.py プロジェクト: MannyMoo/ganga
 def prepare(self,app,appconfig,appmasterconfig,jobmasterconfig):
     logger.debug('gLiteRTHandler prepare called.')
     
     from Ganga.Lib.gLite import gLiteJobConfig
     return gLiteJobConfig(app.exe,
                           app._getParent().inputsandbox,
                           convertIntToStringArgs(app.args),
                           app._getParent().outputsandbox,
                           app.env)
コード例 #5
0
    def prepare(self, app, appconfig, appmasterconfig, jobmasterconfig):
        from Ganga.Lib.gLite import gLiteJobConfig

        return gLiteJobConfig(app._scriptname,
                              app._getParent().inputsandbox, [],
                              app._getParent().outputsandbox, app.env)
コード例 #6
0
    def prepare(self, app, appconfig, appmasterconfig, jobmasterconfig):
        from Ganga.Lib.gLite import gLiteJobConfig

        return gLiteJobConfig(
            app._scriptname, app._getParent().inputsandbox, [], app._getParent().outputsandbox, app.env
        )