Skip to content

Commit

Permalink
fix executorlib
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-janssen committed Feb 4, 2025
1 parent d2188ce commit 003d7a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyiron_base/jobs/datamining.py
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@ def update_table(self, job_status_list: Optional[List[str]] = None) -> None:
self.project.db.item_update({"timestart": datetime.now()}, self.job_id)
with self.project_hdf5.open("input") as hdf5_input:
if self._executor_type is None and self.server.cores > 1:
self._executor_type = "executorlib.Executor"
self._executor_type = "executorlib.SingleNodeExecutor"
if self._executor_type is not None:
with self._get_executor(max_workers=self.server.cores) as exe:
self._pyiron_table.create_table(
Expand Down
4 changes: 2 additions & 2 deletions pyiron_base/jobs/job/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1680,14 +1680,14 @@ def _get_executor(self, max_workers: Optional[int] = None) -> Executor:
"No executor type defined - Please set self.executor_type."
)
elif (
self._executor_type == "executorlib.Executor"
self._executor_type == "executorlib.SingleNodeExecutor"
and platform.system() == "Darwin"
):
# The Mac firewall might prevent connections based on the network address - especially Github CI
return import_class(self._executor_type)(
max_cores=max_workers, hostname_localhost=True
)
elif self._executor_type == "executorlib.Executor":
elif self._executor_type == "executorlib.SingleNodeExecutor":
# The executorlib Executor defines max_cores rather than max_workers
return import_class(self._executor_type)(max_cores=max_workers)
elif isinstance(self._executor_type, str):
Expand Down

0 comments on commit 003d7a2

Please sign in to comment.