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

Log sacct failures #331

Merged
merged 2 commits into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,18 @@ To be released at some future point in time

Description

- Log ignored error messages from `sacct`
- Fix malformed logging format strings
- Update linting support and apply to existing errors

Detailed Notes

- Log errors reported from slurm WLM when attempts to retrieve status fail (PR331_, PR332_)
- Fix incorrectly formatted positional arguments in log format strings (PR330_)
- Update pylint dependency, update .pylintrc, mitigate non-breaking issues, suppress api breaks (PR311_)

.. _PR332: https://github.com/CrayLabs/SmartSim/pull/332
.. _PR331: https://github.com/CrayLabs/SmartSim/pull/331
.. _PR330: https://github.com/CrayLabs/SmartSim/pull/330
.. _PR311: https://github.com/CrayLabs/SmartSim/pull/311

Expand Down
5 changes: 4 additions & 1 deletion smartsim/_core/launcher/slurm/slurmLauncher.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,10 @@ def _get_slurm_step_id(step: Step, interval: int = 2) -> str:
step_id: t.Optional[str] = None
trials = CONFIG.wlm_trials
while trials > 0:
output, _ = sacct(["--noheader", "-p", "--format=jobname,jobid"])
output, err = sacct(["--noheader", "-p", "--format=jobname,jobid"])
if err:
logger.warning(f"An error occurred while calling sacct: {err}")

step_id = parse_step_id_from_sacct(output, step.name)
if step_id:
break
Expand Down