# print "According to the proceedings.xml file, the task has already been finished or\ # was not even having one completed calculation." # sys.exit(-1) #resultedTimings f = open(os.path.join(resultsFolder,"resultedTimings.xml")) prInXML = f.read() f.close() prBuilder = ResultedTimingsFromXMLBuilder() rt = prBuilder.build(prInXML,t) if (len(rt.getWAITING())==0 or (len(rt.getCOMPLETED()) ==0 and len(rt.getERROR()) ==0)): print "According to the resultedTimings.xml file, the task has already been finished or\ was not even having one completed calculation. ABORT!" sys.exit(-1) proceedings = rt.getProceedings() else: proceedings = Proceedings(t,timeStamp) rt = ResultedTimings(proceedings) #creating all subfolders #shutil.copytree(os.path.join(tfPath,"casSources"),os.path.join(resultsFolder,"resultFiles")) OLD VERSION #We only want to copy those files, which appear in the taskInfo.xml os.mkdir(os.path.join(resultsFolder,"resultFiles")) for i in t.getProblemInstances(): shutil.copytree(os.path.join(tfPath,"casSources",i), os.path.join(resultsFolder,"resultFiles",i)) #posting the (maybe new) information about the parameters in the running script into the folder f= open(os.path.join(tfPath,"results",timeStamp,"runTaskParameters.xml"),"w") rtoXMLWriter = RunTaskOptionsToXMLWriter() f.write(rtoXMLWriter.createXMLFromRunTaskOptions(runTaskOpts).toprettyxml()) f.close() #Creating the Proceedings Writers
resultsFolder = os.path.join(tfPath,"results",timeStamp) #getting the machine settings f = open(os.path.join(tfPath,"machinesettings.xml")) msc = MachineSettingsFromXMLBuilder() ms = msc.build(f.read()) f.close() #getting the task f = open(os.path.join(tfPath,"taskInfo.xml")) tc = TaskFromXMLBuilder() t = tc.build(f.read()) f.close() #creating the instance of proceedings proceedings = Proceedings(t,timeStamp) #creating the instance of ResultedTimings rt = ResultedTimings(proceedings) #creating all subfolders shutil.copytree(os.path.join(tfPath,"casSources"),os.path.join(resultsFolder,"resultFiles")) proceedingsHTMLWriter = ProceedingsToHTMLWriter() proceedingsXMLWriter = ProceedingsToXMLWriter() rttoHTMLWriter = ResultedTimingsToHTMLWriter() rttoXMLWriter = ResultedTimingsToXMLWriter() def update(): proceedingsXMLFile = open(os.path.join(resultsFolder,"proceedings.xml"),"w") proceedingsHTMLFile = open(os.path.join(resultsFolder,"proceedings.html"),"w")
resultsFolder = os.path.join(tfPath, "results", timeStamp) #getting the machine settings f = open(os.path.join(tfPath, "machinesettings.xml")) msc = MachineSettingsFromXMLBuilder() ms = msc.build(f.read()) f.close() #getting the task f = open(os.path.join(tfPath, "taskInfo.xml")) tc = TaskFromXMLBuilder() t = tc.build(f.read()) f.close() #creating the instance of proceedings proceedings = Proceedings(t, timeStamp) #creating the instance of ResultedTimings rt = ResultedTimings(proceedings) #creating all subfolders shutil.copytree(os.path.join(tfPath, "casSources"), os.path.join(resultsFolder, "resultFiles")) proceedingsHTMLWriter = ProceedingsToHTMLWriter() proceedingsXMLWriter = ProceedingsToXMLWriter() rttoHTMLWriter = ResultedTimingsToHTMLWriter() rttoXMLWriter = ResultedTimingsToXMLWriter() def update():