当前位置: 首页>>代码示例>>Python>>正文


Python Connector.submitJobViaGateway方法代码示例

本文整理汇总了Python中connector.Connector.submitJobViaGateway方法的典型用法代码示例。如果您正苦于以下问题:Python Connector.submitJobViaGateway方法的具体用法?Python Connector.submitJobViaGateway怎么用?Python Connector.submitJobViaGateway使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在connector.Connector的用法示例。


在下文中一共展示了Connector.submitJobViaGateway方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: MainWindow

# 需要导入模块: from connector import Connector [as 别名]
# 或者: from connector.Connector import submitJobViaGateway [as 别名]

#.........这里部分代码省略.........
        ParameterWrap()(self,'sin_fromfltp','',['fltpdirectory'],False)
        ParameterWrap()(self,'fltp_fromcpr','',['cprdirectory'],False)
        ParameterWrap()(self,'fltp_fromtif','',['cprdirectory'],False)
        
 
    def submitToCluster(self):
        '''
        method that launches all the checks and if successful submits the
        command to cons-2 for starting the job
        '''
        if not self.checkAllParamters():
            return
        
        # (1) Create command line string
        if not str(self.jobname.text()):
            self.jobname_str = 'GRecoM'
        else:
            self.jobname_str = str(self.jobname.text())
            
        self.cmd = ''
        if not self.createCommand():
            return
        
        if self.print_cmd.isChecked():
            if not self.displayYesNoMessage('Submit to cons-2?', self.cmd):
                return
        
        # (2) run SSH-connector and check all account credentials
        if not self.job.performInitalCheck():
            return
        
        # (3) run SSh-connector to launch the job
        if self.afsaccount.isChecked():
            self.job.submitJobViaGateway(self.cmd+'\n','x02da-gw','x02da-cons-2')
        elif self.cons2.isChecked():
            self.job.submitJobLocally(self.cmd)
            
            
    def calcSingleSlice(self):
        '''
        method for renconstructing a single slice for a given sinogram.
        '''
        if not str(self.sinograms.currentText()):
            self.displayErrorMessage('No sinogram selected', 'Select the Sinogram directory and press Enter. Then select one to be reconstructed.')
            return
        
        ## (1) check whether we have defined the location from where we run the reconstruction
        if not self.checkComputingLocation():
            return
        
        ## (2) before calculating on x02da-cons-2, we need to rewrite the path of the sino dir
        if self.afsaccount.isChecked():
            single_sino = self.dirs.afsPath2Cons2(self.sinogramdirectory.text())
        elif self.cons2.isChecked():
            single_sino = str(self.sinogramdirectory.text())

        ## (3) create the command line string for single slice reconstruction
        self.cmd_string = 'python /afs/psi.ch/project/tomcatsvn/executeables/grecoman/externals/singleSliceFunc.py '
        
        combos_single = ['filter','geometry']  # removed: 'outputtype' (let's always have DMP!)
        for combo in combos_single:
            if ParameterWrap.par_dict[combo].performCheck():
                self.cmd_string += ParameterWrap.par_dict[combo].flag+' '+self.getComboBoxContent(combo)+' ' 
        
        if self.zingeron.isChecked():
            self.setZingerParameters()
开发者ID:arcaduf,项目名称:grecoman,代码行数:70,代码来源:grecoman.py


注:本文中的connector.Connector.submitJobViaGateway方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。