View | Details | Raw Unified | Return to ticket 850
Collapse All | Expand All

(-)/app/slurm/nlk/git/dev/src/api/job_info.c (-11 / +20 lines)
Lines 283-289 Link Here
283
extern char *
283
extern char *
284
slurm_sprint_job_info ( job_info_t * job_ptr, int one_liner )
284
slurm_sprint_job_info ( job_info_t * job_ptr, int one_liner )
285
{
285
{
286
	int i, j;
286
	int i, j, k;
287
	char time_str[32], *group_name, *user_name;
287
	char time_str[32], *group_name, *user_name;
288
	char tmp1[128], tmp2[128], tmp3[128], tmp4[128], tmp5[128], tmp6[128];
288
	char tmp1[128], tmp2[128], tmp3[128], tmp4[128], tmp5[128], tmp6[128];
289
	char *tmp6_ptr;
289
	char *tmp6_ptr;
Lines 295-301 Link Here
295
	time_t run_time;
295
	time_t run_time;
296
	uint32_t min_nodes, max_nodes = 0;
296
	uint32_t min_nodes, max_nodes = 0;
297
	char *nodelist = "NodeList";
297
	char *nodelist = "NodeList";
298
	bitstr_t *core_bitmap;
298
	bitstr_t *cpu_bitmap;
299
	char *host;
299
	char *host;
300
	int sock_inx, sock_reps, last;
300
	int sock_inx, sock_reps, last;
301
	int abs_node_inx, rel_node_inx;
301
	int abs_node_inx, rel_node_inx;
Lines 307-312 Link Here
307
	hostlist_t hl, hl_last;
307
	hostlist_t hl, hl_last;
308
	char select_buf[122];
308
	char select_buf[122];
309
	uint32_t cluster_flags = slurmdb_setup_cluster_flags();
309
	uint32_t cluster_flags = slurmdb_setup_cluster_flags();
310
	node_info_msg_t *node_ptr;
311
	uint32_t threads;
310
312
311
	if (cluster_flags & CLUSTER_FLAG_BG) {
313
	if (cluster_flags & CLUSTER_FLAG_BG) {
312
		nodelist = "MidplaneList";
314
		nodelist = "MidplaneList";
Lines 755-771 Link Here
755
753
756
			bit_reps = job_resrcs->sockets_per_node[sock_inx] *
754
			bit_reps = job_resrcs->sockets_per_node[sock_inx] *
757
				job_resrcs->cores_per_socket[sock_inx];
755
				job_resrcs->cores_per_socket[sock_inx];
758
756
			host = hostlist_shift(hl);
759
			core_bitmap = bit_alloc(bit_reps);
757
			if (slurm_load_node_single(&node_ptr, host, 0) ==
760
			for (j=0; j < bit_reps; j++) {
758
			    SLURM_PROTOCOL_SUCCESS)
761
				if (bit_test(job_resrcs->core_bitmap, bit_inx))
759
				threads = node_ptr->node_array->threads;
762
					bit_set(core_bitmap, j);
760
			else
761
				threads = 1;
762
			slurm_free_node_info_msg(node_ptr);
763
			cpu_bitmap = bit_alloc(bit_reps * threads);
764
			for (j = 0; j < bit_reps; j++) {
765
				if (bit_test(job_resrcs->core_bitmap, bit_inx)){
766
					for (k = 0; k < threads; k++)
767
						bit_set(cpu_bitmap,
768
							(j * threads) + k);
769
				}
763
				bit_inx++;
770
				bit_inx++;
764
			}
771
			}
765
772
			bit_fmt(tmp1, sizeof(tmp1), cpu_bitmap);
766
			bit_fmt(tmp1, sizeof(tmp1), core_bitmap);
773
			FREE_NULL_BITMAP(cpu_bitmap);
767
			FREE_NULL_BITMAP(core_bitmap);
768
			host = hostlist_shift(hl);
769
/*
774
/*
770
 *		If the allocation values for this host are not the same as the
775
 *		If the allocation values for this host are not the same as the
771
 *		last host, print the report of the last group of hosts that had
776
 *		last host, print the report of the last group of hosts that had

Return to ticket 850