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

(-)a/src/common/gres.c (-2 / +4 lines)
Lines 2736-2742 static uint32_t _job_test(void *job_gres_data, void *node_gres_data, Link Here
2736
2736
2737
		/* Pick the topology entries with the most CPUs available */
2737
		/* Pick the topology entries with the most CPUs available */
2738
		gres_avail = 0;
2738
		gres_avail = 0;
2739
		while (gres_avail < job_gres_ptr->gres_cnt_alloc) {
2739
//		while (gres_avail < job_gres_ptr->gres_cnt_alloc) {
2740
		while (1) {
2740
			top_inx = -1;
2741
			top_inx = -1;
2741
			for (j = 0; j < node_gres_ptr->topo_cnt; j++) {
2742
			for (j = 0; j < node_gres_ptr->topo_cnt; j++) {
2742
				if ((gres_avail == 0) || (cpus_avail[j] == 0)) {
2743
				if ((gres_avail == 0) || (cpus_avail[j] == 0)) {
Lines 2755-2761 static uint32_t _job_test(void *job_gres_data, void *node_gres_data, Link Here
2755
					top_inx = j;
2756
					top_inx = j;
2756
			}
2757
			}
2757
			if ((top_inx < 0) || (cpus_avail[top_inx] == 0)) {
2758
			if ((top_inx < 0) || (cpus_avail[top_inx] == 0)) {
2758
				cpu_cnt = 0;
2759
				if (gres_avail < job_gres_ptr->gres_cnt_alloc)
2760
					cpu_cnt = 0;
2759
				break;
2761
				break;
2760
			}
2762
			}
2761
			cpus_avail[top_inx] = 0;	/* Flag as used */
2763
			cpus_avail[top_inx] = 0;	/* Flag as used */

Return to ticket 1092