本文整理汇总了Python中EDJob.EDJob.synchronizeAll方法的典型用法代码示例。如果您正苦于以下问题:Python EDJob.synchronizeAll方法的具体用法?Python EDJob.synchronizeAll怎么用?Python EDJob.synchronizeAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EDJob.EDJob
的用法示例。
在下文中一共展示了EDJob.synchronizeAll方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: process
# 需要导入模块: from EDJob import EDJob [as 别名]
# 或者: from EDJob.EDJob import synchronizeAll [as 别名]
def process(self):
for fn in self.dataFiles:
EDVerbose.screen("Processing file %s" % fn)
edj = EDJob(self.EDNAPluginName)
edj.dataInput = self.fileName2xml(fn)
edj.connectSUCCESS(self.XMLsuccess)
edj.connectFAILURE(self.XMLerr)
self.queue.put(edj)
if self.process_sem._Semaphore__value > 0 :
t = threading.Thread(target=self.startProcessing)
t.start()
EDVerbose.screen("Back in main")
while self.cpu_sem._Semaphore__value < self.nbcpu:
time.sleep(0.1)
EDJob.synchronizeAll()
EDJob.stats()
示例2: FullFieldXas
# 需要导入模块: from EDJob import EDJob [as 别名]
# 或者: from EDJob.EDJob import synchronizeAll [as 别名]
else:
ffx = FullFieldXas()
if os.path.isfile(".XSDataInputFullFieldXAS.xml"):
ffx.load(".XSDataInputFullFieldXAS.xml")
ffx.dontAlign = dontAlign
if dontAlign:
print ("*" * 80)
print ("*" + "Skipping image alignement part".center(78) + "*")
print ("*" * 80)
ffx.setup(_listInput=paths, _mode=mode)
if not isinstance(ffx.reference, int):
ffx.uploadReferenceFrame(ffx.reference)
ffx.save(".XSDataInputFullFieldXAS.xml")
ffx.dump("analysis-%s.json" % time.strftime("%Y%m%d-%Hh%Mm%Ss"))
edna = EDParallelExecute(
ffx.pluginName, ffx.makeXML, _functXMLerr=ffx.error, _bVerbose=True, _bDebug=debug, _iNbThreads=iNbCPU
)
edna.runEDNA(ffx.listInput, ffx.strMode, ffx.bNewerOnly)
EDVerbose.WARNING("Back to main !")
EDJob.synchronizeAll()
ffx.updateAttrRefImage()
EDPluginControlAlignStackv1_0.showData()
if keepShare:
EDShare.close()
elif (ffx.getNrErrors() == 0) and (not EDVerbose.isVerboseDebug()):
EDVerbose.WARNING("All processing finished successfully: Remove EDShare's big HDF5 file")
EDShare.close(remove=True)
else:
EDShare.close()
示例3: print
# 需要导入模块: from EDJob import EDJob [as 别名]
# 或者: from EDJob.EDJob import synchronizeAll [as 别名]
print("All %i jobs queued after %.3fs" % (len(args), time.time() - reprocess.startTime))
reprocess.join()
if yappi: yappi.stop()
print("All %i jobs processed after %.3fs" % (len(args), time.time() - reprocess.startTime))
print reprocess.statistics()
if yappi:
stat = yappi.get_stats(sort_type=yappi.SORTTYPE_TTOT)
res = {}
for i in stat.func_stats:
if i[0] in res:
res[i[0]][0] += i[1]
res[i[0]][1] += i[2]
else:
res[i[0]] = [i[1], i[2]]
keys = res.keys()
keys.sort(sortn)
with open("yappi.out", "w") as f:
f.write("ncall\t\ttotal\t\tpercall\t\tfunction%s" % (os.linesep))
for i in keys:
f.write("%8s\t%16s\t%16s\t%s%s" % (res[i][0], res[i][1], res[i][1] / res[i][0], i, os.linesep))
print("Profiling information written in yappi.out")
edJob = EDJob(options.plugin.replace("EDPluginBioSaxsHPLC", "EDPluginBioSaxsFlushHPLC"))
edJob.setDataInput(open(fullargs[-1], "r").read())
edJob.execute()
edJob.synchronizeAll()
if options.profile:
for i in EDObject.analyze_profiling():
print(i)