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

(-)a/src/srun/libsrun/multi_prog.c (-7 / +6 lines)
Lines 311-317 mpir_dump_proctable(void) Link Here
311
311
312
static int
312
static int
313
_update_task_mask(int low_num, int high_num, int *ntasks, bool *ntasks_set,
313
_update_task_mask(int low_num, int high_num, int *ntasks, bool *ntasks_set,
314
		  bitstr_t *task_mask, bool ignore_duplicates)
314
		  bitstr_t **task_mask, bool ignore_duplicates)
315
{
315
{
316
	int i;
316
	int i;
317
317
Lines 332-355 _update_task_mask(int low_num, int high_num, int *ntasks, bool *ntasks_set, Link Here
332
			*ntasks = high_num + 1;
332
			*ntasks = high_num + 1;
333
			*ntasks_set = true;
333
			*ntasks_set = true;
334
			i_set_ntasks = true;
334
			i_set_ntasks = true;
335
			task_mask = bit_realloc(task_mask, *ntasks);
335
			(*task_mask) = bit_realloc((*task_mask), *ntasks);
336
		}
336
		}
337
	}
337
	}
338
	for (i=low_num; i<=high_num; i++) {
338
	for (i=low_num; i<=high_num; i++) {
339
		if (bit_test(task_mask, i)) {
339
		if (bit_test((*task_mask), i)) {
340
			if (ignore_duplicates)
340
			if (ignore_duplicates)
341
				continue;
341
				continue;
342
			error("Duplicate record for task %d", i);
342
			error("Duplicate record for task %d", i);
343
			return -1;
343
			return -1;
344
		}
344
		}
345
		bit_set(task_mask, i);
345
		bit_set((*task_mask), i);
346
	}
346
	}
347
	return 0;
347
	return 0;
348
}
348
}
349
349
350
static int
350
static int
351
_validate_ranks(char *ranks, int *ntasks, bool *ntasks_set, int32_t *ncmds,
351
_validate_ranks(char *ranks, int *ntasks, bool *ntasks_set, int32_t *ncmds,
352
		bitstr_t *task_mask)
352
		bitstr_t **task_mask)
353
{
353
{
354
	static bool has_asterisk = false;
354
	static bool has_asterisk = false;
355
	char *range = NULL, *p = NULL;
355
	char *range = NULL, *p = NULL;
Lines 467-473 verify_multi_name(char *config_fname, int *ntasks, bool *ntasks_set, Link Here
467
			goto fini;
467
			goto fini;
468
		}
468
		}
469
		if (_validate_ranks(ranks, ntasks, ntasks_set, ncmds,
469
		if (_validate_ranks(ranks, ntasks, ntasks_set, ncmds,
470
				    task_mask)) {
470
				    &task_mask)) {
471
			error("Line %d of configuration file %s invalid",
471
			error("Line %d of configuration file %s invalid",
472
				line_num, config_fname);
472
				line_num, config_fname);
473
			rc = -1;
473
			rc = -1;
474
- 

Return to ticket 3062