コード例 #1
0
 def Submit(self, args, Job_, filename, resource_):
     fileName = args.inFile
     if os.path.splitext(fileName)[1] == ".pbs":
         super(PBS, self).Submit(fileName, Job_, resource_)
     elif os.path.splitext(fileName)[1] == ".submit":
         print("condor")
         fromCondortoPBS(fileName)
     Logger_ = Logger()
     for line in Job_.remoteId.stdout:
         Job_.remoteId =  line.rstrip()
     if Job_.remoteId != '0':
         with open(filename, 'wb') as f:
             pickle.dump(Job_, f)
         Logger_.map_job(args, filename)
コード例 #2
0
    def Submit(self, args, Job_, filename, resource_):
        fileName = args.inFile
        Logger_ = Logger()
        if os.path.splitext(fileName)[1] == ".submit":
            super(Condor, self).Submit(fileName, Job_, resource_)
        elif os.path.splitext(fileName)[1] == ".pbs":
            file, scriptFile = Job_.fromPBStoCondor(fileName)
            print (scriptFile)
            Job_.transferInpFile = scriptFile
            super(Condor, self).Submit(file, Job_, resource_)

        for line in Job_.remoteId.stdout:
            print(line)
            if "cluster" in line:
                Job_.remoteId = line.split("cluster", 1)[1]
                Job_.remoteId = Job_.remoteId.rstrip()
                print(Job_.remoteId )
                if Job_.remoteId != '0':
                    with open(filename, 'wb') as f:
                        pickle.dump(Job_, f)
                    Logger_.map_job(args, filename)