Skip to content
Snippets Groups Projects

Catch sbatch errors in CLI commands

Whenever sbatch exits with an error, the error is just passed to the .err log for the invoking job, but the job is marked as COMPLETED in the sacct log. This makes it difficult to determine how much data was not processed because the jobs just weren't submitted at all. This MR wraps the subprocess.run calls for sbatch in try-except blocks that pass any stderr messages back from the subprocess to the invoking command and raises an exception instead of exiting normally. This will mark those jobs as FAILED in the sacct database instead of COMPLETED.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading