Modify the --display-map and --display-alloc per note on devel list to reduce info for user understanding.
Add --display-devel-map and --display-devel-alloc to display all the detailed info we used to provide - it is only of use/interest to developers anyway and confuses users. This commit was SVN r19608.
Этот коммит содержится в:
родитель
90c936b292
Коммит
e64b79f30f
@ -76,6 +76,7 @@ int orte_ras_base_open(void)
|
||||
{
|
||||
int value;
|
||||
opal_output_stream_t lds;
|
||||
bool btmp;
|
||||
|
||||
/* set default flags */
|
||||
orte_ras_base.active_module = NULL;
|
||||
@ -87,6 +88,16 @@ int orte_ras_base_open(void)
|
||||
false, false, (int)false, &value);
|
||||
orte_ras_base.display_alloc = OPAL_INT_TO_BOOL(value);
|
||||
|
||||
/* should we display a detailed (developer-quality) version of the allocation after determining it? */
|
||||
mca_base_param_reg_int_name("ras", "base_display_devel_alloc",
|
||||
"Whether to display a developer-detail allocation after it is determined",
|
||||
false, false, (int)false, &value);
|
||||
btmp = OPAL_INT_TO_BOOL(value);
|
||||
if (btmp) {
|
||||
orte_ras_base.display_alloc = true;
|
||||
orte_devel_level_output = true;
|
||||
}
|
||||
|
||||
/* Debugging / verbose output. Always have stream open, with
|
||||
verbose set by the mca open system... */
|
||||
orte_ras_base.ras_output = opal_output_open(NULL);
|
||||
|
@ -79,6 +79,7 @@ int orte_rmaps_base_open(void)
|
||||
int param, value;
|
||||
char *policy;
|
||||
opal_output_stream_t lds;
|
||||
bool btmp;
|
||||
|
||||
/* init the globals */
|
||||
orte_rmaps_base.active_module = NULL;
|
||||
@ -168,6 +169,16 @@ int orte_rmaps_base_open(void)
|
||||
false, false, (int)false, &value);
|
||||
orte_rmaps_base.display_map = OPAL_INT_TO_BOOL(value);
|
||||
|
||||
/* should we display a detailed (developer-quality) version of the map after determining it? */
|
||||
mca_base_param_reg_int_name("rmaps", "base_display_devel_map",
|
||||
"Whether to display a developer-detail process map after it is computed",
|
||||
false, false, (int)false, &value);
|
||||
btmp = OPAL_INT_TO_BOOL(value);
|
||||
if (btmp) {
|
||||
orte_rmaps_base.display_map = true;
|
||||
orte_devel_level_output = true;
|
||||
}
|
||||
|
||||
/* Open up all the components that we can find */
|
||||
if (ORTE_SUCCESS !=
|
||||
mca_base_components_open("rmaps", orte_rmaps_base.rmaps_output,
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "orte/mca/errmgr/errmgr.h"
|
||||
#include "opal/dss/dss.h"
|
||||
#include "orte/util/name_fns.h"
|
||||
#include "orte/runtime/orte_globals.h"
|
||||
|
||||
#include "orte/runtime/data_type_support/orte_dt_support.h"
|
||||
|
||||
@ -296,6 +297,14 @@ int orte_dt_print_node(char **output, char *prefix, orte_node_t *src, opal_data_
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
if (!orte_devel_level_output) {
|
||||
/* just provide a simple output for users */
|
||||
asprintf(&tmp, "\n%sData for node: Name: %s\tNum procs: %ld",
|
||||
pfx2, (NULL == src->name) ? "UNKNOWN" : src->name,
|
||||
(long)src->num_procs);
|
||||
goto PRINT_PROCS;
|
||||
}
|
||||
|
||||
asprintf(&tmp, "\n%sData for node: Name: %s\t%s\tLaunch id: %ld\tArch: %0x\tState: %0x",
|
||||
pfx2, (NULL == src->name) ? "UNKNOWN" : src->name,
|
||||
pfx2, (long)src->launch_id,
|
||||
@ -331,6 +340,7 @@ int orte_dt_print_node(char **output, char *prefix, orte_node_t *src, opal_data_
|
||||
free(tmp);
|
||||
tmp = tmp2;
|
||||
|
||||
PRINT_PROCS:
|
||||
asprintf(&pfx, "%s\t", pfx2);
|
||||
free(pfx2);
|
||||
|
||||
@ -417,6 +427,17 @@ int orte_dt_print_proc(char **output, char *prefix, orte_proc_t *src, opal_data_
|
||||
free(pfx2);
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
if (!orte_devel_level_output) {
|
||||
/* just print a very simple output for users */
|
||||
asprintf(&tmp, "\n%sProcess OMPI jobid: %s Process rank: %s", pfx2,
|
||||
ORTE_JOBID_PRINT(src->name.jobid),
|
||||
ORTE_VPID_PRINT(src->name.vpid));
|
||||
/* set the return */
|
||||
*output = tmp;
|
||||
free(pfx2);
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
asprintf(&tmp, "\n%sData for proc: %s", pfx2, ORTE_NAME_PRINT(&src->name));
|
||||
|
||||
@ -498,7 +519,7 @@ int orte_dt_print_app_context(char **output, char *prefix, orte_app_context_t *s
|
||||
*/
|
||||
int orte_dt_print_map(char **output, char *prefix, orte_job_map_t *src, opal_data_type_t type)
|
||||
{
|
||||
char *tmp, *tmp2, *tmp3, *pfx, *pfx2;
|
||||
char *tmp=NULL, *tmp2, *tmp3, *pfx, *pfx2;
|
||||
int32_t i, j;
|
||||
int rc;
|
||||
orte_node_t **nodes;
|
||||
@ -553,23 +574,26 @@ int orte_dt_print_map(char **output, char *prefix, orte_job_map_t *src, opal_dat
|
||||
}
|
||||
|
||||
asprintf(&pfx, "%s\t", pfx2);
|
||||
asprintf(&tmp, "\n%sMap generated by mapping policy: %x\n%s\tPernode: %s\tNpernode: %ld\tOversubscribe allowed: %s\tCPU Lists: %s",
|
||||
pfx2, src->policy, pfx2,
|
||||
(src->pernode) ? "TRUE" : "FALSE", (long)src->npernode,
|
||||
(src->oversubscribe) ? "TRUE" : "FALSE",
|
||||
(src->cpu_lists) ? "TRUE" : "FALSE");
|
||||
free(pfx2);
|
||||
|
||||
if (ORTE_VPID_INVALID == src->daemon_vpid_start) {
|
||||
asprintf(&tmp2, "%s\n%sNum new daemons: %ld\tNew daemon starting vpid INVALID\n%sNum nodes: %ld",
|
||||
tmp, pfx, (long)src->num_new_daemons, pfx, (long)src->num_nodes);
|
||||
} else {
|
||||
asprintf(&tmp2, "%s\n%sNum new daemons: %ld\tNew daemon starting vpid %ld\n%sNum nodes: %ld",
|
||||
tmp, pfx, (long)src->num_new_daemons, (long)src->daemon_vpid_start,
|
||||
pfx, (long)src->num_nodes);
|
||||
if (orte_devel_level_output) {
|
||||
asprintf(&tmp, "\n%sMap generated by mapping policy: %x\n%s\tPernode: %s\tNpernode: %ld\tOversubscribe allowed: %s\tCPU Lists: %s",
|
||||
pfx2, src->policy, pfx2,
|
||||
(src->pernode) ? "TRUE" : "FALSE", (long)src->npernode,
|
||||
(src->oversubscribe) ? "TRUE" : "FALSE",
|
||||
(src->cpu_lists) ? "TRUE" : "FALSE");
|
||||
free(pfx2);
|
||||
|
||||
if (ORTE_VPID_INVALID == src->daemon_vpid_start) {
|
||||
asprintf(&tmp2, "%s\n%sNum new daemons: %ld\tNew daemon starting vpid INVALID\n%sNum nodes: %ld",
|
||||
tmp, pfx, (long)src->num_new_daemons, pfx, (long)src->num_nodes);
|
||||
} else {
|
||||
asprintf(&tmp2, "%s\n%sNum new daemons: %ld\tNew daemon starting vpid %ld\n%sNum nodes: %ld",
|
||||
tmp, pfx, (long)src->num_new_daemons, (long)src->daemon_vpid_start,
|
||||
pfx, (long)src->num_nodes);
|
||||
}
|
||||
free(tmp);
|
||||
tmp = tmp2;
|
||||
}
|
||||
free(tmp);
|
||||
tmp = tmp2;
|
||||
|
||||
|
||||
for (i=0; i < src->nodes->size; i++) {
|
||||
@ -580,10 +604,14 @@ int orte_dt_print_map(char **output, char *prefix, orte_job_map_t *src, opal_dat
|
||||
free(tmp);
|
||||
return rc;
|
||||
}
|
||||
asprintf(&tmp3, "%s\n%s", tmp, tmp2);
|
||||
free(tmp);
|
||||
free(tmp2);
|
||||
tmp = tmp3;
|
||||
if (NULL == tmp) {
|
||||
tmp = tmp2;
|
||||
} else {
|
||||
asprintf(&tmp3, "%s\n%s", tmp, tmp2);
|
||||
free(tmp);
|
||||
free(tmp2);
|
||||
tmp = tmp3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -57,6 +57,7 @@ int orted_debug_failure_delay;
|
||||
bool orte_homogeneous_nodes = false;
|
||||
bool orte_hetero_apps = false;
|
||||
bool orte_never_launched = false;
|
||||
bool orte_devel_level_output = false;
|
||||
|
||||
int32_t orte_contiguous_nodes;
|
||||
char **orte_launch_environ;
|
||||
|
@ -393,6 +393,7 @@ ORTE_DECLSPEC extern int orted_debug_failure_delay;
|
||||
ORTE_DECLSPEC extern bool orte_homogeneous_nodes;
|
||||
ORTE_DECLSPEC extern bool orte_hetero_apps;
|
||||
ORTE_DECLSPEC extern bool orte_never_launched;
|
||||
ORTE_DECLSPEC extern bool orte_devel_level_output;
|
||||
|
||||
ORTE_DECLSPEC extern char **orte_launch_environ;
|
||||
ORTE_DECLSPEC extern opal_pointer_array_t orte_daemonmap;
|
||||
|
@ -244,6 +244,9 @@ static opal_cmd_line_init_t cmd_line_init[] = {
|
||||
{ "rmaps", "base", "display_map", '\0', "display-map", "display-map", 0,
|
||||
NULL, OPAL_CMD_LINE_TYPE_BOOL,
|
||||
"Display the process map just before launch"},
|
||||
{ "rmaps", "base", "display_devel_map", '\0', "display-devel-map", "display-devel-map", 0,
|
||||
NULL, OPAL_CMD_LINE_TYPE_BOOL,
|
||||
"Display a detailed process map (mostly intended for developers) just before launch"},
|
||||
{ NULL, NULL, NULL, 'H', "host", "host", 1,
|
||||
NULL, OPAL_CMD_LINE_TYPE_STRING,
|
||||
"List of hosts to invoke processes on" },
|
||||
@ -255,6 +258,9 @@ static opal_cmd_line_init_t cmd_line_init[] = {
|
||||
{ "ras", "base", "display_alloc", '\0', "display-allocation", "display-allocation", 0,
|
||||
NULL, OPAL_CMD_LINE_TYPE_BOOL,
|
||||
"Display the allocation being used by this job"},
|
||||
{ "ras", "base", "display_devel_alloc", '\0', "display-devel-allocation", "display-devel-allocation", 0,
|
||||
NULL, OPAL_CMD_LINE_TYPE_BOOL,
|
||||
"Display a detailed list (mostly intended for developers) of the allocation being used by this job"},
|
||||
|
||||
/* mpiexec-like arguments */
|
||||
{ NULL, NULL, NULL, '\0', "wdir", "wdir", 1,
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user