Skip to content

Commit 665c38e

Browse files
committed
Error out when asymmetric topologies cannot support ppr requests
PPR placement policy requests are uniform - i.e., the specified number of procs must be placed on every object of the directed type. When the request includes a cpu/proc directive, then there must also be enough CPUs to meet the request on every object. When that isn't the case, then we need to error out and not just place the proc without binding it. Signed-off-by: Ralph Castain <[email protected]>
1 parent 8994252 commit 665c38e

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

src/mca/rmaps/base/help-prte-rmaps-base.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,3 +399,16 @@ A %s was given that defines a value multiple times:
399399
Given: %s
400400

401401
Please provide only one value for this policy, or remove it.
402+
#
403+
[not-enough-cpus]
404+
A request was made to map a specified number of processes to
405+
each object of a given type, and to bind each process to a given
406+
number of CPUs with that object. Unfortunately, at least one
407+
such object lacks enough CPUs to meet that combination of
408+
requirements:
409+
410+
#procs/obj: %d
411+
Object type: %s
412+
cpus/proc: %d
413+
414+
Please adjust the request and try again.

src/mca/rmaps/base/rmaps_base_binding.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,12 @@ static int bind_multiple(prte_job_t *jdata, prte_proc_t *proc,
370370
}
371371
hwloc_bitmap_list_asprintf(&proc->cpuset, result);
372372
hwloc_bitmap_free(result);
373+
if (NULL == proc->cpuset || 0 == strlen(proc->cpuset)) {
374+
pmix_show_help("help-prte-rmaps-base.txt", "not-enough-cpus", true,
375+
options->pprn, hwloc_obj_type_string(options->maptype),
376+
options->cpus_per_rank);
377+
return PRTE_ERR_SILENT;
378+
}
373379
return PRTE_SUCCESS;
374380
}
375381

0 commit comments

Comments
 (0)