Upgrade Proposal for SLURM 26.5.x - #424
Conversation
|
Additional info on the autopxd2 issues: The parsing problem of 2.5.0 is probably related to the underlying |
|
Thank you for this! I have a PR (#426) that referenced this change and added a few things that were missing. I’m running it through testing to see if I missed anything. |
|
Great, thanks 🎉 Then I guess I can close this PR here, right? |
I think so. You could also test if #426 builds cleanly and works for you on your cluster. So far tests have passed, but i want to test and clean up the PR a bit more before releasing. |
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'