From c0bb24901982d999e467e62caca3434b058dc2ce Mon Sep 17 00:00:00 2001 From: Moe Jette <jette1@llnl.gov> Date: Mon, 23 Sep 2002 18:50:08 +0000 Subject: [PATCH] Added step_id along with job_id list of active jobs on node registration. --- src/common/slurm_protocol_defs.c | 2 ++ src/common/slurm_protocol_defs.h | 1 + src/common/slurm_protocol_pack.c | 7 +++++++ 3 files changed, 10 insertions(+) diff --git a/src/common/slurm_protocol_defs.c b/src/common/slurm_protocol_defs.c index 968a32b3332..71d54da02ff 100644 --- a/src/common/slurm_protocol_defs.c +++ b/src/common/slurm_protocol_defs.c @@ -346,6 +346,8 @@ slurm_free_node_registration_status_msg xfree(msg->node_name); if (msg->job_id) xfree(msg->job_id); + if (msg->step_id) + xfree(msg->step_id); xfree(msg); } } diff --git a/src/common/slurm_protocol_defs.h b/src/common/slurm_protocol_defs.h index 303aa60ef80..6638901c188 100644 --- a/src/common/slurm_protocol_defs.h +++ b/src/common/slurm_protocol_defs.h @@ -536,6 +536,7 @@ typedef struct slurm_node_registration_status_msg { uint32_t temporary_disk_space; uint32_t job_count; /* number of associate job_id's */ uint32_t *job_id; /* IDs of running job (if any) */ + uint16_t *step_id; /* IDs of running job steps (if any) */ } slurm_node_registration_status_msg_t; typedef struct slurm_ctl_conf slurm_ctl_conf_info_msg_t; diff --git a/src/common/slurm_protocol_pack.c b/src/common/slurm_protocol_pack.c index e234a99206f..7fef8de21ae 100644 --- a/src/common/slurm_protocol_pack.c +++ b/src/common/slurm_protocol_pack.c @@ -439,6 +439,9 @@ void pack_node_registration_status_msg ( slurm_node_registration_status_msg_t * for (i = 0; i < msg->job_count ; i++) { pack32 ( msg -> job_id[i] , ( void ** ) buffer , length ) ; } + for (i = 0; i < msg->job_count ; i++) { + pack16 ( msg -> step_id[i] , ( void ** ) buffer , length ) ; + } } int unpack_node_registration_status_msg ( slurm_node_registration_status_msg_t ** msg , void ** buffer , uint32_t * length ) @@ -468,6 +471,10 @@ int unpack_node_registration_status_msg ( slurm_node_registration_status_msg_t * for (i = 0; i < node_reg_ptr->job_count ; i++) { unpack32 ( & node_reg_ptr->job_id[i] , ( void ** ) buffer , length ) ; } + node_reg_ptr -> step_id = xmalloc (sizeof (uint16_t) * node_reg_ptr->job_count); + for (i = 0; i < node_reg_ptr->job_count ; i++) { + unpack16 ( & node_reg_ptr->step_id[i] , ( void ** ) buffer , length ) ; + } *msg = node_reg_ptr ; return 0 ; } -- GitLab