Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipeline #844

Merged
merged 2 commits into from Aug 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 10 additions & 7 deletions pyiron/atomistics/master/parallel.py
Expand Up @@ -164,13 +164,16 @@ def pipe(project, job, step_lst):
FlexibleMaster:
"""
job_lst_master = project.create_job(project.job_type.FlexibleMaster, 'lstmaster')
for i, step_funct in enumerate(step_lst):
job_lst_master.append(step_funct(job))
if i > 0 and 'for_each_structure' in step_funct.__name__:
job_lst_master.function_lst.append(_structure_many_to_many)
elif i > 0:
job_lst_master.function_lst.append(_structure_one_to_one)
return job_lst_master
if job_lst_master.status.finished:
return job_lst_master
else:
for i, step_funct in enumerate(step_lst):
job_lst_master.append(step_funct(job))
if i > 0 and 'for_each_structure' in step_funct.__name__:
job_lst_master.function_lst.append(_structure_many_to_many)
elif i > 0:
job_lst_master.function_lst.append(_structure_one_to_one)
return job_lst_master


def _structure_one_to_one(job_prev, job_next):
Expand Down
7 changes: 4 additions & 3 deletions pyiron/base/master/parallel.py
Expand Up @@ -673,7 +673,10 @@ def run_static(self):
"{} child project {}".format(self.job_name, self.project.__str__())
)
job = next(self._job_generator, None)
if self.server.run_mode.queue:
if (self.server.run_mode.non_modal or self.server.run_mode.queue) \
and job.server.run_mode.interactive:
self.run_if_interactive()
elif self.server.run_mode.queue:
self._run_if_master_modal_child_non_modal(job=job)
elif job.server.run_mode.queue:
self._run_if_child_queue(job)
Expand All @@ -683,8 +686,6 @@ def run_static(self):
self.server.run_mode.interactive and job.server.run_mode.interactive
):
self._run_if_master_modal_child_modal(job)
elif self.server.run_mode.non_modal and job.server.run_mode.interactive:
self.run_if_interactive()
elif self.server.run_mode.modal and job.server.run_mode.non_modal:
self._run_if_master_modal_child_non_modal(job)
else:
Expand Down