ReactionMechanismGenerator / ARC

ARC - Automatic Rate Calculator
https://reactionmechanismgenerator.github.io/ARC/index.html
MIT License
43 stars 21 forks source link

Getting `KeyError: 'memory'` when ARC tries to troubleshoot jobs #314

Closed jeehyunatrmg closed 4 years ago

jeehyunatrmg commented 4 years ago
Traceback (most recent call last)
<ipython-input-3-0d19388948f2> in <module>
     29 ess_settings = {'gaussian': 'local', 'molpro': 'pharos', 'qchem': 'pharos'}
     30 arc0 = arc.ARC(project='phenyl_radical_recombination_2ndtry_022220', arc_species_list=arc_species_list, ess_settings=ess_settings)
---> 31 arc0.execute()

~/ARC/arc/main.py in execute(self)
    549                                    max_job_time=self.max_job_time, allow_nonisomorphic_2d=self.allow_nonisomorphic_2d,
    550                                    memory=self.memory, adaptive_levels=self.adaptive_levels,
--> 551                                    confs_to_dft=self.confs_to_dft, dont_gen_confs=self.dont_gen_confs)
    552 
    553         save_yaml_file(path=os.path.join(self.project_directory, 'output', 'status.yml'), content=self.scheduler.output)

~/ARC/arc/scheduler.py in __init__(self, project, ess_settings, species_list, project_directory, composite_method, conformer_level, opt_level, freq_level, sp_level, scan_level, ts_guess_level, irc_level, orbitals_level, adaptive_levels, rmgdatabase, job_types, job_additional_options, solvent, job_shortcut_keywords, rxn_list, bath_gas, restart_dict, max_job_time, allow_nonisomorphic_2d, memory, testing, dont_gen_confs, confs_to_dft)
    420         self.timer = True
    421         if not self.testing:
--> 422             self.schedule_jobs()
    423 
    424     def schedule_jobs(self):

~/ARC/arc/scheduler.py in schedule_jobs(self)
    503                         successful_server_termination = self.end_job(job=job, label=label, job_name=job_name)
    504                         if successful_server_termination:
--> 505                             self.check_sp_job(label=label, job=job)
    506                         self.timer = False
    507                         break

~/ARC/arc/scheduler.py in check_sp_job(self, label, job)
   2057                 self.output[label]['paths']['geo'] = job.local_path_to_output_file
   2058         else:
-> 2059             self.troubleshoot_ess(label=label, job=job, level_of_theory=job.job_level_of_theory_dict)
   2060 
   2061     def post_sp_actions(self, label, job):

~/ARC/arc/scheduler.py in troubleshoot_ess(self, label, job, level_of_theory, conformer)
   2595                          num_heavy_atoms=self.species_dict[label].number_of_heavy_atoms, software=job.software,
   2596                          fine=job.fine, memory_gb=job.total_job_memory_gb, cpu_cores=job.cpu_cores,
-> 2597                          ess_trsh_methods=job.ess_trsh_methods, available_ess=list(self.ess_settings.keys()))
   2598         for output_error in output_errors:
   2599             self.output[label]['errors'] += output_error

~/ARC/arc/job/trsh.py in trsh_ess_job(label, level_of_theory_dict, server, job_status, job_type, software, fine, memory_gb, num_heavy_atoms, cpu_cores, ess_trsh_methods, available_ess, is_h)
    787             # Increase memory allocation, also run with a shift
    788             ess_trsh_methods.append('memory')
--> 789             memory = servers[server]['memory']  # set memory to the value of an entire node (in GB)
    790             logger.info('Troubleshooting {type} job in {software} for {label} using memory: {mem:.2f} GB instead of '
    791                         '{old} GB'.format(type=job_type, software=software, mem=memory, old=memory_gb,

KeyError: 'memory'
alongd commented 4 years ago

I made a fix (#315) so that ARC doesn't crash, but to really fix it and get the desired behavior, you should define the maximum node memory for the server you run molpro (or any other ESS) on. Read more here (third bullet point under Update the servers dictionary)

jeehyunatrmg commented 4 years ago

Thank you so much!