From 466db4be868f3fae8789d144c156d63bebd8e783 Mon Sep 17 00:00:00 2001 From: jce <jce@unknown> Date: Thu, 25 Jul 2002 02:08:43 +0000 Subject: [PATCH] 1- Added timestamp and job_ptr to step_record 2- changed a typedef for step_spec ot reflect changes in slurm_protocol_defs --- src/slurmctld/slurmctld.h | 4 +++- src/slurmctld/step_mgr.c | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/slurmctld/slurmctld.h b/src/slurmctld/slurmctld.h index 5898564cbdf..09a089ea87d 100644 --- a/src/slurmctld/slurmctld.h +++ b/src/slurmctld/slurmctld.h @@ -177,14 +177,16 @@ struct job_record { }; struct step_record { + struct job_record* job_ptr; /* ptr to the job that owns the step */ uint16_t step_id; /* step number */ + time_t start_time; /* step allocation time */ bitstr_t *node_bitmap; /* bitmap of nodes in allocated to job step */ #ifdef HAVE_LIBELAN3 qsw_jobinfo_t qsw_job; /* Elan3 switch context, opaque data structure */ #endif }; -typedef struct job_step_create_request_msg step_specs; +typedef struct job_step_specs step_specs; extern List job_list; /* list of job_record entries */ diff --git a/src/slurmctld/step_mgr.c b/src/slurmctld/step_mgr.c index f317ac34e09..a0d02125547 100644 --- a/src/slurmctld/step_mgr.c +++ b/src/slurmctld/step_mgr.c @@ -28,6 +28,7 @@ # include <config.h> #endif +#include <time.h> #include <assert.h> #include <ctype.h> #include <errno.h> @@ -56,7 +57,10 @@ create_step_record (struct job_record *job_ptr) assert (job_ptr); step_record_point = (struct step_record *) xmalloc (sizeof (struct step_record)); + step_record_point->job_ptr = job_ptr; step_record_point->step_id = (job_ptr->next_step_id)++; + step_record_point->start_time = time( NULL ) ; + if (list_append (job_ptr->step_list, step_record_point) == NULL) fatal ("create_step_record: unable to allocate memory"); -- GitLab