Skip to content

Commit 7112533

Browse files
committed
Some fixes to pyslurm.pyx due to backporting newer features from main
1 parent 4865124 commit 7112533

File tree

1 file changed

+35
-14
lines changed

1 file changed

+35
-14
lines changed

pyslurm/pyslurm.pyx

Lines changed: 35 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,9 @@ cdef inline IS_NODE_DRAINING(slurm.node_info_t _X):
233233
return ((_X.node_state & NODE_STATE_DRAIN) and
234234
(IS_NODE_ALLOCATED(_X) or IS_NODE_MIXED(_X)))
235235

236+
cdef inline IS_NODE_DYNAMIC(slurm.node_info_t _X):
237+
return (_X.node_state and NODE_STATE_DYNAMIC)
238+
236239
cdef inline IS_NODE_DRAINED(slurm.node_info_t _X):
237240
return (IS_NODE_DRAIN(_X) and not IS_NODE_DRAINING(_X))
238241

@@ -619,9 +622,11 @@ cdef class config:
619622
Ctl_dict['job_file_append'] = bool(self.__Config_ptr.job_file_append)
620623
Ctl_dict['job_requeue'] = bool(self.__Config_ptr.job_requeue)
621624
Ctl_dict['job_submit_plugins'] = slurm.stringOrNone(self.__Config_ptr.job_submit_plugins, '')
622-
Ctl_dict['keep_alive_time'] = slurm.int16orNone(self.__Config_ptr.keepalive_time)
625+
Ctl_dict['keep_alive_time'] = slurm.int16orNone(self.__Config_ptr.keep_alive_time)
623626
Ctl_dict['kill_on_bad_exit'] = bool(self.__Config_ptr.kill_on_bad_exit)
624627
Ctl_dict['kill_wait'] = self.__Config_ptr.kill_wait
628+
Ctl_dict['launch_params'] = slurm.stringOrNone(self.__Config_ptr.launch_type, '')
629+
Ctl_dict['launch_type'] = slurm.stringOrNone(self.__Config_ptr.launch_type, '')
625630
Ctl_dict['licenses'] = __get_licenses(self.__Config_ptr.licenses)
626631
Ctl_dict['log_fmt'] = self.__Config_ptr.log_fmt
627632
Ctl_dict['mail_domain'] = slurm.stringOrNone(self.__Config_ptr.mail_domain, '')
@@ -717,6 +722,7 @@ cdef class config:
717722
# TODO: slurmctld_host
718723
Ctl_dict['slurmctld_logfile'] = slurm.stringOrNone(self.__Config_ptr.slurmctld_logfile, '')
719724
Ctl_dict['slurmctld_pidfile'] = slurm.stringOrNone(self.__Config_ptr.slurmctld_pidfile, '')
725+
Ctl_dict['slurmctld_plugstack'] = slurm.stringOrNone(self.__Config_ptr.slurmctld_plugstack, '')
720726
Ctl_dict['slurmctld_port'] = self.__Config_ptr.slurmctld_port
721727
Ctl_dict['slurmctld_port_count'] = self.__Config_ptr.slurmctld_port_count
722728
Ctl_dict['slurmctld_primary_off_prog'] = slurm.stringOrNone(self.__Config_ptr.slurmctld_primary_off_prog, '')
@@ -4877,8 +4883,6 @@ cdef class statistics:
48774883
3011: "REQUEST_UPDATE_FRONT_END",
48784884
3012: "DEFUNCT_RPC_3012",
48794885
3013: "DEFUNCT_RPC_3013",
4880-
3014: "REQUEST_DELETE_NODE",
4881-
3015: "REQUEST_CREATE_NODE",
48824886

48834887
4001: "REQUEST_RESOURCE_ALLOCATION",
48844888
4002: "RESPONSE_RESOURCE_ALLOCATION",
@@ -4973,7 +4977,7 @@ cdef class statistics:
49734977
6013: "REQUEST_ABORT_JOB",
49744978

49754979
6014: "REQUEST_FILE_BCAST",
4976-
6015: "DEFUNCT_RPC_6015",
4980+
6015: "TASK_USER_MANAGED_IO_STREAM",
49774981
6016: "REQUEST_KILL_PREEMPTED",
49784982

49794983
6017: "REQUEST_LAUNCH_PROLOG",
@@ -4987,7 +4991,7 @@ cdef class statistics:
49874991
7003: "SRUN_NODE_FAIL",
49884992
7004: "SRUN_JOB_COMPLETE",
49894993
7005: "SRUN_USER_MSG",
4990-
7006: "DEFUNCT_RPC_7006",
4994+
7006: "SRUN_EXEC",
49914995
7007: "SRUN_STEP_MISSING",
49924996
7008: "SRUN_REQUEST_SUSPEND",
49934997
7009: "SRUN_STEP_SIGNAL",
@@ -5010,15 +5014,6 @@ cdef class statistics:
50105014
10003: "ACCOUNTING_REGISTER_CTLD",
50115015
10004: "ACCOUNTING_TRES_CHANGE_DB",
50125016
10005: "ACCOUNTING_NODES_CHANGE_DB",
5013-
5014-
11001: "SLURMSCRIPTD_REQUEST_FLUSH",
5015-
11002: "SLURMSCRIPTD_REQUEST_FLUSH_JOB",
5016-
11003: "SLURMSCRIPTD_REQUEST_RECONFIG",
5017-
11004: "SLURMSCRIPTD_REQUEST_RUN_SCRIPT",
5018-
11005: "SLURMSCRIPTD_REQUEST_SCRIPT_COMPLETE",
5019-
11006: "SLURMSCRIPTD_REQUEST_UPDATE_DEBUG_FLAGS",
5020-
11007: "SLURMSCRIPTD_REQUEST_UPDATE_LOG",
5021-
11008: "SLURMSCRIPTD_SHUTDOWN",
50225017
}
50235018
return num2string[opcode]
50245019

@@ -5440,6 +5435,25 @@ cdef class slurmdb_jobs:
54405435
# TRES are reported as strings in the format `TRESID=value` where TRESID is one of:
54415436
# TRES_CPU=1, TRES_MEM=2, TRES_ENERGY=3, TRES_NODE=4, TRES_BILLING=5, TRES_FS_DISK=6, TRES_VMEM=7, TRES_PAGES=8
54425437
# Example: '1=0,2=745472,3=0,6=1949,7=7966720,8=0'
5438+
JOBS_info['stats'] = {}
5439+
stats = JOBS_info['stats']
5440+
stats['act_cpufreq'] = job.stats.act_cpufreq
5441+
stats['consumed_energy'] = job.stats.consumed_energy
5442+
stats['tres_usage_in_max'] = slurm.stringOrNone(job.stats.tres_usage_in_max, '')
5443+
stats['tres_usage_in_max_nodeid'] = slurm.stringOrNone(job.stats.tres_usage_in_max_nodeid, '')
5444+
stats['tres_usage_in_max_taskid'] = slurm.stringOrNone(job.stats.tres_usage_in_max_taskid, '')
5445+
stats['tres_usage_in_min'] = slurm.stringOrNone(job.stats.tres_usage_in_min, '')
5446+
stats['tres_usage_in_min_nodeid'] = slurm.stringOrNone(job.stats.tres_usage_in_min_nodeid, '')
5447+
stats['tres_usage_in_min_taskid'] = slurm.stringOrNone(job.stats.tres_usage_in_min_taskid, '')
5448+
stats['tres_usage_in_tot'] = slurm.stringOrNone(job.stats.tres_usage_in_tot, '')
5449+
stats['tres_usage_out_ave'] = slurm.stringOrNone(job.stats.tres_usage_out_ave, '')
5450+
stats['tres_usage_out_max'] = slurm.stringOrNone(job.stats.tres_usage_out_max, '')
5451+
stats['tres_usage_out_max_nodeid'] = slurm.stringOrNone(job.stats.tres_usage_out_max_nodeid, '')
5452+
stats['tres_usage_out_max_taskid'] = slurm.stringOrNone(job.stats.tres_usage_out_max_taskid, '')
5453+
stats['tres_usage_out_min'] = slurm.stringOrNone(job.stats.tres_usage_out_min, '')
5454+
stats['tres_usage_out_min_nodeid'] = slurm.stringOrNone(job.stats.tres_usage_out_min_nodeid, '')
5455+
stats['tres_usage_out_min_taskid'] = slurm.stringOrNone(job.stats.tres_usage_out_min_taskid, '')
5456+
stats['tres_usage_out_tot'] = slurm.stringOrNone(job.stats.tres_usage_out_tot, '')
54435457

54445458
# add job steps
54455459
JOBS_info['steps'] = {}
@@ -5520,6 +5534,7 @@ cdef class slurmdb_jobs:
55205534
JOBS_info['timelimit'] = job.timelimit
55215535
JOBS_info['tot_cpu_sec'] = job.tot_cpu_sec
55225536
JOBS_info['tot_cpu_usec'] = job.tot_cpu_usec
5537+
JOBS_info['track_steps'] = job.track_steps
55235538
JOBS_info['tres_alloc_str'] = slurm.stringOrNone(job.tres_alloc_str,'')
55245539
JOBS_info['tres_req_str'] = slurm.stringOrNone(job.tres_req_str,'')
55255540
JOBS_info['uid'] = job.uid
@@ -6230,6 +6245,9 @@ cdef inline list debug_flags2str(uint64_t debug_flags):
62306245
if (debug_flags & DEBUG_FLAG_DB_WCKEY):
62316246
debugFlags.append('DB_WCKey')
62326247

6248+
if (debug_flags & DEBUG_FLAG_ESEARCH):
6249+
debugFlags.append('Elasticsearch')
6250+
62336251
if (debug_flags & DEBUG_FLAG_ENERGY):
62346252
debugFlags.append('Energy')
62356253

@@ -6296,6 +6314,9 @@ cdef inline list debug_flags2str(uint64_t debug_flags):
62966314
if (debug_flags & DEBUG_FLAG_SWITCH):
62976315
debugFlags.append('Switch')
62986316

6317+
if (debug_flags & DEBUG_FLAG_TASK):
6318+
debugFlags.append('Task')
6319+
62996320
if (debug_flags & DEBUG_FLAG_TIME_CRAY):
63006321
debugFlags.append('TimeCray')
63016322

0 commit comments

Comments
 (0)