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

Implement an concurrent.futures.Executor for pysqa #206

Merged
merged 31 commits into from
Jul 17, 2023
Merged

Conversation

jan-janssen
Copy link
Member

@jan-janssen jan-janssen commented Jul 16, 2023

Example Code:

from pysqa import QueueAdapter
from pysqa import Executor


def funct_add(a, b):
    return a+b


if __name__ == "__main__":
    qa = QueueAdapter(directory="/vast/home/janssen/pyiron/resources/queues")
    with Executor(
        cwd="/vast/home/janssen/pysqa_test",
        queue_adapter=qa,
        queue_adapter_kwargs={
            "queue": "skylake_gold_debug",
            "job_name": "test",
            "cores": 1
        }
    ) as exe:
        fs = exe.submit(fn=funct_add, a=1, b=2)
        print(fs.result())

@jan-janssen
Copy link
Member Author

Waiting for pyiron/pympipool#118

@jan-janssen jan-janssen linked an issue Jul 16, 2023 that may be closed by this pull request
@jan-janssen jan-janssen merged commit a8fc25b into main Jul 17, 2023
13 of 14 checks passed
@delete-merged-branch delete-merged-branch bot deleted the executor branch July 17, 2023 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[idea] python concurrent.futures
1 participant