diff --git a/configure.ac b/configure.ac index 3a378a3513..00dc168238 100644 --- a/configure.ac +++ b/configure.ac @@ -1180,7 +1180,7 @@ AM_PROG_LEX if test -z "$LEX" -o -n "`echo $LEX | grep missing`" -o \ "`basename $LEX`" != "flex"; then - if test ! -f "$srcdir/ompi/util/show_help_lex.c"; then + if test ! -f "$srcdir/opal/util/show_help_lex.c"; then AC_MSG_WARN([*** Could not find GNU Flex on your system.]) AC_MSG_WARN([*** GNU Flex required for developer builds of Open MPI.]) AC_MSG_WARN([*** Other versions of Lex are not supported.]) diff --git a/ompi/info/info.c b/ompi/info/info.c index c9bdded420..94d893cbf3 100644 --- a/ompi/info/info.c +++ b/ompi/info/info.c @@ -183,7 +183,7 @@ int ompi_info_get (ompi_info_t *info, char *key, int valuelen, if (value_length < valuelen ) { strcpy(value, search->ie_value); } else { - ompi_strncpy(value, search->ie_value, valuelen); + opal_strncpy(value, search->ie_value, valuelen); value[valuelen] = 0; } } diff --git a/ompi/info/info.h b/ompi/info/info.h index be3e3b81bc..db2b35a10b 100644 --- a/ompi/info/info.h +++ b/ompi/info/info.h @@ -20,7 +20,7 @@ #include #include "mpi.h" -#include "util/strncpy.h" +#include "opal/util/strncpy.h" #include "opal/class/opal_list.h" #include "class/ompi_pointer_array.h" #include "opal/threads/mutex.h" diff --git a/ompi/mca/coll/base/coll_base_comm_select.c b/ompi/mca/coll/base/coll_base_comm_select.c index 194134e9ed..cae2cfc5de 100644 --- a/ompi/mca/coll/base/coll_base_comm_select.c +++ b/ompi/mca/coll/base/coll_base_comm_select.c @@ -23,7 +23,7 @@ #include "mpi.h" #include "communicator/communicator.h" #include "opal/util/argv.h" -#include "util/show_help.h" +#include "opal/util/show_help.h" #include "opal/class/opal_list.h" #include "opal/class/opal_object.h" #include "mca/mca.h" @@ -224,7 +224,7 @@ int mca_coll_base_comm_select(ompi_communicator_t *comm, if (!found) { /* There's no modules available -- including basic. Doh! */ - ompi_show_help("help-mca-coll-base", + opal_show_help("help-mca-coll-base", "comm-select:none-available", true); return OMPI_ERROR; } diff --git a/ompi/mca/coll/base/coll_base_comm_unselect.c b/ompi/mca/coll/base/coll_base_comm_unselect.c index 94c35b3fe4..06f7d60700 100644 --- a/ompi/mca/coll/base/coll_base_comm_unselect.c +++ b/ompi/mca/coll/base/coll_base_comm_unselect.c @@ -22,7 +22,7 @@ #include "mpi.h" #include "communicator/communicator.h" -#include "util/show_help.h" +#include "opal/util/show_help.h" #include "mca/mca.h" #include "mca/base/base.h" #include "mca/coll/coll.h" @@ -49,7 +49,7 @@ int mca_coll_base_comm_unselect(ompi_communicator_t *comm) NULL != comm->c_coll_selected_module->coll_module_finalize) { err = comm->c_coll_selected_module->coll_module_finalize(comm); if (OMPI_SUCCESS != err) { - ompi_show_help("help-mca-coll-base", + opal_show_help("help-mca-coll-base", "comm-unselect:failed-finalize", true); return err; } @@ -64,7 +64,7 @@ int mca_coll_base_comm_unselect(ompi_communicator_t *comm) NULL != comm->c_coll_basic_module->coll_module_finalize) { err = comm->c_coll_basic_module->coll_module_finalize(comm); if (OMPI_SUCCESS != err) { - ompi_show_help("help-mca-coll-base", + opal_show_help("help-mca-coll-base", "comm-unselect:basic-failed-finalize", true); return err; } diff --git a/ompi/mca/coll/base/coll_base_find_available.c b/ompi/mca/coll/base/coll_base_find_available.c index 1dca4c6251..11ac90539a 100644 --- a/ompi/mca/coll/base/coll_base_find_available.c +++ b/ompi/mca/coll/base/coll_base_find_available.c @@ -24,7 +24,7 @@ #include "include/constants.h" #include "opal/class/opal_list.h" #include "opal/util/output.h" -#include "util/show_help.h" +#include "opal/util/show_help.h" #include "mca/mca.h" #include "mca/base/base.h" #include "mca/coll/coll.h" @@ -150,7 +150,7 @@ int mca_coll_base_find_available(bool enable_progress_threads, mca_coll_base_components_available_valid = false; opal_output_verbose(10, mca_coll_base_output, "coll:find_available: no coll components available!"); - ompi_show_help("help-mca-base", "find-available:none-found", true, + opal_show_help("help-mca-base", "find-available:none-found", true, "coll"); return OMPI_ERROR; } diff --git a/ompi/mpi/c/comm_get_name.c b/ompi/mpi/c/comm_get_name.c index c9bcdff146..099c819e41 100644 --- a/ompi/mpi/c/comm_get_name.c +++ b/ompi/mpi/c/comm_get_name.c @@ -18,7 +18,7 @@ #include -#include "util/strncpy.h" +#include "opal/util/strncpy.h" #include "include/totalview.h" #include "mpi.h" #include "mpi/c/bindings.h" diff --git a/ompi/mpi/c/comm_set_name.c b/ompi/mpi/c/comm_set_name.c index b4315e712b..60e76803ed 100644 --- a/ompi/mpi/c/comm_set_name.c +++ b/ompi/mpi/c/comm_set_name.c @@ -18,7 +18,7 @@ #include -#include "util/strncpy.h" +#include "opal/util/strncpy.h" #include "include/totalview.h" #include "mpi.h" #include "mpi/c/bindings.h" diff --git a/ompi/mpi/c/info_get.c b/ompi/mpi/c/info_get.c index 73721efbf7..f4bec27e78 100644 --- a/ompi/mpi/c/info_get.c +++ b/ompi/mpi/c/info_get.c @@ -20,7 +20,7 @@ #include "mpi/c/bindings.h" #include "opal/class/opal_list.h" #include "info/info.h" -#include "util/strncpy.h" +#include "opal/util/strncpy.h" #include #include #include "errhandler/errhandler.h" diff --git a/ompi/runtime/ompi_mpi_abort.c b/ompi/runtime/ompi_mpi_abort.c index cbeb49a984..a4ac0ec671 100644 --- a/ompi/runtime/ompi_mpi_abort.c +++ b/ompi/runtime/ompi_mpi_abort.c @@ -21,7 +21,7 @@ #endif #include "communicator/communicator.h" -#include "util/show_help.h" +#include "opal/util/show_help.h" #include "util/proc_info.h" #include "ompi/runtime/mpiruntime.h" #include "orte/runtime/runtime.h" diff --git a/ompi/runtime/ompi_mpi_init.c b/ompi/runtime/ompi_mpi_init.c index e84f026f80..cdf7450be2 100644 --- a/ompi/runtime/ompi_mpi_init.c +++ b/ompi/runtime/ompi_mpi_init.c @@ -28,8 +28,8 @@ #include "communicator/communicator.h" #include "group/group.h" #include "info/info.h" -#include "util/show_help.h" -#include "util/stacktrace.h" +#include "opal/util/show_help.h" +#include "opal/util/stacktrace.h" #include "errhandler/errcode.h" #include "errhandler/errclass.h" #include "request/request.h" @@ -133,7 +133,7 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided) } #ifndef WIN32 - if (OMPI_SUCCESS != (ret = ompi_util_register_stackhandlers ())) { + if (OMPI_SUCCESS != (ret = opal_util_register_stackhandlers ())) { error = "util_register_stackhandlers() failed"; goto error; } @@ -427,7 +427,7 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided) error: if (ret != OMPI_SUCCESS) { - ompi_show_help("help-mpi-runtime", + opal_show_help("help-mpi-runtime", "mpi_init:startup:internal-failure", true, "MPI_INIT", "MPI_INIT", error, ret); return ret; diff --git a/ompi/tools/ompi_info/ompi_info.cc b/ompi/tools/ompi_info/ompi_info.cc index 9491648673..24e3f1a86c 100644 --- a/ompi/tools/ompi_info/ompi_info.cc +++ b/ompi/tools/ompi_info/ompi_info.cc @@ -39,7 +39,7 @@ #include "opal/util/output.h" #include "opal/util/cmd_line.h" #include "opal/util/argv.h" -#include "util/show_help.h" +#include "opal/util/show_help.h" #include "communicator/communicator.h" #include "mca/base/base.h" #include "tools/ompi_info/ompi_info.h" @@ -77,7 +77,7 @@ int main(int argc, char *argv[]) cmd_line = OBJ_NEW(opal_cmd_line_t); if (NULL == cmd_line) { ret = errno; - ompi_show_help("help-ompi_info.txt", "lib-call-fail", true, + opal_show_help("help-ompi_info.txt", "lib-call-fail", true, "opal_cmd_line_create", __FILE__, __LINE__, NULL); exit(ret); } @@ -138,7 +138,7 @@ int main(int argc, char *argv[]) } if (cmd_error || want_help) { char *usage = opal_cmd_line_get_usage_msg(cmd_line); - ompi_show_help("help-ompi_info.txt", "usage", true, usage); + opal_show_help("help-ompi_info.txt", "usage", true, usage); free(usage); exit(cmd_error ? 1 : 0); } diff --git a/ompi/tools/ompi_info/param.cc b/ompi/tools/ompi_info/param.cc index 2f9f4b1fad..09ea0e3f39 100644 --- a/ompi/tools/ompi_info/param.cc +++ b/ompi/tools/ompi_info/param.cc @@ -32,7 +32,7 @@ #include "opal/class/opal_value_array.h" #include "opal/util/printf.h" -#include "util/show_help.h" +#include "opal/util/show_help.h" #include "mca/base/mca_base_param.h" #include "tools/ompi_info/ompi_info.h" @@ -105,7 +105,7 @@ void ompi_info::do_params(bool want_all, bool want_internal) if (!found) { char *usage = opal_cmd_line_get_usage_msg(cmd_line); - ompi_show_help("help-ompi_info.txt", "usage", true, usage); + opal_show_help("help-ompi_info.txt", "usage", true, usage); free(usage); exit(1); } @@ -253,7 +253,7 @@ void ompi_info::do_path(bool want_all, opal_cmd_line_t *cmd_line) show_path(path_sysconfdir, OMPI_SYSCONFDIR); else { char *usage = opal_cmd_line_get_usage_msg(cmd_line); - ompi_show_help("help-ompi_info.txt", "usage", true, usage); + opal_show_help("help-ompi_info.txt", "usage", true, usage); free(usage); exit(1); } diff --git a/ompi/tools/wrappers/mpif77.cc b/ompi/tools/wrappers/mpif77.cc index d3c813a55b..ff20f71c8a 100644 --- a/ompi/tools/wrappers/mpif77.cc +++ b/ompi/tools/wrappers/mpif77.cc @@ -15,7 +15,7 @@ // #include "ompi_config.h" -#include "util/show_help.h" +#include "opal/util/show_help.h" #include "tools/wrappers/ompi_wrap.h" #include @@ -32,7 +32,7 @@ main(int argc, char *argv[]) // language of this wrapper compiler. #if !OMPI_WANT_F77_BINDINGS - ompi_show_help("help-wrapper.txt", "no-fortran-support", true, + opal_show_help("help-wrapper.txt", "no-fortran-support", true, 77, "mpif77"); return 1; #else diff --git a/ompi/tools/wrappers/mpif90.cc b/ompi/tools/wrappers/mpif90.cc index d00d354628..158b424b81 100644 --- a/ompi/tools/wrappers/mpif90.cc +++ b/ompi/tools/wrappers/mpif90.cc @@ -15,7 +15,7 @@ // #include "ompi_config.h" -#include "util/show_help.h" +#include "opal/util/show_help.h" #include "tools/wrappers/ompi_wrap.h" #include @@ -32,7 +32,7 @@ main(int argc, char *argv[]) // language of this wrapper compiler. #if !OMPI_WANT_F90_BINDINGS - ompi_show_help("help-wrapper.txt", "no-fortran-support", true, + opal_show_help("help-wrapper.txt", "no-fortran-support", true, 90, "mpif90"); return 1; #else diff --git a/ompi/tools/wrappers/wrap.cc b/ompi/tools/wrappers/wrap.cc index a195bf6404..3396802256 100644 --- a/ompi/tools/wrappers/wrap.cc +++ b/ompi/tools/wrappers/wrap.cc @@ -32,7 +32,7 @@ #include "opal/util/argv.h" #include "opal/util/few.h" #include "opal/util/path.h" -#include "util/show_help.h" +#include "opal/util/show_help.h" #include "tools/wrappers/ompi_wrap.h" extern char **environ; @@ -116,7 +116,7 @@ ompi_wrap_parse_args(int argc, char *argv[], bool & want_flags) #if !OMPI_ENABLE_MPI_PROFILING // Sanity check if (fl_profile) { - ompi_show_help("help-wrapper.txt", "no-profiling-support", true, + opal_show_help("help-wrapper.txt", "no-profiling-support", true, argv[0], NULL); fl_profile = false; } @@ -431,7 +431,7 @@ ompi_wrap_exec_sv(const ompi_sv_t & sv) // compiler first, just to try to eliminate that case. tmp = opal_path_findv(av[0], 0, environ, NULL); if (NULL == tmp) { - ompi_show_help("help-wrapper.txt", "no-compiler-found", true, + opal_show_help("help-wrapper.txt", "no-compiler-found", true, av[0], NULL); errno = 0; status = -1; diff --git a/ompi/win_makefile b/ompi/win_makefile index 46b4dbda13..09e0d6ec49 100644 --- a/ompi/win_makefile +++ b/ompi/win_makefile @@ -200,8 +200,8 @@ prebuild: @/usr/bin/flex -t -Porte_rds_hostfile_ "${topdir}/src/mca/rds/hostfile/rds_hostfile_lex.l" \ > "${topdir}/src/mca/rds/hostfile/rds_hostfile_lex.c" 2>/dev/null @echo "Creating show_help_lex.c" - @/usr/bin/flex -t -Pompi_show_help_yy "${topdir}/src/util/show_help_lex.l" \ - > "${topdir}/src/util/show_help_lex.c" 2>/dev/null + @/usr/bin/flex -t -Popal_show_help_yy "${topdir}/src/opal/util/show_help_lex.l" \ + > "${topdir}/src/opal/util/show_help_lex.c" 2>/dev/null @for dirs in ${STATIC_LIBS}; do \ (dir="mca/$${dirs}/base"; echo "Making Static components in $${dirs}"; comp_name="$${dirs}_static-components.h"; cp "${topdir}/src/win32/generated_include/$${comp_name}" "$${dir}/static-components.h";); \ done diff --git a/opal/mca/base/mca_base_components_open.c b/opal/mca/base/mca_base_components_open.c index e811064a01..2a7052ac99 100644 --- a/opal/mca/base/mca_base_components_open.c +++ b/opal/mca/base/mca_base_components_open.c @@ -21,7 +21,7 @@ #include #include "opal/class/opal_list.h" -#include "util/strncpy.h" +#include "opal/util/strncpy.h" #include "opal/util/argv.h" #include "opal/util/output.h" #include "mca/mca.h" diff --git a/opal/util/Makefile.am b/opal/util/Makefile.am index 4813a75bbd..d36aa3346a 100644 --- a/opal/util/Makefile.am +++ b/opal/util/Makefile.am @@ -17,8 +17,8 @@ include $(top_srcdir)/config/Makefile.options AM_CPPFLAGS = -DOMPI_PKGDATADIR=\"$(pkgdatadir)\" -AM_LFLAGS = -Pompi_show_help_yy -LEX_OUTPUT_ROOT = lex.ompi_show_help_yy +AM_LFLAGS = -Popal_show_help_yy +LEX_OUTPUT_ROOT = lex.opal_show_help_yy noinst_LTLIBRARIES = libopalutil.la diff --git a/opal/util/argv.c b/opal/util/argv.c index 38430a1ebd..09b67a0d2a 100644 --- a/opal/util/argv.c +++ b/opal/util/argv.c @@ -20,7 +20,7 @@ #include "include/constants.h" #include "opal/util/argv.h" -#include "util/strncpy.h" +#include "opal/util/strncpy.h" #define ARGSIZE 128 diff --git a/opal/util/cmd_line.c b/opal/util/cmd_line.c index 7889e5c4f4..f982678049 100644 --- a/opal/util/cmd_line.c +++ b/opal/util/cmd_line.c @@ -26,7 +26,7 @@ #include "opal/threads/mutex.h" #include "opal/util/argv.h" #include "opal/util/cmd_line.h" -#include "util/strncpy.h" +#include "opal/util/strncpy.h" #include "opal/util/output.h" #include "mca/base/mca_base_param.h" diff --git a/opal/util/cmd_line.h b/opal/util/cmd_line.h index 1a4f6f7491..729a37f1c6 100644 --- a/opal/util/cmd_line.h +++ b/opal/util/cmd_line.h @@ -393,7 +393,7 @@ extern "C" { * display (to allow for undocumented options). * * This function is typically only invoked internally by the - * ompi_show_help() function. + * opal_show_help() function. * * This function should probably be fixed up to produce prettier * output. diff --git a/opal/util/if.c b/opal/util/if.c index b1515a646c..079a203f3c 100644 --- a/opal/util/if.c +++ b/opal/util/if.c @@ -49,7 +49,7 @@ #include "opal/class/opal_list.h" #include "opal/util/if.h" #include "opal/util/output.h" -#include "util/strncpy.h" +#include "opal/util/strncpy.h" #ifndef IF_NAMESIZE #define IF_NAMESIZE 32 diff --git a/opal/util/show_help.c b/opal/util/show_help.c index d97a43a2fa..458560fb85 100644 --- a/opal/util/show_help.c +++ b/opal/util/show_help.c @@ -21,8 +21,8 @@ #include #include "include/constants.h" -#include "util/show_help.h" -#include "util/show_help_lex.h" +#include "opal/util/show_help.h" +#include "opal/util/show_help_lex.h" #include "opal/util/printf.h" #include "opal/util/argv.h" @@ -46,7 +46,7 @@ static const char *default_filename = "help-messages"; static const char *dash_line = "--------------------------------------------------------------------------\n"; -int ompi_show_help(const char *filename, const char *topic, +int opal_show_help(const char *filename, const char *topic, bool want_error_header, ...) { int ret; @@ -57,13 +57,13 @@ int ompi_show_help(const char *filename, const char *topic, return ret; } if (OMPI_SUCCESS != (ret = find_topic(filename, topic))) { - fclose(ompi_show_help_yyin); + fclose(opal_show_help_yyin); return ret; } ret = read_message(&array); - ompi_show_help_finish_parsing(); - fclose(ompi_show_help_yyin); + opal_show_help_finish_parsing(); + fclose(opal_show_help_yyin); if (OMPI_SUCCESS != ret) { destroy_message(array); return ret; @@ -101,11 +101,11 @@ static int open_file(const char *base, const char *topic) extension. */ asprintf(&filename, "%s/%s", OMPI_PKGDATADIR, base); - ompi_show_help_yyin = fopen(filename, "r"); + opal_show_help_yyin = fopen(filename, "r"); free(filename); - if (NULL == ompi_show_help_yyin) { + if (NULL == opal_show_help_yyin) { asprintf(&filename, "%s/%s.txt", OMPI_PKGDATADIR, base); - ompi_show_help_yyin = fopen(filename, "r"); + opal_show_help_yyin = fopen(filename, "r"); free(filename); } #else @@ -120,27 +120,27 @@ static int open_file(const char *base, const char *topic) default language (because we know that we have that one) */ asprintf(&filename, "%s/%s.%s", OMPI_PKGDATADIR, base, lang); - ompi_show_help_yyin = fopen(filename, "r"); + opal_show_help_yyin = fopen(filename, "r"); free(filename); - if (NULL == ompi_show_help_yyin) { + if (NULL == opal_show_help_yyin) { asprintf(&filename, "%s/%s.%s", OMPI_PKGDATADIR, base, default_language); - ompi_show_help_yyin = fopen(filename, "r"); + opal_show_help_yyin = fopen(filename, "r"); free(filename); } /* If we still couldn't find it, try with no extension */ - if (NULL == ompi_show_help_yyin) { + if (NULL == opal_show_help_yyin) { asprintf(&filename, "%s/%s", OMPI_PKGDATADIR, base); - ompi_show_help_yyin = fopen(filename, "r"); + opal_show_help_yyin = fopen(filename, "r"); free(filename); } #endif /* If we still couldn't open it, then something is wrong */ - if (NULL == ompi_show_help_yyin) { + if (NULL == opal_show_help_yyin) { fprintf(stderr, dash_line); fprintf(stderr, "Sorry! You were supposed to get help about:\n %s\nfrom the file:\n %s\n", topic, base); fprintf(stderr, "But I couldn't find any file matching that name. Sorry!\n"); @@ -150,7 +150,7 @@ static int open_file(const char *base, const char *topic) /* Set the buffer */ - ompi_show_help_init_buffer(ompi_show_help_yyin); + opal_show_help_init_buffer(opal_show_help_yyin); /* Happiness */ @@ -170,10 +170,10 @@ static int find_topic(const char *base, const char *topic) /* Examine every topic */ while (1) { - token = ompi_show_help_yylex(); + token = opal_show_help_yylex(); switch (token) { - case OMPI_SHOW_HELP_PARSE_TOPIC: - tmp = strdup(ompi_show_help_yytext); + case OPAL_SHOW_HELP_PARSE_TOPIC: + tmp = strdup(opal_show_help_yytext); if (NULL == tmp) { return OMPI_ERR_OUT_OF_RESOURCE; } @@ -185,10 +185,10 @@ static int find_topic(const char *base, const char *topic) } break; - case OMPI_SHOW_HELP_PARSE_MESSAGE: + case OPAL_SHOW_HELP_PARSE_MESSAGE: break; - case OMPI_SHOW_HELP_PARSE_DONE: + case OPAL_SHOW_HELP_PARSE_DONE: fprintf(stderr, dash_line); fprintf(stderr, "Sorry! You were supposed to get help about:\n %s\nfrom the file:\n %s\n", topic, base); fprintf(stderr, "But I couldn't find that topic in the file. Sorry!\n"); @@ -215,10 +215,10 @@ static int read_message(char ***array) int token; while (1) { - token = ompi_show_help_yylex(); + token = opal_show_help_yylex(); switch (token) { - case OMPI_SHOW_HELP_PARSE_MESSAGE: - tmp = strdup(ompi_show_help_yytext); + case OPAL_SHOW_HELP_PARSE_MESSAGE: + tmp = strdup(opal_show_help_yytext); if (NULL == tmp) { return OMPI_ERR_OUT_OF_RESOURCE; } diff --git a/opal/util/show_help.h b/opal/util/show_help.h index 1611b4a2d8..de02176f4f 100644 --- a/opal/util/show_help.h +++ b/opal/util/show_help.h @@ -26,7 +26,7 @@ * display help messages, but it can actually be used to display any * arbitrary text messages. * - * The function ompi_show_help() is used to find a help message and + * The function opal_show_help() is used to find a help message and * display it. Its important parameters are a filename, message name, * and printf()-style varargs parameters used to substitute into the * message. @@ -43,7 +43,7 @@ * appropriate help message to display. It looks for the message name * in the file, reads in the message, and displays it. printf()-like * substitutions are performed (e.g., %d, %s, etc.) -- - * ompi_show_help() takes a variable legnth argument list that are + * opal_show_help() takes a variable legnth argument list that are * used for these substitutions. * * The format of the help file is simplistic: @@ -72,7 +72,7 @@ * It is expected that help messages will be grouped by filename; * similar messages should be in a single file. For example, an MCA * component may install its own helpfile in Open MPI's $pkgdatadir, - * and therefore the component can invoke ompi_show_help() to display + * and therefore the component can invoke opal_show_help() to display * its own help messages. * * Message files in $pkgdatadir have a naming convention: they @@ -83,8 +83,8 @@ * previously. */ -#ifndef OMPI_SHOW_HELP_H -#define OMPI_SHOW_HELP_H +#ifndef OPAL_SHOW_HELP_H +#define OPAL_SHOW_HELP_H #include "ompi_config.h" @@ -111,7 +111,7 @@ extern "C" { * based on the topic, and displays it. If want_error_header is * true, a header and footer of asterisks are also displayed. */ -OMPI_DECLSPEC int ompi_show_help(const char *filename, const char *topic, +OMPI_DECLSPEC int opal_show_help(const char *filename, const char *topic, bool want_error_header, ...); /** @@ -123,7 +123,7 @@ OMPI_DECLSPEC int ompi_show_help(const char *filename, const char *topic, * flex parser since we may not hit the <> rule and call this * function automatically. */ -OMPI_DECLSPEC int ompi_show_help_finish_parsing(void); +OMPI_DECLSPEC int opal_show_help_finish_parsing(void); #if defined(c_plusplus) || defined(__cplusplus) } #endif diff --git a/opal/util/show_help_lex.h b/opal/util/show_help_lex.h index 66d47ff2e9..f14d20d34e 100644 --- a/opal/util/show_help_lex.h +++ b/opal/util/show_help_lex.h @@ -14,8 +14,8 @@ * $HEADER$ */ -#ifndef OMPI_SHOW_HELP_LEX_H -#define OMPI_SHOW_HELP_LEX_H +#ifndef OPAL_SHOW_HELP_LEX_H +#define OPAL_SHOW_HELP_LEX_H #include "ompi_config.h" @@ -33,13 +33,13 @@ #if defined(c_plusplus) || defined(__cplusplus) extern "C" { #endif -int ompi_show_help_yylex(void); -int ompi_show_help_init_buffer(FILE *file); +int opal_show_help_yylex(void); +int opal_show_help_init_buffer(FILE *file); -extern FILE *ompi_show_help_yyin; -extern bool ompi_show_help_parse_done; -extern char *ompi_show_help_yytext; -extern int ompi_show_help_yynewlines; +extern FILE *opal_show_help_yyin; +extern bool opal_show_help_parse_done; +extern char *opal_show_help_yytext; +extern int opal_show_help_yynewlines; /* * Make lex-generated files not issue compiler warnings @@ -51,13 +51,13 @@ extern int ompi_show_help_yynewlines; #define YY_NO_UNPUT 1 enum { - OMPI_SHOW_HELP_PARSE_DONE, - OMPI_SHOW_HELP_PARSE_ERROR, + OPAL_SHOW_HELP_PARSE_DONE, + OPAL_SHOW_HELP_PARSE_ERROR, - OMPI_SHOW_HELP_PARSE_TOPIC, - OMPI_SHOW_HELP_PARSE_MESSAGE, + OPAL_SHOW_HELP_PARSE_TOPIC, + OPAL_SHOW_HELP_PARSE_MESSAGE, - OMPI_SHOW_HELP_PARSE_MAX + OPAL_SHOW_HELP_PARSE_MAX }; #if defined(c_plusplus) || defined(__cplusplus) } diff --git a/opal/util/show_help_lex.l b/opal/util/show_help_lex.l index f36bf4a4d2..9cf2f951d6 100644 --- a/opal/util/show_help_lex.l +++ b/opal/util/show_help_lex.l @@ -22,12 +22,12 @@ #include #endif -#include "util/show_help_lex.h" +#include "opal/util/show_help_lex.h" /* * public functions */ -int ompi_show_help_finish_parsing(void); +int opal_show_help_finish_parsing(void); /* @@ -36,7 +36,7 @@ int ompi_show_help_finish_parsing(void); #ifdef __cplusplus extern "C" { #endif - static int ompi_show_help_yywrap(void); + static int opal_show_help_yywrap(void); #ifdef __cplusplus } #endif @@ -44,12 +44,12 @@ int ompi_show_help_finish_parsing(void); /* * global variables */ -int ompi_show_help_yynewlines = 1; -bool ompi_show_help_parse_done = false; -char *ompi_show_help_string = NULL; +int opal_show_help_yynewlines = 1; +bool opal_show_help_parse_done = false; +char *opal_show_help_string = NULL; #define yyterminate() \ - return ompi_show_help_finish_parsing() + return opal_show_help_finish_parsing() %} @@ -62,11 +62,11 @@ CHAR [A-Za-z0-9_\-\.] #.*\n ; /* comment line */ -^\[.+\]/.*\n { BEGIN(CHOMP); return OMPI_SHOW_HELP_PARSE_TOPIC; } +^\[.+\]/.*\n { BEGIN(CHOMP); return OPAL_SHOW_HELP_PARSE_TOPIC; } .*\n { BEGIN(INITIAL); } -.*/\n { BEGIN(CHOMP); return OMPI_SHOW_HELP_PARSE_MESSAGE; } +.*/\n { BEGIN(CHOMP); return OPAL_SHOW_HELP_PARSE_MESSAGE; } %% @@ -75,7 +75,7 @@ CHAR [A-Za-z0-9_\-\.] * This cleans up at the end of the parse (since, in this case, we * always parse the entire file) and prevents a memory leak. */ -int ompi_show_help_finish_parsing(void) +int opal_show_help_finish_parsing(void) { if (NULL != YY_CURRENT_BUFFER) { yy_delete_buffer(YY_CURRENT_BUFFER); @@ -89,9 +89,9 @@ int ompi_show_help_finish_parsing(void) } -static int ompi_show_help_yywrap(void) +static int opal_show_help_yywrap(void) { - ompi_show_help_parse_done = true; + opal_show_help_parse_done = true; return 1; } @@ -105,7 +105,7 @@ static int ompi_show_help_yywrap(void) * have a valid buffer. Hence, here we ensure to give it a valid * buffer. */ -int ompi_show_help_init_buffer(FILE *file) +int opal_show_help_init_buffer(FILE *file) { YY_BUFFER_STATE buf = yy_create_buffer(file, YY_BUF_SIZE); yy_switch_to_buffer(buf); diff --git a/opal/util/stacktrace.c b/opal/util/stacktrace.c index b8926e8963..1635b54523 100644 --- a/opal/util/stacktrace.c +++ b/opal/util/stacktrace.c @@ -34,7 +34,7 @@ #include #endif -#include "util/stacktrace.h" +#include "opal/util/stacktrace.h" #include "mca/base/mca_base_param.h" #ifndef _NSIG @@ -56,7 +56,7 @@ * FIXME: Should distinguish for systems, which don't have siginfo... */ #ifndef WIN32 -static void ompi_show_stackframe (int signo, siginfo_t * info, void * p) +static void opal_show_stackframe (int signo, siginfo_t * info, void * p) { #ifdef __GLIBC__ int i; @@ -263,7 +263,7 @@ static void ompi_show_stackframe (int signo, siginfo_t * info, void * p) /** - * Here we register the ompi_show_stackframe function for signals + * Here we register the opal_show_stackframe function for signals * passed to OpenMPI by the mpi_signal-parameter passed to mpirun * by the user. * @@ -272,7 +272,7 @@ static void ompi_show_stackframe (int signo, siginfo_t * info, void * p) * is not a valid signal-number * */ -int ompi_util_register_stackhandlers (void) +int opal_util_register_stackhandlers (void) { #ifndef WIN32 struct sigaction act; @@ -285,7 +285,7 @@ int ompi_util_register_stackhandlers (void) mca_base_param_lookup_string (param, &string_value); memset(&act, 0, sizeof(act)); - act.sa_sigaction = ompi_show_stackframe; + act.sa_sigaction = opal_show_stackframe; act.sa_flags = SA_SIGINFO; #ifdef SA_ONESHOT act.sa_flags |= SA_ONESHOT; diff --git a/opal/util/stacktrace.h b/opal/util/stacktrace.h index a355cdbd4e..fb43a93f0c 100644 --- a/opal/util/stacktrace.h +++ b/opal/util/stacktrace.h @@ -26,7 +26,7 @@ #endif /** - * Here we register the ompi_show_stackframe function for signals + * Here we register the opal_show_stackframe function for signals * passed to OpenMPI by the mpi_signal-parameter passed to mpirun * by the user. * @@ -35,6 +35,6 @@ * is not a valid signal-number * */ -OMPI_DECLSPEC int ompi_util_register_stackhandlers (void); +OMPI_DECLSPEC int opal_util_register_stackhandlers (void); #endif /* OMPI_STACKTRACE_H */ diff --git a/opal/util/strncpy.c b/opal/util/strncpy.c index 70d897666e..81d14f3ec9 100644 --- a/opal/util/strncpy.c +++ b/opal/util/strncpy.c @@ -21,7 +21,7 @@ #include -#include "util/strncpy.h" +#include "opal/util/strncpy.h" /** @@ -41,7 +41,7 @@ * Hat Advanced Server glibc cough cough). */ char * -ompi_strncpy(char *dest, const char *src, size_t len) +opal_strncpy(char *dest, const char *src, size_t len) { size_t i; int pad = 0; diff --git a/opal/util/strncpy.h b/opal/util/strncpy.h index 3b9bc38f7a..38dc133a17 100644 --- a/opal/util/strncpy.h +++ b/opal/util/strncpy.h @@ -14,8 +14,8 @@ * $HEADER$ */ -#ifndef OMPI_STRNCPY_H -#define OMPI_STRNCPY_H +#ifndef OPAL_STRNCPY_H +#define OPAL_STRNCPY_H #include "ompi_config.h" #ifdef HAVE_SYS_TYPES_H @@ -23,14 +23,14 @@ #endif /* - * Use ompi_strncpy() instead of strncpy() + * Use opal_strncpy() instead of strncpy() */ #if defined(strncpy) #undef strncpy #endif -#define strncpy ompi_strncpy +#define strncpy opal_strncpy -OMPI_DECLSPEC char *ompi_strncpy(char *dest, const char *src, size_t len); +OMPI_DECLSPEC char *opal_strncpy(char *dest, const char *src, size_t len); -#endif /* OMPI_STRNCPY_H */ +#endif /* OPAL_STRNCPY_H */ diff --git a/orte/mca/soh/bproc/soh_bproc_monitor.c b/orte/mca/soh/bproc/soh_bproc_monitor.c index 689b628375..025ffe608b 100644 --- a/orte/mca/soh/bproc/soh_bproc_monitor.c +++ b/orte/mca/soh/bproc/soh_bproc_monitor.c @@ -28,7 +28,7 @@ #include "runtime/runtime.h" #include "runtime/runtime_types.h" #include "runtime/ompi_rte_wait.h" -#include "util/show_help.h" +#include "opal/util/show_help.h" #include "mca/pcm/base/base_kill_track.h" #include "mca/pcm/base/base_job_track.h" @@ -49,7 +49,7 @@ mca_pcm_bproc_monitor_cb(pid_t pid, int status, void *data) ret = mca_pcm_base_job_list_get_job_info(me->jobs, pid, &jobid, &lower, &upper, true); if (ret != OMPI_SUCCESS) { - ompi_show_help("help-mca-pcm-bproc.txt", + opal_show_help("help-mca-pcm-bproc.txt", "spawn:no-process-record", true, pid, status); return; } diff --git a/orte/tools/console/orteconsole.c b/orte/tools/console/orteconsole.c index 6e50cb47c7..aba21aa5e7 100644 --- a/orte/tools/console/orteconsole.c +++ b/orte/tools/console/orteconsole.c @@ -32,7 +32,7 @@ #include "util/session_dir.h" #include "opal/util/output.h" #include "opal/util/os_path.h" -#include "util/show_help.h" +#include "opal/util/show_help.h" #include "util/universe_setup_file_io.h" #include "runtime/runtime.h" @@ -75,7 +75,7 @@ int main(int argc, char *argv[]) if (OMPI_SUCCESS != opal_cmd_line_parse(cmd_line, true, argc, argv)) { char *args = NULL; args = opal_cmd_line_get_usage_msg(cmd_line); - ompi_show_help("help-console.txt", "console:usage", false, + opal_show_help("help-console.txt", "console:usage", false, argv[0], args); free(args); return 1; @@ -86,7 +86,7 @@ int main(int argc, char *argv[]) opal_cmd_line_is_taken(cmd_line, "h")) { char *args = NULL; args = opal_cmd_line_get_usage_msg(cmd_line); - ompi_show_help("help-console.txt", "console:usage", false, + opal_show_help("help-console.txt", "console:usage", false, argv[0], args); free(args); return 1; diff --git a/orte/tools/orted/orted.c b/orte/tools/orted/orted.c index 33dd277b33..df6ccff72e 100644 --- a/orte/tools/orted/orted.c +++ b/orte/tools/orted/orted.c @@ -38,7 +38,7 @@ #include "dps/dps.h" #include "opal/util/opal_environ.h" #include "opal/util/output.h" -#include "util/show_help.h" +#include "opal/util/show_help.h" #include "util/sys_info.h" #include "opal/util/os_path.h" #include "opal/util/cmd_line.h" @@ -180,7 +180,7 @@ int main(int argc, char *argv[]) if (orted_globals.help) { char *args = NULL; args = opal_cmd_line_get_usage_msg(cmd_line); - ompi_show_help("help-orted.txt", "orted:usage", false, + opal_show_help("help-orted.txt", "orted:usage", false, argv[0], args); free(args); return 1; diff --git a/orte/tools/orteprobe/orteprobe.c b/orte/tools/orteprobe/orteprobe.c index 830a277a24..2f730c4c4e 100644 --- a/orte/tools/orteprobe/orteprobe.c +++ b/orte/tools/orteprobe/orteprobe.c @@ -40,7 +40,7 @@ #include "opal/util/argv.h" #include "opal/util/path.h" #include "opal/util/output.h" -#include "util/show_help.h" +#include "opal/util/show_help.h" #include "util/sys_info.h" #include "opal/util/os_path.h" #include "opal/util/cmd_line.h" @@ -151,7 +151,7 @@ int main(int argc, char *argv[]) if (orteprobe_globals.help) { char *args = NULL; args = opal_cmd_line_get_usage_msg(cmd_line); - ompi_show_help("help-orteprobe.txt", "orteprobe:usage", false, + opal_show_help("help-orteprobe.txt", "orteprobe:usage", false, argv[0], args); free(args); return 1; diff --git a/orte/tools/orterun/orterun.c b/orte/tools/orterun/orterun.c index 53dfcebae5..c725873ea0 100644 --- a/orte/tools/orterun/orterun.c +++ b/orte/tools/orterun/orterun.c @@ -42,7 +42,7 @@ #include "util/sys_info.h" #include "opal/util/output.h" #include "util/universe_setup_file_io.h" -#include "util/show_help.h" +#include "opal/util/show_help.h" #include "opal/util/basename.h" #include "opal/threads/condition.h" @@ -250,13 +250,13 @@ int main(int argc, char *argv[]) if (0 == num_apps) { /* This should never happen -- this case should be caught in create_app(), but let's just double check... */ - ompi_show_help("help-orterun.txt", "orterun:nothing-to-do", + opal_show_help("help-orterun.txt", "orterun:nothing-to-do", true, orterun_basename); exit(1); } apps = malloc(sizeof(orte_app_context_t *) * num_apps); if (NULL == apps) { - ompi_show_help("help-orterun.txt", "orterun:syscall-failed", + opal_show_help("help-orterun.txt", "orterun:syscall-failed", true, orterun_basename, "malloc returned NULL", errno); exit(1); } @@ -267,7 +267,7 @@ int main(int argc, char *argv[]) } proc_infos = malloc(sizeof(struct proc_info_t) * j); if (NULL == proc_infos) { - ompi_show_help("help-orterun.txt", "orterun:syscall-failed", + opal_show_help("help-orterun.txt", "orterun:syscall-failed", true, orterun_basename, "malloc returned NULL", errno); exit(1); } @@ -287,7 +287,7 @@ int main(int argc, char *argv[]) /* now call orte_init and setup the RTE */ if (ORTE_SUCCESS != (rc = orte_init())) { - ompi_show_help("help-orterun.txt", "orterun:init-failure", true, + opal_show_help("help-orterun.txt", "orterun:init-failure", true, "orte_init()", rc); return rc; } @@ -637,7 +637,7 @@ static int parse_globals(int argc, char* argv[]) if (1 == argc || orterun_globals.help) { char *args = NULL; args = opal_cmd_line_get_usage_msg(&cmd_line); - ompi_show_help("help-orterun.txt", "orterun:usage", false, + opal_show_help("help-orterun.txt", "orterun:usage", false, orterun_basename, args); free(args); @@ -880,7 +880,7 @@ static int create_app(int argc, char* argv[], orte_app_context_t **app_ptr, /* See if we have anything left */ if (0 == app->argc) { - ompi_show_help("help-orterun.txt", "orterun:executable-not-specified", + opal_show_help("help-orterun.txt", "orterun:executable-not-specified", true, orterun_basename, orterun_basename); rc = ORTE_ERR_NOT_FOUND; goto cleanup; @@ -975,7 +975,7 @@ static int create_app(int argc, char* argv[], orte_app_context_t **app_ptr, really have no idea what the launch... */ if (app->num_procs == 0 && !map_data) { - ompi_show_help("help-orterun.txt", "orterun:num-procs-unspecified", + opal_show_help("help-orterun.txt", "orterun:num-procs-unspecified", true, orterun_basename, app->argv[0]); rc = ORTE_ERR_BAD_PARAM; goto cleanup; @@ -993,7 +993,7 @@ static int create_app(int argc, char* argv[], orte_app_context_t **app_ptr, free(value); if (NULL == app->app) { - ompi_show_help("help-orterun.txt", "orterun:executable-not-found", + opal_show_help("help-orterun.txt", "orterun:executable-not-found", true, orterun_basename, app->argv[0], orterun_basename); rc = ORTE_ERR_NOT_FOUND; goto cleanup; @@ -1035,7 +1035,7 @@ static int parse_appfile(char *filename, char ***env) fp = fopen(filename, "r"); if (NULL == fp) { - ompi_show_help("help-orterun.txt", "orterun:appfile-not-found", true, + opal_show_help("help-orterun.txt", "orterun:appfile-not-found", true, filename); return ORTE_ERR_NOT_FOUND; }