Commit c449a67
authored
Support for Slurm 22.05 (#238)
* Organize Slurm C-API in a seperate Cython package
This removes the single-file slurm.pxd and instead
uses cythons capability to create cython-packages,
by simple creating a file "__init__.pxd" in a folder,
so that package can also be "cimported" anywhere.
Nothing really changes in the pyslurm.pyx itself,
importing the C-API stays the same. But now it is
possible to organize the C-API a bit better, for example
putting any extra functions which are not part of the
slurm headers directly but found in the libslurm.so into
a different file.
This also directly adds the appropriate header definitions
for Slurm major release 22.05
Header definitions are put into "header.pxi"
Extra libslurm.so are put into "extra.pxi"
Additional helpers are in "helpers.pxi"
* Add a script to automatically generate new header bindings
This adds a script pyslurm_bindgen.py to automatically
translate Slurms header files into a single .pxd file
with the help of autopxd2
Additionally, it translates any simple C-macros (#define)
in the headers and makes it available in the .pxd file with
its appropriate data type.
It is mostly useful to upgrade to a new major slurm release.
This makes the jinja2 approach obsolete and it can be deleted.
* Make changes to support Slurm 22.05
remove any "const_char_ptr" obsolote references
Do not use xmalloc from the (very outdated) header files anymore
Instead, in slurm/libslurm_extra we are essentially
defining the macros ourselves as functions, and simply wrap
around slurms xcalloc, which is available in libslurm.so
Actual required changes:
- removes some constants which are not in the headers anymore
- keep_alive_time was renamed to keepalive_time in the headers
- slurmdb_stats_t stats was removed from slurmdb_job_rec_t in 22.05
See SchedMD/slurm@2f5254c
- Update all version references to 22.05
* Add small guide how to update to a new major release1 parent 8febf21 commit c449a67
File tree
19 files changed
+682
-4730
lines changed- jinja2
- defines
- pyslurm
- pydefines
- slurm
- scripts
19 files changed
+682
-4730
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
0 commit comments