Skip to content

Commit 7dc18c4

Browse files
committed
retrieving the batch-script works now.
1 parent a9c8541 commit 7dc18c4

File tree

1 file changed

+19
-9
lines changed

1 file changed

+19
-9
lines changed

pyslurm/slurm/extra.pxi

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# For example: to communicate with the slurmctld directly in order
66
# to retrieve the actual batch-script as a string.
77
#
8-
# https://github.com/SchedMD/slurm/blob/slurm-24-05-3-1/src/common/persist_conn.h#L53
8+
# https://github.com/SchedMD/slurm/blob/slurm-24-11-0-1/src/common/persist_conn.h#L53
99
ctypedef enum persist_conn_type_t:
1010
PERSIST_TYPE_NONE = 0
1111
PERSIST_TYPE_DBD
@@ -14,7 +14,7 @@ ctypedef enum persist_conn_type_t:
1414
PERSIST_TYPE_HA_DBD
1515
PERSIST_TYPE_ACCT_UPDATE
1616

17-
# https://github.com/SchedMD/slurm/blob/slurm-24-05-3-1/src/common/persist_conn.h#L62
17+
# https://github.com/SchedMD/slurm/blob/slurm-24-11-0-1/src/common/persist_conn.h#L62
1818
ctypedef struct persist_msg_t:
1919
void *conn
2020
void *data
@@ -24,7 +24,7 @@ ctypedef int (*_persist_conn_t_callback_proc)(void *arg, persist_msg_t *msg, buf
2424

2525
ctypedef void (*_persist_conn_t_callback_fini)(void *arg)
2626

27-
# https://github.com/SchedMD/slurm/blob/slurm-24-05-3-1/src/common/persist_conn.h#L68
27+
# https://github.com/SchedMD/slurm/blob/slurm-24-11-0-1/src/common/persist_conn.h#L68
2828
ctypedef struct persist_conn_t:
2929
void *auth_cred
3030
uid_t auth_uid
@@ -49,7 +49,7 @@ ctypedef struct persist_conn_t:
4949
slurm_trigger_callbacks_t trigger_callbacks
5050
uint16_t version
5151

52-
# https://github.com/SchedMD/slurm/blob/slurm-24-05-3-1/src/common/pack.h#L68
52+
# https://github.com/SchedMD/slurm/blob/slurm-24-11-0-1/src/common/pack.h#L68
5353
ctypedef struct buf_t:
5454
uint32_t magic
5555
char *head
@@ -58,11 +58,11 @@ ctypedef struct buf_t:
5858
bool mmaped
5959
bool shadow
6060

61-
# https://github.com/SchedMD/slurm/blob/slurm-24-05-3-1/src/common/slurm_protocol_defs.h#L731
61+
# https://github.com/SchedMD/slurm/blob/slurm-24-11-0-1/src/common/slurm_protocol_defs.h#L761
6262
ctypedef struct return_code_msg_t:
6363
uint32_t return_code
6464

65-
# https://github.com/SchedMD/slurm/blob/slurm-24-05-3-1/src/common/slurm_protocol_defs.h#L405
65+
# https://github.com/SchedMD/slurm/blob/slurm-24-11-0-1/src/common/slurm_protocol_defs.h#L432
6666
ctypedef struct job_id_msg_t:
6767
uint32_t job_id
6868
uint16_t show_flags
@@ -75,16 +75,17 @@ ctypedef enum slurm_msg_type_t:
7575
RESPONSE_BATCH_SCRIPT = 2052
7676
RESPONSE_SLURM_RC = 8001
7777

78-
# https://github.com/SchedMD/slurm/blob/slurm-24-05-3-1/src/common/slurm_protocol_defs.h#L231
78+
# https://github.com/SchedMD/slurm/blob/slurm-24-11-0-1/src/common/slurm_protocol_defs.h#L240
7979
ctypedef struct forward_t:
8080
slurm_node_alias_addrs_t alias_addrs
8181
uint16_t cnt
8282
uint16_t init
8383
char *nodelist
8484
uint32_t timeout
8585
uint16_t tree_width
86+
uint16_t tree_depth
8687

87-
# https://github.com/SchedMD/slurm/blob/slurm-24-05-3-1/src/common/slurm_protocol_defs.h#L254
88+
# https://github.com/SchedMD/slurm/blob/slurm-24-11-0-1/src/common/slurm_protocol_defs.h#L269
8889
ctypedef struct forward_struct_t:
8990
slurm_node_alias_addrs_t *alias_addrs
9091
char *buf
@@ -95,7 +96,15 @@ ctypedef struct forward_struct_t:
9596
list_t *ret_list
9697
uint32_t timeout
9798

98-
# https://github.com/SchedMD/slurm/blob/slurm-24-05-3-1/src/common/slurm_protocol_defs.h#L271
99+
100+
cdef extern from *:
101+
"""
102+
typedef struct conmgr_fd_s conmgr_fd_t; \
103+
"""
104+
ctypedef struct conmgr_fd_t
105+
106+
107+
# https://github.com/SchedMD/slurm/blob/slurm-24-11-0-1/src/common/slurm_protocol_defs.h#L286
99108
ctypedef struct slurm_msg_t:
100109
slurm_addr_t address
101110
void *auth_cred
@@ -109,6 +118,7 @@ ctypedef struct slurm_msg_t:
109118
buf_t *buffer
110119
persist_conn_t *conn
111120
int conn_fd
121+
conmgr_fd_t *conmgr_fd
112122
void *data
113123
uint16_t flags
114124
uint8_t hash_index

0 commit comments

Comments
 (0)