Skip to content

Commit 5c01772

Browse files
committed
split large workflows into independent workflows if possible
fireworks seems to have trouble in the thousands of TSs range due to the need to acquire lock for all the fireworks running at once splitting it into independent workflows (when running adsorbates/TSs separately they are each independent) makes the lock separate to each adsorbate/TS avoiding this issue.
1 parent 45cda56 commit 5c01772

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

pynta/main.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,8 +470,14 @@ def execute(self,calculate_adsorbates=True,
470470
#setup transition states
471471
self.setup_transition_states(adsorbates_finished=(not calculate_adsorbates))
472472

473-
wf = Workflow(self.fws, name=self.label)
474-
self.launchpad.add_wf(wf)
473+
if len(self.fws) > 1000 and ((not calculate_adsorbates and calculate_transition_states) or (calculate_adsorbates and not calculate_transition_states)):
474+
for i,fw in enumerate(self.fws): #this size is difficult for fireworks so split up into individual independent workflows
475+
wf = Workflow([fw],name=self.label+"-"+str(i))
476+
self.launchpad.add_wf(wf)
477+
else:
478+
wf = Workflow(self.fws, name=self.label)
479+
self.launchpad.add_wf(wf)
480+
475481

476482
if launch:
477483
self.launch()

0 commit comments

Comments
 (0)