rmaps: warn if oversubscribing when manually setting the number of hosts
This is a port of the v1.10 series one-off open-mpi/ompi-release@8c5ce45ab6
Этот коммит содержится в:
родитель
8ab28cdc82
Коммит
352b05a552
@ -3,6 +3,8 @@
|
|||||||
* Copyright (c) 2011 Los Alamos National Security, LLC.
|
* Copyright (c) 2011 Los Alamos National Security, LLC.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
|
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
|
||||||
|
* Copyright (c) 2015 Research Organization for Information Science
|
||||||
|
* and Technology (RIST). All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
@ -346,6 +348,22 @@ static int ppr_mapper(orte_job_t *jdata)
|
|||||||
* properly set
|
* properly set
|
||||||
*/
|
*/
|
||||||
ORTE_FLAG_SET(node, ORTE_NODE_FLAG_OVERSUBSCRIBED);
|
ORTE_FLAG_SET(node, ORTE_NODE_FLAG_OVERSUBSCRIBED);
|
||||||
|
/* check for permission */
|
||||||
|
if (ORTE_FLAG_TEST(node, ORTE_NODE_FLAG_SLOTS_GIVEN)) {
|
||||||
|
/* if we weren't given a directive either way, then we will error out
|
||||||
|
* as the #slots were specifically given, either by the host RM or
|
||||||
|
* via hostfile/dash-host */
|
||||||
|
if (!(ORTE_MAPPING_SUBSCRIBE_GIVEN & ORTE_GET_MAPPING_DIRECTIVE(orte_rmaps_base.mapping))) {
|
||||||
|
orte_show_help("help-orte-rmaps-base.txt", "orte-rmaps-base:alloc-error",
|
||||||
|
true, app->num_procs, app->app);
|
||||||
|
return ORTE_ERR_SILENT;
|
||||||
|
} else if (ORTE_MAPPING_NO_OVERSUBSCRIBE & ORTE_GET_MAPPING_DIRECTIVE(jdata->map->mapping)) {
|
||||||
|
/* if we were explicitly told not to oversubscribe, then don't */
|
||||||
|
orte_show_help("help-orte-rmaps-base.txt", "orte-rmaps-base:alloc-error",
|
||||||
|
true, app->num_procs, app->app);
|
||||||
|
return ORTE_ERR_SILENT;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if we haven't mapped all the procs, continue on to the
|
/* if we haven't mapped all the procs, continue on to the
|
||||||
|
@ -11,6 +11,8 @@
|
|||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
* Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved.
|
* Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved.
|
||||||
* Copyright (c) 2013-2015 Intel, Inc. All rights reserved.
|
* Copyright (c) 2013-2015 Intel, Inc. All rights reserved.
|
||||||
|
* Copyright (c) 2015 Research Organization for Information Science
|
||||||
|
* and Technology (RIST). All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
@ -184,6 +186,22 @@ int orte_rmaps_rr_byslot(orte_job_t *jdata,
|
|||||||
* properly set
|
* properly set
|
||||||
*/
|
*/
|
||||||
ORTE_FLAG_SET(node, ORTE_NODE_FLAG_OVERSUBSCRIBED);
|
ORTE_FLAG_SET(node, ORTE_NODE_FLAG_OVERSUBSCRIBED);
|
||||||
|
/* check for permission */
|
||||||
|
if (ORTE_FLAG_TEST(node, ORTE_NODE_FLAG_SLOTS_GIVEN)) {
|
||||||
|
/* if we weren't given a directive either way, then we will error out
|
||||||
|
* as the #slots were specifically given, either by the host RM or
|
||||||
|
* via hostfile/dash-host */
|
||||||
|
if (!(ORTE_MAPPING_SUBSCRIBE_GIVEN & ORTE_GET_MAPPING_DIRECTIVE(orte_rmaps_base.mapping))) {
|
||||||
|
orte_show_help("help-orte-rmaps-base.txt", "orte-rmaps-base:alloc-error",
|
||||||
|
true, app->num_procs, app->app);
|
||||||
|
return ORTE_ERR_SILENT;
|
||||||
|
} else if (ORTE_MAPPING_NO_OVERSUBSCRIBE & ORTE_GET_MAPPING_DIRECTIVE(jdata->map->mapping)) {
|
||||||
|
/* if we were explicitly told not to oversubscribe, then don't */
|
||||||
|
orte_show_help("help-orte-rmaps-base.txt", "orte-rmaps-base:alloc-error",
|
||||||
|
true, app->num_procs, app->app);
|
||||||
|
return ORTE_ERR_SILENT;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* if we have mapped everything, then we are done */
|
/* if we have mapped everything, then we are done */
|
||||||
if (nprocs_mapped == app->num_procs) {
|
if (nprocs_mapped == app->num_procs) {
|
||||||
@ -349,6 +367,22 @@ int orte_rmaps_rr_bynode(orte_job_t *jdata,
|
|||||||
* properly set
|
* properly set
|
||||||
*/
|
*/
|
||||||
ORTE_FLAG_SET(node, ORTE_NODE_FLAG_OVERSUBSCRIBED);
|
ORTE_FLAG_SET(node, ORTE_NODE_FLAG_OVERSUBSCRIBED);
|
||||||
|
/* check for permission */
|
||||||
|
if (ORTE_FLAG_TEST(node, ORTE_NODE_FLAG_SLOTS_GIVEN)) {
|
||||||
|
/* if we weren't given a directive either way, then we will error out
|
||||||
|
* as the #slots were specifically given, either by the host RM or
|
||||||
|
* via hostfile/dash-host */
|
||||||
|
if (!(ORTE_MAPPING_SUBSCRIBE_GIVEN & ORTE_GET_MAPPING_DIRECTIVE(orte_rmaps_base.mapping))) {
|
||||||
|
orte_show_help("help-orte-rmaps-base.txt", "orte-rmaps-base:alloc-error",
|
||||||
|
true, app->num_procs, app->app);
|
||||||
|
return ORTE_ERR_SILENT;
|
||||||
|
} else if (ORTE_MAPPING_NO_OVERSUBSCRIBE & ORTE_GET_MAPPING_DIRECTIVE(jdata->map->mapping)) {
|
||||||
|
/* if we were explicitly told not to oversubscribe, then don't */
|
||||||
|
orte_show_help("help-orte-rmaps-base.txt", "orte-rmaps-base:alloc-error",
|
||||||
|
true, app->num_procs, app->app);
|
||||||
|
return ORTE_ERR_SILENT;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (nprocs_mapped == app->num_procs) {
|
if (nprocs_mapped == app->num_procs) {
|
||||||
/* we are done */
|
/* we are done */
|
||||||
@ -550,6 +584,22 @@ int orte_rmaps_rr_byobj(orte_job_t *jdata,
|
|||||||
* properly set
|
* properly set
|
||||||
*/
|
*/
|
||||||
ORTE_FLAG_SET(node, ORTE_NODE_FLAG_OVERSUBSCRIBED);
|
ORTE_FLAG_SET(node, ORTE_NODE_FLAG_OVERSUBSCRIBED);
|
||||||
|
/* check for permission */
|
||||||
|
if (ORTE_FLAG_TEST(node, ORTE_NODE_FLAG_SLOTS_GIVEN)) {
|
||||||
|
/* if we weren't given a directive either way, then we will error out
|
||||||
|
* as the #slots were specifically given, either by the host RM or
|
||||||
|
* via hostfile/dash-host */
|
||||||
|
if (!(ORTE_MAPPING_SUBSCRIBE_GIVEN & ORTE_GET_MAPPING_DIRECTIVE(orte_rmaps_base.mapping))) {
|
||||||
|
orte_show_help("help-orte-rmaps-base.txt", "orte-rmaps-base:alloc-error",
|
||||||
|
true, app->num_procs, app->app);
|
||||||
|
return ORTE_ERR_SILENT;
|
||||||
|
} else if (ORTE_MAPPING_NO_OVERSUBSCRIBE & ORTE_GET_MAPPING_DIRECTIVE(jdata->map->mapping)) {
|
||||||
|
/* if we were explicitly told not to oversubscribe, then don't */
|
||||||
|
orte_show_help("help-orte-rmaps-base.txt", "orte-rmaps-base:alloc-error",
|
||||||
|
true, app->num_procs, app->app);
|
||||||
|
return ORTE_ERR_SILENT;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (nprocs_mapped == app->num_procs) {
|
if (nprocs_mapped == app->num_procs) {
|
||||||
/* we are done */
|
/* we are done */
|
||||||
|
@ -370,6 +370,22 @@ static int orte_rmaps_seq_map(orte_job_t *jdata)
|
|||||||
* properly set
|
* properly set
|
||||||
*/
|
*/
|
||||||
ORTE_FLAG_SET(node, ORTE_NODE_FLAG_OVERSUBSCRIBED);
|
ORTE_FLAG_SET(node, ORTE_NODE_FLAG_OVERSUBSCRIBED);
|
||||||
|
/* check for permission */
|
||||||
|
if (ORTE_FLAG_TEST(node, ORTE_NODE_FLAG_SLOTS_GIVEN)) {
|
||||||
|
/* if we weren't given a directive either way, then we will error out
|
||||||
|
* as the #slots were specifically given, either by the host RM or
|
||||||
|
* via hostfile/dash-host */
|
||||||
|
if (!(ORTE_MAPPING_SUBSCRIBE_GIVEN & ORTE_GET_MAPPING_DIRECTIVE(orte_rmaps_base.mapping))) {
|
||||||
|
orte_show_help("help-orte-rmaps-base.txt", "orte-rmaps-base:alloc-error",
|
||||||
|
true, app->num_procs, app->app);
|
||||||
|
return ORTE_ERR_SILENT;
|
||||||
|
} else if (ORTE_MAPPING_NO_OVERSUBSCRIBE & ORTE_GET_MAPPING_DIRECTIVE(jdata->map->mapping)) {
|
||||||
|
/* if we were explicitly told not to oversubscribe, then don't */
|
||||||
|
orte_show_help("help-orte-rmaps-base.txt", "orte-rmaps-base:alloc-error",
|
||||||
|
true, app->num_procs, app->app);
|
||||||
|
return ORTE_ERR_SILENT;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* assign the vpid */
|
/* assign the vpid */
|
||||||
proc->name.vpid = vpid++;
|
proc->name.vpid = vpid++;
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user