Beispiel #1
0
 def __init__(self):
   self.createMainWindow()
   self.createMainMenu()
   self.createMainFrame()
   self.createWindowProblemSelect()
   self.currentWindow = "ProblemSelect"# Other possibilities are TableSelect and CASSelect
   self.checkXMLResourcesDir()
   self.input_operation = None
   self.input_problemClass = None
   self.input_problems = []
   self.input_compAlgSystems = []
   if os.path.isfile("msHistory.xml"):
     f=open("msHistory.xml","r")
     msBuilder = MachineSettingsFromXMLBuilder()
     self.ms = msBuilder.build(f.read())
     f.close()
   else:
     self.ms = None
   #self.createTableSelect()
   #self.createCASSelect()
   Tkinter.mainloop()
Beispiel #2
0
    f.write("The memory-information has been acquired via the command 'sysctl -a | grep \"mem\"'\n")
    f.write(curMachineMemInfo)
    f.close()
    f = open(os.path.join(tfPath,"results",timeStamp,"osInfo.txt"),"w")
    f.write("The OS-information has been acquired via the command 'sysctl -a | grep \"os\"'\n")
    f.write(curMachineOSInfo)
    f.close()
    #copying the default css for the proceedings and resultedTimings
    shutil.copyfile(os.path.join(tfPath,"classes","results", "proceedings_css.css"),
                    os.path.join(tfPath,"results",timeStamp,"proceedings_css.css"))
    
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 and resultedTimings, if necessary
#Then copying the necessary folders
if resumeTask!=None:
    # #proceedings
 #    f = open(os.path.join(resultsFolder,"proceedings.xml"))
 #    prInXML = f.read()
Beispiel #3
0
    if not CASs:
        sys.exit(0)  # user has aborted

    print

    # following code is from Al, again no changes
    name = raw_input("Please choose the name for that task: ")
    while name == "":
        print "The name shall not be the empty string!"
        name = raw_input("Please choose the name for that task: ")
    # Now, we have all information to create the task
    theTask = Task(name, cpInstance.getName(), map(lambda x: x.getName(), piSDTables), chosenProblemInstances, CASs)
    casDict = {}
    if os.path.isfile("msHistory.xml"):
        msHistoryFile = open("msHistory.xml", "r")
        msBuilder = MachineSettingsFromXMLBuilder()
        ms = msBuilder.build(msHistoryFile.read())
        msHistoryFile.close()
    else:
        ms = None
    for c in CASs:
        if ms != None and (c in ms.getCASDict()):
            command = (
                raw_input(
                    "Command for executing %s on the \
target-machine (default: %s): "
                    % (c, ms.getCASDict()[c])
                )
                or ms.getCASDict()[c]
            )
        else:
Beispiel #4
0
    maxCPU = int(opts.maxCPUTime)
else:
    maxCPU = None
#-------------------- Done Checking user arguments --------------------

timeStamp = time.strftime("%Y_%m_%d_%H_%M_%S", time.gmtime())
if not os.path.isdir(os.path.join(tfPath, "results")):
    os.mkdir(os.path.join(tfPath, "results"))

#make the timestamp folder to save the results there
os.mkdir(os.path.join(tfPath, "results", timeStamp))
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)