From 94690c36e91b022ddffae767b8b5a07c8c2882b7 Mon Sep 17 00:00:00 2001 From: Danny Auble <da@llnl.gov> Date: Wed, 4 Nov 2009 19:28:04 +0000 Subject: [PATCH] changed used to allocated --- NEWS | 5 +++-- slurm/slurm.h.in | 8 ++++---- src/api/job_info.c | 10 +++++----- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/NEWS b/NEWS index b4b1794efe5..2b8bc7d524e 100644 --- a/NEWS +++ b/NEWS @@ -19,8 +19,9 @@ documents those changes that are of interest to users and admins. the slurmctld or slurmstepd dump core on a seg fault. -- Moved the errant slurm_job_node_ready() declaration from job_info.h to slurm.h and deleted job_info.h. - -- Added the slurm_job_cpus_used_on_node_inx() slurm_job_cpus_used_on_node() - API for working with the job_resources_t structure. + -- Added the slurm_job_cpus_allocated_on_node_inx() + slurm_job_cpus_allocated_on_node() API for working with the + job_resources_t structure. * Changes in SLURM 2.1.0-pre5 ============================= diff --git a/slurm/slurm.h.in b/slurm/slurm.h.in index ae005e361eb..227f24ef47d 100644 --- a/slurm/slurm.h.in +++ b/slurm/slurm.h.in @@ -1920,8 +1920,8 @@ void slurm_print_key_pairs PARAMS(( * IN node_inx - node index * RET cpus used or -1 on error */ -extern int slurm_job_cpus_used_on_node_inx PARAMS( - (struct job_resources *job_resrcs_ptr, int node_inx)); +extern int slurm_job_cpus_allocated_on_node_inx PARAMS( + (job_resources_t *job_resrcs_ptr, int node_inx)); /* * slurm_cpus_used_on_node - get the number of cpus a job used on a node @@ -1930,8 +1930,8 @@ extern int slurm_job_cpus_used_on_node_inx PARAMS( * IN node_name - name of node * RET cpus used or -1 on error */ -extern int slurm_job_cpus_used_on_node PARAMS( - (struct job_resources *job_resrcs_ptr, char *node_name)); +extern int slurm_job_cpus_allocated_on_node PARAMS( + (job_resources_t *job_resrcs_ptr, char *node_name)); /*****************************************************************************\ * SLURM JOB CONTROL CONFIGURATION READ/PRINT/UPDATE FUNCTIONS diff --git a/src/api/job_info.c b/src/api/job_info.c index 058a4aa67fd..30d3aea6f08 100644 --- a/src/api/job_info.c +++ b/src/api/job_info.c @@ -1061,8 +1061,8 @@ extern int slurm_job_node_ready(uint32_t job_id) return rc; } -extern int slurm_job_cpus_used_on_node_inx(struct job_resources *job_resrcs_ptr, - int node_inx) +extern int slurm_job_cpus_allocated_on_node_inx( + job_resources_t *job_resrcs_ptr, int node_inx) { int i; int start_node=-1; /* start with -1 less so the array reps @@ -1082,8 +1082,8 @@ extern int slurm_job_cpus_used_on_node_inx(struct job_resources *job_resrcs_ptr, return job_resrcs_ptr->cpu_array_value[i]; } -extern int slurm_job_cpus_used_on_node(struct job_resources *job_resrcs_ptr, - char *node) +extern int slurm_job_cpus_allocated_on_node( + job_resources_t *job_resrcs_ptr, char *node) { int node_inx; @@ -1104,6 +1104,6 @@ extern int slurm_job_cpus_used_on_node(struct job_resources *job_resrcs_ptr, return -1; } - return slurm_job_cpus_used_on_node_inx(job_resrcs_ptr, node_inx); + return slurm_job_cpus_allocated_on_node_inx(job_resrcs_ptr, node_inx); } -- GitLab