diff --git a/NEWS b/NEWS index b4b1794efe58ce161b97bc45f050863e6df55097..2b8bc7d524e2ff2c99a2fd8aad829b701617e28c 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 ae005e361eba7aa7c4334ee3679691ad49dcfc18..227f24ef47d95d7001a2d276a303700fd25b746d 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 058a4aa67fdcf3bcaf110fc996f7e49114bed4f5..30d3aea6f08c253a1ae36b8c083821c2ac6a64d1 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); }