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

add asynchronous execution on run_submission #347

Open
ixsluo opened this issue Jun 29, 2023 · 3 comments · Fixed by #348
Open

add asynchronous execution on run_submission #347

ixsluo opened this issue Jun 29, 2023 · 3 comments · Fixed by #348
Labels
enhancement New feature or request

Comments

@ixsluo
Copy link
Contributor

ixsluo commented Jun 29, 2023

Description & Motivation

I have this situation:
I will cycling submit batches of VASP jobs. Each job may consume different time. I want to handle each VASP result right after it finished, and submit the next VASP job according to that previous result.
I need to submit each job one-by-one, but not waiting for the previous job until it is done. If the run_submission can be changed to async, then there may be a way to achieve the above needs.

  1. the submission will wait a long time for the results
  2. add control on the check interval, because there is no need to wait that long in short job

Pitch

  1. add Submission.async_run_submission async method
  2. add check_interval argument

Additional context

Known bugs:
In LazyLocalContext, the async func runs well, but fail in slurm/pbs system.
Results will be deleted before retrieved if setting clean=True in slurm/pbs system. But setting clean=False will raise error if the same job is submitted again (e.g. running unittest in local).

@njzjz
Copy link
Member

njzjz commented Jun 29, 2023

English is encouraged as some people don't speak Chinese.

@ixsluo ixsluo changed the title Submission增加异步执行,使等待轮询时可以执行其他任务 add asynchronous execution on run_submission Jun 30, 2023
@ixsluo
Copy link
Contributor Author

ixsluo commented Jun 30, 2023

English is encouraged as only some people don't speak Chinese.

The issue is modified, and add a more precise description
#348 (comment)

njzjz pushed a commit that referenced this issue Jun 30, 2023
Feat #347 
1. add `check_interval`
2. add `async_run_submission` method
3. add unittest of the async func

Known bugs:
Async submission may fail on pbs/slurm queue system, but success on
lazylocal test.

---------

Signed-off-by: ixsluo <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@njzjz
Copy link
Member

njzjz commented Jun 30, 2023

I will keep this issue open as there are some known bugs.

@njzjz njzjz reopened this Jun 30, 2023
@njzjz njzjz added the enhancement New feature or request label Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants