Skip to content

Add background job submission with progress tracking and graceful termination - #129

Merged
Tingliangstu merged 8 commits into
AI4MD-lab:mainfrom
litupLetian:main
Jul 25, 2026
Merged

Tingliangstu merged 8 commits into
AI4MD-lab:mainfrom
litupLetian:main

Conversation

@litupLetian

Copy link
Copy Markdown
Contributor

Summary

This PR improves the job submission workflow, especially for large batches of single-point calculations.

It adds:

  • Submission script generation based on user-provided templates
  • Background job submission support
  • Progress tracking for submitted single-point calculations
  • Graceful handling of termination signals
  • Updated documentation for the submission and SCF setup workflows
  • Automated tests for submission scripts and background job behavior

Motivation

Submitting a large number of single-point calculations can take a long time, and previously there was limited visibility into the submission progress.

These changes make the workflow easier to monitor and allow it to terminate more cleanly when interrupted.

Main changes

  • Preserve scheduler settings when rendering submission scripts from templates
  • Run supported submission tasks in the background
  • Display task progress after running pesmaker submit
  • Handle termination signals without producing an unfriendly traceback
  • Add usage documentation and examples
  • Add test coverage for the new behavior

Testing

The following checks pass locally:

python -m pytest tests/test_job_scripts.py tests/test_submit_background.py
python -m ruff check .

增加了 scf-setup 中复制提交脚本的功能(原本只能让pesmaker自动生成);如果启用了脚本复制功能,submit.sh 会按照给定的模板直接复制,如果没有启用原样复制功能,则按照 pesmaker 原本的设置生成 submit.sh 脚本
add explanation to the termination signal

"subprocess.CalledProcessError: Command '['bash', 'submit.sh']' returned non-zero exit status 143."

when a vasp single point process is killed
@Tingliangstu

Copy link
Copy Markdown
Collaborator

good to see your commit

@Tingliangstu
Tingliangstu merged commit d260e30 into AI4MD-lab:main Jul 25, 2026
2 checks passed
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.

2 participants