Fix how we transfer mapping directives to the job, ensuring that directives that can be given outside of a mapping policy (e.g., oversubscribe and no-use-local) are retained.
cmr=v1.7.4:reviewer=jsquyres:subject=Fix how we transfer mapping directives to the job This commit was SVN r30155.
Этот коммит содержится в:
родитель
9a42b77eae
Коммит
fb650aed0c
@ -425,8 +425,6 @@ int orte_rmaps_base_set_mapping_policy(orte_mapping_policy_t *policy,
|
|||||||
|
|
||||||
if (NULL == spec) {
|
if (NULL == spec) {
|
||||||
ORTE_SET_MAPPING_POLICY(tmp, ORTE_MAPPING_BYSOCKET);
|
ORTE_SET_MAPPING_POLICY(tmp, ORTE_MAPPING_BYSOCKET);
|
||||||
ORTE_SET_MAPPING_DIRECTIVE(tmp, ORTE_MAPPING_SPAN);
|
|
||||||
ORTE_UNSET_MAPPING_DIRECTIVE(tmp, ORTE_MAPPING_GIVEN);
|
|
||||||
} else {
|
} else {
|
||||||
ck = opal_argv_split(spec, ':');
|
ck = opal_argv_split(spec, ':');
|
||||||
if (2 < opal_argv_count(ck)) {
|
if (2 < opal_argv_count(ck)) {
|
||||||
|
@ -114,6 +114,26 @@ void orte_rmaps_base_map_job(int fd, short args, void *cbdata)
|
|||||||
"mca:rmaps mapping not given - using bysocket");
|
"mca:rmaps mapping not given - using bysocket");
|
||||||
ORTE_SET_MAPPING_POLICY(map->mapping, ORTE_MAPPING_BYSOCKET);
|
ORTE_SET_MAPPING_POLICY(map->mapping, ORTE_MAPPING_BYSOCKET);
|
||||||
}
|
}
|
||||||
|
/* check for oversubscribe directives */
|
||||||
|
if (!(ORTE_MAPPING_SUBSCRIBE_GIVEN & ORTE_GET_MAPPING_DIRECTIVE(orte_rmaps_base.mapping))) {
|
||||||
|
if (orte_managed_allocation) {
|
||||||
|
/* by default, we do not allow oversubscription in managed environments */
|
||||||
|
ORTE_SET_MAPPING_DIRECTIVE(map->mapping, ORTE_MAPPING_NO_OVERSUBSCRIBE);
|
||||||
|
} else {
|
||||||
|
ORTE_UNSET_MAPPING_DIRECTIVE(map->mapping, ORTE_MAPPING_NO_OVERSUBSCRIBE);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
/* pass along the directive */
|
||||||
|
if (ORTE_MAPPING_NO_OVERSUBSCRIBE & ORTE_GET_MAPPING_DIRECTIVE(orte_rmaps_base.mapping)) {
|
||||||
|
ORTE_SET_MAPPING_DIRECTIVE(map->mapping, ORTE_MAPPING_NO_OVERSUBSCRIBE);
|
||||||
|
} else {
|
||||||
|
ORTE_UNSET_MAPPING_DIRECTIVE(map->mapping, ORTE_MAPPING_NO_OVERSUBSCRIBE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* check for no-use-local directive */
|
||||||
|
if (ORTE_MAPPING_NO_USE_LOCAL & ORTE_GET_MAPPING_DIRECTIVE(orte_rmaps_base.mapping)) {
|
||||||
|
ORTE_SET_MAPPING_DIRECTIVE(map->mapping, ORTE_MAPPING_NO_USE_LOCAL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* ranking was already handled, so just use it here */
|
/* ranking was already handled, so just use it here */
|
||||||
map->ranking = orte_rmaps_base.ranking;
|
map->ranking = orte_rmaps_base.ranking;
|
||||||
|
@ -450,7 +450,7 @@ int orte_rmaps_rr_byobj(orte_job_t *jdata,
|
|||||||
* to the next node. Thus, procs tend to be "front loaded" onto the
|
* to the next node. Thus, procs tend to be "front loaded" onto the
|
||||||
* list of nodes, as opposed to being "load balanced" in the span mode
|
* list of nodes, as opposed to being "load balanced" in the span mode
|
||||||
*/
|
*/
|
||||||
if (ORTE_MAPPING_SPAN & jdata->map->mapping) {
|
if (ORTE_MAPPING_SPAN & ORTE_GET_MAPPING_DIRECTIVE(jdata->map->mapping)) {
|
||||||
return byobj_span(jdata, app, node_list, num_slots,
|
return byobj_span(jdata, app, node_list, num_slots,
|
||||||
num_procs, target, cache_level);
|
num_procs, target, cache_level);
|
||||||
}
|
}
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user