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

Handle cpu and memory check gracefully #1094

Merged
merged 2 commits into from
Jan 14, 2025

Conversation

superstar54
Copy link
Member

@superstar54 superstar54 commented Jan 14, 2025

This old script assumes a cgroupv2 environment, but the issue arises because some system doesn't have the required cgroupv2 files (/sys/fs/cgroup/cpu.max and /sys/fs/cgroup/memory.max).

  • If cpu.max and memory.max are missing, fall back to cgroupv1
  • If neither cpu.max nor cpu.cfs_quota_us exists, use default values.

@superstar54
Copy link
Member Author

I tested the image on my local computer, and it workeded without error.

Copy link

codecov bot commented Jan 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.21%. Comparing base (969ba0e) to head (381ea42).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1094   +/-   ##
=======================================
  Coverage   71.21%   71.21%           
=======================================
  Files         114      114           
  Lines        7107     7107           
=======================================
  Hits         5061     5061           
  Misses       2046     2046           
Flag Coverage Δ
python-3.11 71.21% <ø> (ø)
python-3.9 71.20% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@edan-bainglass edan-bainglass left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@superstar54 superstar54 merged commit 74ef3cb into aiidalab:main Jan 14, 2025
8 checks passed
@superstar54 superstar54 deleted the fix/hq_cpu_memory branch January 14, 2025 10:34
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