From 0fa81a3a41cca4f28b211eb2e3cc9e4d48f9c3f2 Mon Sep 17 00:00:00 2001 From: Danny Auble <da@llnl.gov> Date: Fri, 21 Apr 2006 22:41:50 +0000 Subject: [PATCH] temp mod to make this work :) --- src/sacct/sacct_stat.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/sacct/sacct_stat.c b/src/sacct/sacct_stat.c index 147182888d3..47236450886 100644 --- a/src/sacct/sacct_stat.c +++ b/src/sacct/sacct_stat.c @@ -130,7 +130,7 @@ int _sacct_query(resource_allocation_response_msg_t *job, uint32_t step_id) slurm_msg_t *msg_array_ptr; stat_jobacct_msg_t r; int i; - int *span = set_span(job->node_cnt, 0); + int *span = set_span(job->node_cnt, 4000); forward_t forward; int thr_count = 0; float tempf = 0; @@ -156,7 +156,13 @@ int _sacct_query(resource_allocation_response_msg_t *job, uint32_t step_id) thr_count = 0; forward.cnt = job->node_cnt; - forward.name = NULL; + /* we need this for forwarding, but not really anything else, so + this can be set to any sting as long as there are the same + number as hosts we are going to */ + forward.name = xmalloc(sizeof(char) * (MAX_SLURM_NAME * forward.cnt)); + for(i=0; i < forward.cnt; i++) { + strncpy(&forward.name[i*MAX_SLURM_NAME], "-", MAX_SLURM_NAME); + } forward.addr = job->node_addr; forward.node_id = NULL; forward.timeout = 5000; @@ -197,7 +203,7 @@ int _sacct_query(resource_allocation_response_msg_t *job, uint32_t step_id) thr_count++; } xfree(span); - + xfree(forward.name); if (!thr_count) { fatal("No threads created!! exiting"); } -- GitLab