|
Lines 54-59
Link Here
|
| 54 |
#include "src/common/xmalloc.h" |
54 |
#include "src/common/xmalloc.h" |
| 55 |
#include "src/common/xstring.h" |
55 |
#include "src/common/xstring.h" |
| 56 |
|
56 |
|
|
|
57 |
static int _nodes_in_list(char *node_list) |
| 58 |
{ |
| 59 |
hostset_t host_set = hostset_create(node_list); |
| 60 |
int count = hostset_count(host_set); |
| 61 |
hostset_destroy(host_set); |
| 62 |
return count; |
| 63 |
} |
| 64 |
|
| 57 |
static int _sort_pids_by_name(job_step_pids_t *rec_a, job_step_pids_t *rec_b) |
65 |
static int _sort_pids_by_name(job_step_pids_t *rec_a, job_step_pids_t *rec_b) |
| 58 |
{ |
66 |
{ |
| 59 |
int diff = 0; |
67 |
int diff = 0; |
|
Lines 134-139
char *
Link Here
|
| 134 |
slurm_sprint_job_step_info ( job_step_info_t * job_step_ptr, |
142 |
slurm_sprint_job_step_info ( job_step_info_t * job_step_ptr, |
| 135 |
int one_liner ) |
143 |
int one_liner ) |
| 136 |
{ |
144 |
{ |
|
|
145 |
char tmp_node_cnt[40]; |
| 137 |
char time_str[32]; |
146 |
char time_str[32]; |
| 138 |
char limit_str[32]; |
147 |
char limit_str[32]; |
| 139 |
char tmp_line[128]; |
148 |
char tmp_line[128]; |
|
Lines 164-178
slurm_sprint_job_step_info ( job_step_info_t * job_step_ptr,
Link Here
|
| 164 |
select_g_select_jobinfo_get(job_step_ptr->select_jobinfo, |
173 |
select_g_select_jobinfo_get(job_step_ptr->select_jobinfo, |
| 165 |
SELECT_JOBDATA_IONODES, |
174 |
SELECT_JOBDATA_IONODES, |
| 166 |
&io_nodes); |
175 |
&io_nodes); |
| 167 |
snprintf(tmp_line, sizeof(tmp_line), |
176 |
if (io_nodes) { |
| 168 |
"Partition=%s MidplaneList=%s[%s] Gres=%s", |
177 |
snprintf(tmp_line, sizeof(tmp_line), |
| 169 |
job_step_ptr->partition, |
178 |
"Partition=%s MidplaneList=%s[%s] Gres=%s", |
| 170 |
job_step_ptr->nodes, io_nodes, |
179 |
job_step_ptr->partition, |
| 171 |
job_step_ptr->gres); |
180 |
job_step_ptr->nodes, io_nodes, |
| 172 |
xfree(io_nodes); |
181 |
job_step_ptr->gres); |
|
|
182 |
xfree(io_nodes); |
| 183 |
} else |
| 184 |
snprintf(tmp_line, sizeof(tmp_line), |
| 185 |
"Partition=%s MidplaneList=%s Gres=%s", |
| 186 |
job_step_ptr->partition, |
| 187 |
job_step_ptr->nodes, |
| 188 |
job_step_ptr->gres); |
| 173 |
} else { |
189 |
} else { |
| 174 |
snprintf(tmp_line, sizeof(tmp_line), |
190 |
snprintf(tmp_line, sizeof(tmp_line), |
| 175 |
"Partition=%s Nodes=%s Gres=%s", |
191 |
"Partition=%s NodeList=%s Gres=%s", |
| 176 |
job_step_ptr->partition, job_step_ptr->nodes, |
192 |
job_step_ptr->partition, job_step_ptr->nodes, |
| 177 |
job_step_ptr->gres); |
193 |
job_step_ptr->gres); |
| 178 |
} |
194 |
} |
|
Lines 183-191
slurm_sprint_job_step_info ( job_step_info_t * job_step_ptr,
Link Here
|
| 183 |
xstrcat(out, "\n "); |
199 |
xstrcat(out, "\n "); |
| 184 |
|
200 |
|
| 185 |
/****** Line 3 ******/ |
201 |
/****** Line 3 ******/ |
|
|
202 |
|
| 203 |
if (cluster_flags & CLUSTER_FLAG_BGQ) { |
| 204 |
uint32_t nodes = 0; |
| 205 |
select_g_select_jobinfo_get(job_step_ptr->select_jobinfo, |
| 206 |
SELECT_JOBDATA_NODE_CNT, |
| 207 |
&nodes); |
| 208 |
convert_num_unit((float)nodes, tmp_node_cnt, |
| 209 |
sizeof(tmp_node_cnt), UNIT_NONE); |
| 210 |
} else { |
| 211 |
convert_num_unit((float)_nodes_in_list(job_step_ptr->nodes), |
| 212 |
tmp_node_cnt, sizeof(tmp_node_cnt), |
| 213 |
UNIT_NONE); |
| 214 |
} |
| 215 |
|
| 186 |
snprintf(tmp_line, sizeof(tmp_line), |
216 |
snprintf(tmp_line, sizeof(tmp_line), |
| 187 |
"Tasks=%u Name=%s Network=%s", |
217 |
"Nodes=%s Tasks=%u Name=%s Network=%s", |
| 188 |
job_step_ptr->num_tasks, job_step_ptr->name, |
218 |
tmp_node_cnt, job_step_ptr->num_tasks, job_step_ptr->name, |
| 189 |
job_step_ptr->network); |
219 |
job_step_ptr->network); |
| 190 |
xstrcat(out, tmp_line); |
220 |
xstrcat(out, tmp_line); |
| 191 |
if (one_liner) |
221 |
if (one_liner) |