diff --git a/src/slurmctld/slurmctld.h b/src/slurmctld/slurmctld.h index 5898564cbdf42c1c0e6de9ed2256969d969b71d5..09a089ea87d9f1382329c87d4eb1ae8607dddcf9 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 f317ac34e099182de78284e11a776d7dff991bc2..a0d02125547789f11eb58b81d9ea0f601d29409d 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");