def base_server_get_next_job_to_run(self, lock_file=False): if (len(self.jobs) == 0): return False, False for i in range(0, len(self.jobs)): if (self.jobs_running < self.cpus): if self.jobs[i].status == 0: self.jobs[i].status = 1 self.jobs[i].start = str(datetime.now()) self.jobs[i].ip = socket.gethostbyname( socket.gethostname()) #for r in range(0,len(self.jobs)): # print(self.jobs[i],self.args[i]) self.jobs_running = self.jobs_running + 1 if lock_file == True: command_lock = " --lockfile " + os.path.join( self.sim_dir, "lock" + str(i) + ".dat") else: command_lock = " --lock " + "lock" + str(i) full_command = get_exe_command( ) + command_lock + " " + self.jobs[ i].args + " " + get_exe_args() self.jobs[i].full_command = full_command return self.jobs[i].path, full_command return False, False
def load(self): self.clear() self.clean_menu() self.last_page=0 #self.setTabsClosable(True) self.setMovable(True) if (os.path.isfile(os.path.join(get_sim_path(),"sim.gpvdm"))==True): self.finished_loading=False #self.progress.init() #self.progress.show() #self.progress.start() #self.progress.set_text("Loading..") #process_events() # dos_files=inp_get_token_value("device_epitaxy.inp", "#layers") widget=tab_main() self.addTab(widget,_("Device structure")) self.update_display_function=widget.update self.terminal=tab_terminal() self.terminal.init() self.addTab(self.terminal,_("Terminal")) self.terminal.run(os.getcwd(),get_exe_command()+" --version "+get_exe_args()) global_object_register("terminal",self.terminal) widget=tab_view() self.addTab(widget,_("Output")) #self.add_info_page() return True self.finished_loading=True #self.progress.stop() #self.progress.set_fraction(0.0) self.goto_page(_("Device structure")) else: self.add_info_page() self.goto_page(_("Information")) return False
def load(self): self.clear() self.last_page = 0 #self.setTabsClosable(True) self.setMovable(True) if (os.path.isfile(os.path.join(get_sim_path(), "sim.gpvdm")) == True): self.tab_main = tab_main() self.addTab(self.tab_main, _("Device structure")) mesh = get_mesh() if mesh.y.circuit_model == True: # or mesh.x.tot_points!=1 or mesh.z.tot_points!=1: self.display_mesh = display_mesh() if mesh.y.circuit_model == True: self.addTab(self.display_mesh, _("Circuit diagram")) else: self.addTab(self.display_mesh, _("Electrical mesh")) self.update_display_function = self.tab_main.update #self.tab_main.three_d.display.force_redraw() self.terminal = tab_terminal() self.terminal.init() self.addTab(self.terminal, _("Terminal")) self.terminal.run( os.getcwd(), get_exe_command() + " --version2 " + get_exe_args()) global_object_register("terminal", self.terminal) widget = tab_view() self.addTab(widget, _("Output")) self.add_docs_page() self.state_loaded = True else: self.add_info_page() self.goto_page(_("Information")) self.state_loaded = False