Skip to content
This repository was archived by the owner on Sep 30, 2022. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ompi/tools/ompi_info/ompi_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ int main(int argc, char *argv[])
if (OMPI_ERR_BAD_PARAM == ret) {
/* output what we got */
opal_info_do_params(true, opal_cmd_line_is_taken(ompi_info_cmd_line, "internal"),
&mca_types, NULL);
&mca_types, &component_map, NULL);
}
exit(1);
}
Expand Down Expand Up @@ -158,7 +158,7 @@ int main(int argc, char *argv[])
if (want_all || opal_cmd_line_is_taken(ompi_info_cmd_line, "param") ||
opal_cmd_line_is_taken(ompi_info_cmd_line, "params")) {
opal_info_do_params(want_all, opal_cmd_line_is_taken(ompi_info_cmd_line, "internal"),
&mca_types, ompi_info_cmd_line);
&mca_types, &component_map, ompi_info_cmd_line);
acted = true;
}
if (opal_cmd_line_is_taken(ompi_info_cmd_line, "type")) {
Expand Down
29 changes: 27 additions & 2 deletions opal/runtime/opal_info_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@ void opal_info_do_path(bool want_all, opal_cmd_line_t *cmd_line)

void opal_info_do_params(bool want_all_in, bool want_internal,
opal_pointer_array_t *mca_types,
opal_pointer_array_t *component_map,
opal_cmd_line_t *opal_info_cmd_line)
{
mca_base_var_info_lvl_t max_level = OPAL_INFO_LVL_1;
Expand Down Expand Up @@ -482,6 +483,9 @@ void opal_info_do_params(bool want_all_in, bool want_internal,
/* Show the params */

if (want_all) {
opal_info_show_component_version(mca_types, component_map, opal_info_type_all,
opal_info_component_all, opal_info_ver_full,
opal_info_ver_all);
for (i = 0; i < mca_types->size; ++i) {
if (NULL == (type = (char *)opal_pointer_array_get_item(mca_types, i))) {
continue;
Expand Down Expand Up @@ -510,6 +514,9 @@ void opal_info_do_params(bool want_all_in, bool want_internal,
exit(1);
}

opal_info_show_component_version(mca_types, component_map, type,
component, opal_info_ver_full,
opal_info_ver_all);
opal_info_show_mca_params(type, component, max_level, want_internal);
}
}
Expand Down Expand Up @@ -639,6 +646,8 @@ static void opal_info_show_mca_group_params(const mca_base_var_group_t *group, m
}
}

const mca_base_var_group_t *curr_group = NULL;
char *component_msg = NULL;
for (i = 0 ; i < count ; ++i) {
ret = mca_base_var_get(variables[i], &var);
if (OPAL_SUCCESS != ret || ((var->mbv_flags & MCA_BASE_VAR_FLAG_INTERNAL) &&
Expand All @@ -647,14 +656,27 @@ static void opal_info_show_mca_group_params(const mca_base_var_group_t *group, m
continue;
}

if (opal_info_pretty && curr_group != group) {
free(component_msg);
asprintf(&component_msg, " %s", group_component);
asprintf(&message, "MCA%s %s%s", requested ? "" : " (disabled)",
group->group_framework,
component_msg ? component_msg : "");
opal_info_out(message, message, "---------------------------------------------------");
free(message);
curr_group = group;
}

ret = mca_base_var_dump(variables[i], &strings, !opal_info_pretty ? MCA_BASE_VAR_DUMP_PARSABLE : MCA_BASE_VAR_DUMP_READABLE);
if (OPAL_SUCCESS != ret) {
continue;
}

for (j = 0 ; strings[j] ; ++j) {
if (0 == j && opal_info_pretty) {
asprintf (&message, "MCA%s %s", requested ? "" : " (disabled)", group->group_framework);
asprintf (&message, "MCA%s %s%s", requested ? "" : " (disabled)",
group->group_framework,
component_msg ? component_msg : "");
opal_info_out(message, message, strings[j]);
free(message);
} else {
Expand Down Expand Up @@ -805,7 +827,7 @@ static int centerpoint = 24;
static int screen_width = 78;

/*
* Prints the passed integer in a pretty or parsable format.
* Prints the passed message in a pretty or parsable format.
*/
void opal_info_out(const char *pretty_message, const char *plain_message, const char *value)
{
Expand Down Expand Up @@ -949,6 +971,9 @@ void opal_info_out(const char *pretty_message, const char *plain_message, const
}
}

/*
* Prints the passed integer in a pretty or parsable format.
*/
void opal_info_out_int(const char *pretty_message,
const char *plain_message,
int value)
Expand Down
1 change: 1 addition & 0 deletions opal/runtime/opal_info_support.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ OPAL_DECLSPEC void opal_info_err_params(opal_pointer_array_t *component_map);

OPAL_DECLSPEC void opal_info_do_params(bool want_all_in, bool want_internal,
opal_pointer_array_t *mca_type,
opal_pointer_array_t *component_map,
opal_cmd_line_t *opal_info_cmd_line);

OPAL_DECLSPEC void opal_info_show_path(const char *type, const char *value);
Expand Down
4 changes: 2 additions & 2 deletions oshmem/tools/oshmem_info/oshmem_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ int main(int argc, char *argv[])
if (OSHMEM_ERR_BAD_PARAM == ret) {
/* output what we got */
opal_info_do_params(true, opal_cmd_line_is_taken(info_cmd_line, "internal"),
&mca_types, NULL);
&mca_types, &component_map, NULL);
}
exit(1);
}
Expand All @@ -150,7 +150,7 @@ int main(int argc, char *argv[])
if (want_all || opal_cmd_line_is_taken(info_cmd_line, "param") ||
opal_cmd_line_is_taken(info_cmd_line, "params")) {
opal_info_do_params(want_all, opal_cmd_line_is_taken(info_cmd_line, "internal"),
&mca_types, info_cmd_line);
&mca_types, &component_map, info_cmd_line);
acted = true;
}

Expand Down