static void orte_info_show_mca_group_params(const mca_base_var_group_t *group, bool want_internal) { const mca_base_var_t *var; const int *variables; int ret, i, j, count; const int *groups; char **strings; variables = OPAL_VALUE_ARRAY_GET_BASE(&group->group_vars, const int); count = opal_value_array_get_size((opal_value_array_t *)&group->group_vars); 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) && !want_internal)) { continue; } ret = mca_base_var_dump(variables[i], &strings, !orte_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 && orte_info_pretty) { char *message; asprintf (&message, "MCA %s", group->group_framework); orte_info_out(message, message, strings[j]); free(message); } else { orte_info_out("", "", strings[j]); } free(strings[j]); } free(strings); } groups = OPAL_VALUE_ARRAY_GET_BASE(&group->group_subgroups, const int); count = opal_value_array_get_size((opal_value_array_t *)&group->group_subgroups); for (i = 0 ; i < count ; ++i) { ret = mca_base_var_group_get(groups[i], &group); if (OPAL_SUCCESS != ret) { continue; } orte_info_show_mca_group_params(group, want_internal); } }
void orte_info_out_int(const char *pretty_message, const char *plain_message, int value) { char *valstr; asprintf(&valstr, "%d", (int)value); orte_info_out(pretty_message, plain_message, valstr); free(valstr); }
void orte_info_show_path(const char *type, const char *value) { char *pretty, *path; pretty = strdup(type); pretty[0] = toupper(pretty[0]); asprintf(&path, "path:%s", type); orte_info_out(pretty, path, value); free(pretty); free(path); }
/* * do_config * Accepts: * - want_all: boolean flag; TRUE -> display all options * FALSE -> display selected options * * This function displays all the options with which the current * installation of orte was configured. There are many options here * that are carried forward from OMPI-7 and are not mca parameters * in OMPI-10. I have to dig through the invalid options and replace * them with OMPI-10 options. */ void orte_info_do_config(bool want_all) { char *heterogeneous; char *memprofile; char *memdebug; char *debug; char *threads; char *want_libltdl; char *orterun_prefix_by_default; char *wtime_support; char *symbol_visibility; char *ft_support; /* setup the strings that don't require allocations*/ heterogeneous = OPAL_ENABLE_HETEROGENEOUS_SUPPORT ? "yes" : "no"; memprofile = OPAL_ENABLE_MEM_PROFILE ? "yes" : "no"; memdebug = OPAL_ENABLE_MEM_DEBUG ? "yes" : "no"; debug = OPAL_ENABLE_DEBUG ? "yes" : "no"; want_libltdl = OPAL_WANT_LIBLTDL ? "yes" : "no"; orterun_prefix_by_default = ORTE_WANT_ORTERUN_PREFIX_BY_DEFAULT ? "yes" : "no"; wtime_support = OPAL_TIMER_USEC_NATIVE ? "native" : "gettimeofday"; symbol_visibility = OPAL_C_HAVE_VISIBILITY ? "yes" : "no"; /* setup strings that require allocation */ if (OPAL_HAVE_POSIX_THREADS) { /* should just test OPAL_HAVE_THREADS */ asprintf(&threads, "%s (OPAL: %s, ORTE progress: yes, Event lib: yes)", (OPAL_HAVE_POSIX_THREADS ? "posix" : "type unknown"), /* "type unknown" can presumably never happen */ OPAL_ENABLE_MULTI_THREADS ? "yes" : "no"); } else { threads = strdup("no"); } asprintf(&ft_support, "%s (checkpoint thread: %s)", OPAL_ENABLE_FT ? "yes" : "no", OPAL_ENABLE_FT_THREAD ? "yes" : "no");; /* output values */ orte_info_out("Configured by", "config:user", OPAL_CONFIGURE_USER); orte_info_out("Configured on", "config:timestamp", OPAL_CONFIGURE_DATE); orte_info_out("Configure host", "config:host", OPAL_CONFIGURE_HOST); orte_info_out("Built by", "build:user", OMPI_BUILD_USER); orte_info_out("Built on", "build:timestamp", OMPI_BUILD_DATE); orte_info_out("Built host", "build:host", OMPI_BUILD_HOST); orte_info_out("C compiler", "compiler:c:command", OPAL_CC); orte_info_out("C compiler absolute", "compiler:c:absolute", OPAL_CC_ABSOLUTE); orte_info_out("C compiler family name", "compiler:c:familyname", _STRINGIFY(OPAL_BUILD_PLATFORM_COMPILER_FAMILYNAME)); orte_info_out("C compiler version", "compiler:c:version", _STRINGIFY(OPAL_BUILD_PLATFORM_COMPILER_VERSION_STR)); if (want_all) { orte_info_out_int("C char size", "compiler:c:sizeof:char", sizeof(char)); /* JMS: should be fixed in MPI-2.2 to differentiate between C _Bool and C++ bool. For the moment, the code base assumes that they are the same. Because of opal_config_bottom.h, we can sizeof(bool) here, so we might as well -- even though this technically isn't right. This should be fixed when we update to MPI-2.2. See below for note about C++ bool alignment. */ orte_info_out_int("C bool size", "compiler:c:sizeof:bool", sizeof(bool)); orte_info_out_int("C short size", "compiler:c:sizeof:short", sizeof(short)); orte_info_out_int("C int size", "compiler:c:sizeof:int", sizeof(int)); orte_info_out_int("C long size", "compiler:c:sizeof:long", sizeof(long)); orte_info_out_int("C float size", "compiler:c:sizeof:float", sizeof(float)); orte_info_out_int("C double size", "compiler:c:sizeof:double", sizeof(double)); orte_info_out_int("C pointer size", "compiler:c:sizeof:pointer", sizeof(void *)); orte_info_out_int("C char align", "compiler:c:align:char", OPAL_ALIGNMENT_CHAR); orte_info_out("C bool align", "compiler:c:align:bool", "skipped"); orte_info_out_int("C int align", "compiler:c:align:int", OPAL_ALIGNMENT_INT); orte_info_out_int("C float align", "compiler:c:align:float", OPAL_ALIGNMENT_FLOAT); orte_info_out_int("C double align", "compiler:c:align:double", OPAL_ALIGNMENT_DOUBLE); } orte_info_out("Thread support", "option:threads", threads); if (want_all) { orte_info_out("Build CFLAGS", "option:build:cflags", OMPI_BUILD_CFLAGS); orte_info_out("Build CXXFLAGS", "option:build:cxxflags", OMPI_BUILD_CXXFLAGS); orte_info_out("Build LDFLAGS", "option:build:ldflags", OMPI_BUILD_LDFLAGS); orte_info_out("Build LIBS", "option:build:libs", OMPI_BUILD_LIBS); orte_info_out("Wrapper extra CFLAGS", "option:wrapper:extra_cflags", WRAPPER_EXTRA_CFLAGS); orte_info_out("Wrapper extra CXXFLAGS", "option:wrapper:extra_cxxflags", WRAPPER_EXTRA_CXXFLAGS); orte_info_out("Wrapper extra LDFLAGS", "option:wrapper:extra_ldflags", WRAPPER_EXTRA_LDFLAGS); orte_info_out("Wrapper extra LIBS", "option:wrapper:extra_libs", WRAPPER_EXTRA_LIBS); } free(threads); orte_info_out("Internal debug support", "option:debug", debug); orte_info_out("Memory profiling support", "option:mem-profile", memprofile); orte_info_out("Memory debugging support", "option:mem-debug", memdebug); orte_info_out("libltdl support", "option:dlopen", want_libltdl); orte_info_out("Heterogeneous support", "options:heterogeneous", heterogeneous); orte_info_out("orterun default --prefix", "orterun:prefix_by_default", orterun_prefix_by_default); orte_info_out("MPI_WTIME support", "options:mpi-wtime", wtime_support); orte_info_out("Symbol vis. support", "options:visibility", symbol_visibility); orte_info_out("FT Checkpoint support", "options:ft_support", ft_support); free(ft_support); }
void orte_info_do_hostname() { orte_info_out("Configure host", "config:host", OPAL_CONFIGURE_HOST); }
void orte_info_do_arch() { orte_info_out("Configured architecture", "config:arch", OPAL_ARCH); }