Skip to content

Commit

Permalink
Run conf_sp job after conf_opt job is finished
Browse files Browse the repository at this point in the history
  • Loading branch information
JintaoWu98 committed Oct 17, 2024
1 parent 359638e commit 43c8204
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions arc/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,20 +547,27 @@ def schedule_jobs(self):
continue
job_list = self.running_jobs[label]
for job_name in job_list:
if 'conformer' in job_name:
if 'conf_opt' in job_name or 'conf_sp' in job_name:
i = get_i_from_job_name(job_name)
job = self.job_dict[label]['conformers'][i]
job = self.job_dict[label]['conf_opt'][i] if 'conf_opt' in job_name \
else self.job_dict[label]['conf_sp'][i]
if not (job.job_id in self.server_job_ids and job.job_id not in self.completed_incore_jobs):
# this is a completed conformer job
successful_server_termination = self.end_job(job=job, label=label, job_name=job_name)
if successful_server_termination:
troubleshooting_conformer = self.parse_conformer(job=job, label=label, i=i)
if 'conf_opt' in job_name and self.job_types['conf_sp'] and not troubleshooting_conformer:
self.run_job(label=label,
xyz=self.species_dict[label].conformers[i],
level_of_theory=self.conformer_sp_level,
job_type='conf_sp',
conformer=i,)
if troubleshooting_conformer:
break
# Just terminated a conformer job.
# Are there additional conformer jobs currently running for this species?
for spec_jobs in job_list:
if 'conformer' in spec_jobs and spec_jobs != job_name:
if ('conf_opt' in spec_jobs or 'conf_sp' in spec_jobs) and spec_jobs != job_name:
break
else:
# All conformer jobs terminated.
Expand Down

0 comments on commit 43c8204

Please sign in to comment.