コード例 #1
0
ファイル: handlers.py プロジェクト: cnk118/custodian
 def check(self):
     # Checks output file for errors.
     self.outdata = QcOutput(self.output_file).data
     self.qcinp = QcInput.from_file(self.input_file)
     self.error_step_id = None
     self.errors = None
     self.fix_step = None
     for i, od in enumerate(self.outdata):
         if od["has_error"]:
             self.error_step_id = i
             self.fix_step = self.qcinp.jobs[i]
             self.errors = sorted(list(set(od["errors"])))
             return True
     return False
コード例 #2
0
ファイル: jobs.py プロジェクト: image-tester/custodian
 def _set_qchem_memory(self, qcinp=None):
     if not qcinp:
         qcinp = QcInput.from_file(self.input_file)
     if "PBS_JOBID" in os.environ:
         if "hopque" in os.environ["PBS_JOBID"]:
             # on Hopper
             for j in qcinp.jobs:
                 if self.current_command_name == "general":
                     if self.large_static_mem:
                         j.set_memory(total=1100, static=300)
                     else:
                         j.set_memory(total=1100, static=100)
                 elif self.current_command_name == "half_cpus":
                     if self.large_static_mem:
                         j.set_memory(total=2200, static=500)
                     else:
                         j.set_memory(total=2200, static=100)
                 elif self.current_command_name == "openmp":
                     if self.large_static_mem:
                         j.set_memory(total=28000, static=10000)
                     else:
                         j.set_memory(total=28000, static=3000)
         elif "edique" in os.environ["PBS_JOBID"]:
             # on Edison
             for j in qcinp.jobs:
                 if self.current_command_name == "general":
                     if self.large_static_mem:
                         j.set_memory(total=2500, static=500)
                     else:
                         j.set_memory(total=2500, static=100)
                 elif self.current_command_name == "half_cpus":
                     if self.large_static_mem:
                         j.set_memory(total=5000, static=1000)
                     else:
                         j.set_memory(total=5000, static=200)
                 elif self.current_command_name == "openmp":
                     if self.large_static_mem:
                         j.set_memory(total=60000, static=20000)
                     else:
                         j.set_memory(total=60000, static=5000)
     qcinp.write_file(self.input_file)