Upgrade Proposal for SLURM 26.5.x - #424
Open
chriswasser wants to merge 3 commits into
Open
Conversation
Author
|
Additional info on the autopxd2 issues: The parsing problem of 2.5.0 is probably related to the underlying |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi everyone,
After we upgraded our cluster to SLURM 26.05.2, I implemented minor changes within pyslurm to make it compatible with the recent SLURM C API changes. Unfortunately, I was not able to use the described upgrade procedure in
UPGRADE_C_API.rstdue to theAssertionErrorappended below. Note that I also had to use an older version ofautopxd2==2.5.0as the 3.x versions changed the packages's API (seeAttributeErrorbelow). However, my scripts already worked with the following small changes:uint32_t job_idto takingslurm_step_id_t job_id. The olduint32_t job_idare still available with the suffix_jid. Depending on how you want to move forward with pyslurm exposing both functions might make sense. For now, I kept the old behavior and reimplemented the functionality of the_jid-suffixed functions in cython.slurm_free_ctl_confwas renamed toslurm_free_confESLURM_ERROR_ON_DESC_TO_RECORD_COPYwas replaced byESLURM_MAX_JOB_COUNTjob_resourcesstruct received a new membernode_ranksI don't think these changes should immediately be integrated into the
mainbranch as I wasn't able to perform extensive testing, but I hope they can be the basis for a new26.5.xbranch. Thanks for your continued development of this awesome library 🤓👌Best,
Christian
autopxd2==2.5.0:Traceback (most recent call last): File "/rwthfs/rz/cluster/home/cw585968/Desktop/GitHub/pyslurm/scripts/pyslurm_bindgen.py", line 298, in <module> main() ~~~~^^ File "/rwthfs/rz/cluster/home/cw585968/Desktop/GitHub/pyslurm/.venv/lib/python3.13/site-packages/click/core.py", line 1569, in __call__ return self.main(*args, **kwargs) ~~~~~~~~~^^^^^^^^^^^^^^^^^ File "/rwthfs/rz/cluster/home/cw585968/Desktop/GitHub/pyslurm/.venv/lib/python3.13/site-packages/click/core.py", line 1490, in main rv = self.invoke(ctx) File "/rwthfs/rz/cluster/home/cw585968/Desktop/GitHub/pyslurm/.venv/lib/python3.13/site-packages/click/core.py", line 1353, in invoke return ctx.invoke(self.callback, **ctx.params) ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/rwthfs/rz/cluster/home/cw585968/Desktop/GitHub/pyslurm/.venv/lib/python3.13/site-packages/click/core.py", line 907, in invoke return callback(*args, **kwargs) File "/rwthfs/rz/cluster/home/cw585968/Desktop/GitHub/pyslurm/scripts/pyslurm_bindgen.py", line 293, in main translate_slurm_header(slurm_header_dir, "slurm.h") ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/rwthfs/rz/cluster/home/cw585968/Desktop/GitHub/pyslurm/scripts/pyslurm_bindgen.py", line 113, in translate_slurm_header codegen.visit( ~~~~~~~~~~~~~^ autopxd.parse( ^^^^^^^^^^^^^^ ...<3 lines>... ) ^ ) ^ File "/rwthfs/rz/cluster/home/cw585968/Desktop/GitHub/pyslurm/.venv/lib/python3.13/site-packages/autopxd/writer.py", line 123, in visit rv = super().visit(node) File "/rwthfs/rz/cluster/home/cw585968/Desktop/GitHub/pyslurm/.venv/lib/python3.13/site-packages/pycparser/c_ast.py", line 190, in visit return visitor(node) File "/rwthfs/rz/cluster/home/cw585968/Desktop/GitHub/pyslurm/.venv/lib/python3.13/site-packages/pycparser/c_ast.py", line 197, in generic_visit self.visit(c) ~~~~~~~~~~^^^ File "/rwthfs/rz/cluster/home/cw585968/Desktop/GitHub/pyslurm/.venv/lib/python3.13/site-packages/autopxd/writer.py", line 123, in visit rv = super().visit(node) File "/rwthfs/rz/cluster/home/cw585968/Desktop/GitHub/pyslurm/.venv/lib/python3.13/site-packages/pycparser/c_ast.py", line 190, in visit return visitor(node) File "/rwthfs/rz/cluster/home/cw585968/Desktop/GitHub/pyslurm/.venv/lib/python3.13/site-packages/autopxd/writer.py", line 301, in visit_Typedef decls = self.collect(node) File "/rwthfs/rz/cluster/home/cw585968/Desktop/GitHub/pyslurm/.venv/lib/python3.13/site-packages/autopxd/writer.py", line 319, in collect self.generic_visit(node) ~~~~~~~~~~~~~~~~~~^^^^^^ File "/rwthfs/rz/cluster/home/cw585968/Desktop/GitHub/pyslurm/.venv/lib/python3.13/site-packages/pycparser/c_ast.py", line 197, in generic_visit self.visit(c) ~~~~~~~~~~^^^ File "/rwthfs/rz/cluster/home/cw585968/Desktop/GitHub/pyslurm/.venv/lib/python3.13/site-packages/autopxd/writer.py", line 123, in visit rv = super().visit(node) File "/rwthfs/rz/cluster/home/cw585968/Desktop/GitHub/pyslurm/.venv/lib/python3.13/site-packages/pycparser/c_ast.py", line 190, in visit return visitor(node) File "/rwthfs/rz/cluster/home/cw585968/Desktop/GitHub/pyslurm/.venv/lib/python3.13/site-packages/autopxd/writer.py", line 235, in visit_TypeDecl decls = self.collect(node) File "/rwthfs/rz/cluster/home/cw585968/Desktop/GitHub/pyslurm/.venv/lib/python3.13/site-packages/autopxd/writer.py", line 319, in collect self.generic_visit(node) ~~~~~~~~~~~~~~~~~~^^^^^^ File "/rwthfs/rz/cluster/home/cw585968/Desktop/GitHub/pyslurm/.venv/lib/python3.13/site-packages/pycparser/c_ast.py", line 197, in generic_visit self.visit(c) ~~~~~~~~~~^^^ File "/rwthfs/rz/cluster/home/cw585968/Desktop/GitHub/pyslurm/.venv/lib/python3.13/site-packages/autopxd/writer.py", line 123, in visit rv = super().visit(node) File "/rwthfs/rz/cluster/home/cw585968/Desktop/GitHub/pyslurm/.venv/lib/python3.13/site-packages/pycparser/c_ast.py", line 190, in visit return visitor(node) File "/rwthfs/rz/cluster/home/cw585968/Desktop/GitHub/pyslurm/.venv/lib/python3.13/site-packages/autopxd/writer.py", line 188, in visit_Enum value_as_str, maybe_value_as_int = parse_enum_value(item.value, self.constants) ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/rwthfs/rz/cluster/home/cw585968/Desktop/GitHub/pyslurm/.venv/lib/python3.13/site-packages/autopxd/writer.py", line 90, in parse_enum_value left_value_as_str, _ = parse_enum_value(node.left, constants) ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^ File "/rwthfs/rz/cluster/home/cw585968/Desktop/GitHub/pyslurm/.venv/lib/python3.13/site-packages/autopxd/writer.py", line 107, in parse_enum_value assert False, f"Unsuported expression for enum value: {node}" ^^^^^ AssertionError: Unsuported expression for enum value: Cast(to_type=Typename(name=None, quals=[ ], align=None, type=TypeDecl(declname=None, quals=[ ], align=None, type=IdentifierType(names=['uint64_t' ] ) ) ), expr=Constant(type='int', value='1' ) )Traceback (most recent call last): File "/rwthfs/rz/cluster/home/cw585968/Desktop/GitHub/pyslurm/scripts/pyslurm_bindgen.py", line 298, in <module> main() ~~~~^^ File "/rwthfs/rz/cluster/home/cw585968/Desktop/GitHub/pyslurm/.venv/lib/python3.13/site-packages/click/core.py", line 1569, in __call__ return self.main(*args, **kwargs) ~~~~~~~~~^^^^^^^^^^^^^^^^^ File "/rwthfs/rz/cluster/home/cw585968/Desktop/GitHub/pyslurm/.venv/lib/python3.13/site-packages/click/core.py", line 1490, in main rv = self.invoke(ctx) File "/rwthfs/rz/cluster/home/cw585968/Desktop/GitHub/pyslurm/.venv/lib/python3.13/site-packages/click/core.py", line 1353, in invoke return ctx.invoke(self.callback, **ctx.params) ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/rwthfs/rz/cluster/home/cw585968/Desktop/GitHub/pyslurm/.venv/lib/python3.13/site-packages/click/core.py", line 907, in invoke return callback(*args, **kwargs) File "/rwthfs/rz/cluster/home/cw585968/Desktop/GitHub/pyslurm/scripts/pyslurm_bindgen.py", line 292, in main translate_slurm_header(slurm_header_dir, "slurm_errno.h") ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/rwthfs/rz/cluster/home/cw585968/Desktop/GitHub/pyslurm/scripts/pyslurm_bindgen.py", line 112, in translate_slurm_header codegen = autopxd.AutoPxd("slurm/" + hdr) ^^^^^^^^^^^^^^^ AttributeError: module 'autopxd' has no attribute 'AutoPxd'